Skip to main content
DELETE
/
v1
/
vehicle_consumptions
/
{vehicle_consumption_id}
Delete Vehicle Consumption
const options = {
  method: 'DELETE',
  headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/vehicle_consumptions/{vehicle_consumption_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Documentation Index

Fetch the complete documentation index at: https://code.dcycle.io/llms.txt

Use this file to discover all available pages before exploring further.

Delete Vehicle Consumption

Permanently delete a single vehicle consumption record. This action cannot be undone and will remove all associated emissions data from your organization’s totals.
Irreversible Action: Deleting a consumption record is permanent. All associated CO₂e impact data will be removed.

Request

Path Parameters

vehicle_consumption_id
uuid
required
The UUID of the vehicle consumption record to deleteExample: 660e8400-e29b-41d4-a716-446655440000

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Response

Returns 204 No Content on successful deletion. No response body.

Example

curl -X DELETE "https://api.dcycle.io/v1/vehicle_consumptions/660e8400-e29b-41d4-a716-446655440000" \
  -H "x-api-key: ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

HTTP/1.1 204 No Content
No response body is returned for successful deletions.

Common Errors

401 Unauthorized

Cause: Missing or invalid API key
{
  "detail": "Invalid API key",
  "code": "INVALID_API_KEY"
}
Solution: Verify your API key is valid and active. Get a new one from Settings → API.

404 Not Found

Cause: Vehicle consumption record not found in organization
{
  "code": "VEHICLE_CONSUMPTION_NOT_FOUND",
  "detail": "VehicleConsumption with id=UUID('...') not found"
}
Solution: Verify the consumption ID is correct and belongs to your organization. Use the List Vehicle Consumptions endpoint to retrieve valid IDs.

422 Validation Error

Cause: Malformed UUID in path parameter
{
  "detail": [
    {
      "loc": ["path", "vehicle_consumption_id"],
      "msg": "value is not a valid uuid",
      "type": "type_error.uuid"
    }
  ]
}

Vehicle Consumptions

List all consumption records for a vehicle

Delete Consumptions by File

Delete all consumptions from a CSV upload by file ID

Bulk Delete Consumptions

Delete multiple consumption records at once

Bulk Delete by Filters

Delete consumptions matching filter criteria