Skip to main content
POST
Bulk Delete Transport Routes by Filters

Bulk Delete Transport Routes by Filters

Delete every transport route that matches a given set of filters — the same filters accepted by the GET /v1/transports list endpoint. This avoids having to collect IDs manually when you want to clear a whole date range, file upload, or status group. A filter_hash safety token (returned by the list endpoint) must be included in the request body. This confirms you are deleting exactly the set of records you previewed, and rejects the request if the filters changed in the meantime.
This operation is irreversible. All matching transport routes, their sections, and their total_impacts records are permanently deleted. Always call GET /v1/transports with the same filters first and review the results before proceeding.

Typical Flow

  1. Call GET /v1/transports with your desired filters.
  2. Save the filter_hash field from the response.
  3. Call POST /v1/transports/bulk-delete-by-filters with the same query parameters and the filter_hash in the request body.
If any filter parameter differs between steps 1 and 3, the server returns a 409 Conflict.

Request

Headers

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

Query Parameters

At least one non-empty query parameter is required to prevent accidental mass deletion.
Free-text search against route name and supplier
date
Include only routes with a transport date on or after this date (YYYY-MM-DD)
date
Include only routes with a transport date on or before this date (YYYY-MM-DD)
array of string
Filter by route status. Allowed values: pending, active, error. Repeat the parameter to include multiple statuses.
string
downstream (outbound) or upstream (inbound)
array of UUID
Filter to routes created by a specific file upload. Repeat the parameter for multiple files.
datetime
Include only routes created on or after this ISO 8601 datetime
datetime
Include only routes created on or before this ISO 8601 datetime
string
calculated (routes with at least one impact) or not_calculated (routes with no impacts yet)
array of string
Filter by supplier name (exact match). Pass multiple values to include routes from several suppliers.

Body

string
required
The filter_hash value returned by GET /v1/transports with the same set of filters. Acts as a safety token: if the hash does not match the current filter combination a 409 Conflict is returned.Example: "a3f1c9e2d7b84056af19c3e0b1d72a84"

Response

integer
Number of transport routes successfully deleted
array
UUIDs of the transport routes that were successfully deleted
integer
Number of transport routes that could not be deleted
array
UUIDs of the transport routes that failed
string
Human-readable summary of the operation outcome

Example

Successful Response

No matching records

Common Errors

401 Unauthorized

Cause: Missing or invalid API key / JWT token

403 Forbidden

Cause: The authenticated user is not a member of the organization

409 Conflict

Cause: The filter_hash does not match the current set of query parameters. This happens when the filters passed to this endpoint differ from the ones used when the list was fetched.
Solution: Re-fetch GET /v1/transports with your intended filters, copy the new filter_hash, and retry with exactly the same query parameters.

422 Unprocessable Entity

Cause: No query parameters were provided (all filters are empty)

List Transport Routes

Retrieve all transport routes — the source of the filter_hash

Bulk Delete by IDs

Delete specific transport routes by their IDs

Delete Transport Route

Delete a single transport route by ID

Transport Overview

Full data model and distance calculation reference