Skip to main content
DELETE
Delete Vehicle Consumptions by File

Delete Vehicle Consumptions by File

Delete all vehicle consumption records that were created from a specific CSV bulk upload, identified by its file_id. This endpoint traverses the full holding hierarchy, removing matching records from the parent organization and all child organizations.
Irreversible Action: This permanently deletes all consumption records linked to the given file. All associated CO₂e impact data will be removed across every organization in the holding.
Holding-aware: When a CSV is uploaded to a parent organization, consumption records may be created across multiple child organizations. This endpoint finds and deletes all of them in a single call.

Request

Path Parameters

uuid
required
The UUID of the file whose associated consumption records should be deleted. This is the file_id returned when the bulk CSV upload was processed.Example: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUID. The deletion will include consumption records from this organization and all child organizations in the holding.Example: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Response

Returns 204 No Content on success, even if no records matched the given file_id. No response body.

Example

Successful Response

No response body is returned. If no records matched the file_id, the response is still 204.

Common Errors

401 Unauthorized

Cause: Missing or invalid API key
Solution: Verify your API key is valid and active. Get a new one from Settings → API.

422 Validation Error

Cause: Malformed UUID in path parameter

Use Cases

Undo a Bulk CSV Upload

When a user uploads a CSV file and realizes it contained errors, use this endpoint to remove all the records it created before re-uploading the corrected file:

Vehicle Consumptions

List all consumption records for a vehicle

Delete Vehicle Consumption

Delete a single consumption record by ID

Bulk Delete Consumptions

Delete multiple consumption records by their IDs

Bulk Delete by Filters

Delete consumptions matching filter criteria