Delete Logistics Request
const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/requests/{request_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/requests/{request_id}"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.delete(url, headers=headers)
print(response.text)curl --request DELETE \
--url https://api.dcycle.io/v1/logistics/requests/{request_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'Delete Logistics Request
Delete a single logistics request (shipment) from your organization
DELETE
/
v1
/
logistics
/
requests
/
{request_id}
Delete Logistics Request
const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/requests/{request_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/logistics/requests/{request_id}"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.delete(url, headers=headers)
print(response.text)curl --request DELETE \
--url https://api.dcycle.io/v1/logistics/requests/{request_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'Delete Logistics Request
Permanently delete a logistics request (shipment leg) from your organization. This action cannot be undone.Permanent Action: Deleting a logistics request is permanent and cannot be undone. The associated emissions data will also be removed from your organization’s totals. If the request belongs to a package, the package’s aggregated emissions will be recalculated.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
string
required
The unique identifier (UUID) of the logistics request to deleteExample:
550e8400-e29b-41d4-a716-446655440000Response
Returns204 No Content on successful deletion.
Example
curl -X DELETE "https://api.dcycle.io/v1/logistics/requests/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
api_key = os.getenv("DCYCLE_API_KEY")
org_id = os.getenv("DCYCLE_ORG_ID")
request_id = "550e8400-e29b-41d4-a716-446655440000"
headers = {
"x-api-key": api_key,
"x-organization-id": org_id
}
response = requests.delete(
f"https://api.dcycle.io/v1/logistics/requests/{request_id}",
headers=headers
)
if response.status_code == 204:
print("Logistics request deleted successfully")
else:
print(f"Error: {response.json()}")
const axios = require('axios');
const apiKey = process.env.DCYCLE_API_KEY;
const orgId = process.env.DCYCLE_ORG_ID;
const requestId = '550e8400-e29b-41d4-a716-446655440000';
const headers = {
'x-api-key': apiKey,
'x-organization-id': orgId
};
axios.delete(
`https://api.dcycle.io/v1/logistics/requests/${requestId}`,
{ headers }
)
.then(response => {
if (response.status === 204) {
console.log('Logistics request deleted successfully');
}
})
.catch(error => console.error(error));
Successful Response
HTTP/1.1 204 No Content
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{
"detail": "Invalid API key",
"code": "INVALID_API_KEY"
}
404 Not Found
Cause: Logistics request not found or doesn’t belong to your organization{
"code": "NOT_FOUND",
"detail": "Logistics request not found"
}
- The request ID is correct
- The request belongs to the organization specified in
x-organization-id - The record hasn’t already been deleted
Related Endpoints
Batch Delete Requests
Delete multiple requests at once
Get Logistics Requests
Retrieve logistics requests
Create Logistics Request
Create a new shipment
Was this page helpful?