Delete a delivery
curl --request DELETE \
--url https://api.demo.cula.earth/tracking/v1/deliveries/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/deliveries/{id}"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/deliveries/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.cula.earth/tracking/v1/deliveries/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/deliveries/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.demo.cula.earth/tracking/v1/deliveries/{id}")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/deliveries/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "bad_request",
"message": "The field limit must not be greater than 100."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "not_found",
"message": "Resource with ID xyz_01k56g7aec6dt5zrtamc72vw446 could not be found."
}{
"code": "conflict",
"message": "There exists already an object with external ID MY-CUSTOM-ID within this organisation."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Deliveries
Delete a delivery
DELETE
/
deliveries
/
{id}
Delete a delivery
curl --request DELETE \
--url https://api.demo.cula.earth/tracking/v1/deliveries/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Cula-Organisation-Id: <cula-organisation-id>'import requests
url = "https://api.demo.cula.earth/tracking/v1/deliveries/{id}"
headers = {
"Cula-Organisation-Id": "<cula-organisation-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Cula-Organisation-Id': '<cula-organisation-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.demo.cula.earth/tracking/v1/deliveries/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.demo.cula.earth/tracking/v1/deliveries/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Cula-Organisation-Id: <cula-organisation-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.demo.cula.earth/tracking/v1/deliveries/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Cula-Organisation-Id", "<cula-organisation-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.demo.cula.earth/tracking/v1/deliveries/{id}")
.header("Cula-Organisation-Id", "<cula-organisation-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.demo.cula.earth/tracking/v1/deliveries/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Cula-Organisation-Id"] = '<cula-organisation-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "bad_request",
"message": "The field limit must not be greater than 100."
}{
"code": "unauthorized",
"message": "Invalid or expired token"
}{
"code": "not_found",
"message": "Resource with ID xyz_01k56g7aec6dt5zrtamc72vw446 could not be found."
}{
"code": "conflict",
"message": "There exists already an object with external ID MY-CUSTOM-ID within this organisation."
}{
"code": "internal_server_error",
"message": "Internal server error."
}Authorizations
OAuth 2.0 client credentials. Exchange your client_id and client_secret for an access token scoped to the organisation that provides data access.
Headers
ID of the organisation the request operates on behalf of (e.g. org_...). Must be an organisation the API client has access to.
Example:
"org_01k83mfmhgchya944v86ryvhpq"
Path Parameters
Example:
"dlv_01k204p7hghzdtwjb3n48s5fs5"
Response
Delivery deleted.
Was this page helpful?