Skip to main content
DELETE
/
v1
/
transports
/
{transport_route_id}
Delete Transport Route
const options = {method: 'DELETE', headers: {'x-organization-id': '<x-organization-id>'}};

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

Delete Transport Route

Permanently delete a transport route by its unique identifier. All associated transport sections and their calculated emissions (total_impacts) records are deleted automatically in the same operation.
This action is irreversible. All sections and their emission impact records will be permanently removed.

Request

Authentication

Supports both authentication methods:
x-api-key
string
Your API key (use this or Authorization)Example: sk_live_1234567890abcdef
Authorization
string
Bearer JWT token (use this or x-api-key)Example: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...

Headers

x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

transport_route_id
string
required
The unique identifier (UUID) of the transport route to deleteExample: 010ed3b6-b513-40f3-b9fe-0f0a338d9274

Response

Returns 204 No Content on success. The response body is empty.

Example

curl -X DELETE "https://api.dcycle.io/v1/transports/010ed3b6-b513-40f3-b9fe-0f0a338d9274" \
  -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.

Common Errors

401 Unauthorized

Cause: Missing or invalid API key / JWT token
{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}

403 Forbidden

Cause: The authenticated user is not a member of the organization
{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}

404 Not Found

Cause: Route ID does not exist or belongs to a different organization
{"detail": "TransportRoute not found", "code": "TRANSPORT_ROUTE_NOT_FOUND"}

List Transport Routes

Retrieve all transport routes to find IDs before deleting

Get Transport Route

Retrieve a specific route before deleting

Create Transport Route

Create a new transport route with sections

Get Route Counts

Confirm counts decrease after deletion

Transport Overview

Full data model and distance calculation reference