Delete Logistics Recharge
const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/recharges/{recharge_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/recharges/{recharge_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/recharges/{recharge_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'Delete Logistics Recharge
Delete a single logistics recharge (fuel consumption) from your organization
DELETE
/
v1
/
logistics
/
recharges
/
{recharge_id}
Delete Logistics Recharge
const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/logistics/recharges/{recharge_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/recharges/{recharge_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/recharges/{recharge_id} \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'Delete Logistics Recharge
Permanently delete a logistics recharge (fuel consumption record) from your organization. This action cannot be undone.Permanent Action: Deleting a logistics recharge is permanent and cannot be undone. The associated emissions data will also be removed from your organization’s totals.
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 recharge to deleteExample:
550e8400-e29b-41d4-a716-446655440000Response
Returns204 No Content on successful deletion.
Example
curl -X DELETE "https://api.dcycle.io/v1/logistics/recharges/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")
recharge_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/recharges/{recharge_id}",
headers=headers
)
if response.status_code == 204:
print("Logistics recharge 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 rechargeId = '550e8400-e29b-41d4-a716-446655440000';
const headers = {
'x-api-key': apiKey,
'x-organization-id': orgId
};
axios.delete(
`https://api.dcycle.io/v1/logistics/recharges/${rechargeId}`,
{ headers }
)
.then(response => {
if (response.status === 204) {
console.log('Logistics recharge 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 recharge not found or doesn’t belong to your organization{
"code": "NOT_FOUND",
"detail": "Logistics recharge not found"
}
- The recharge ID is correct
- The recharge belongs to the organization specified in
x-organization-id - The record hasn’t already been deleted
Related Endpoints
Batch Delete Recharges
Delete multiple recharges at once
Get Logistics Recharges
Retrieve fuel consumption records
Delete Single Request
Delete a shipment request
Was this page helpful?