Skip to main content
PATCH
Update Transport Route Attachment
Attach a supporting document to a transport route (e.g. the carrier’s invoice or the delivery note), replace it, or remove it. Only the attachment changes: a document changes no emissions, so the route keeps its sections, status and results and is not recalculated. To change anything else, use Update Transport Route, which also takes attachment_file_id. The attachment is not the file the route was read from (file_id, a spreadsheet upload or a freight invoice). Deleting the attached file or moving it to the trash unlinks the route, which stays.

Request

Headers

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

Path Parameters

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

Body

string | null
required
UUID of an uploaded file of your files to attach to the route: upload it first (POST /v1/files/presigned-urls with skip_processing: true, the upload, then PATCH /v1/files/batch-update to uploaded). The file must belong to your organization or one you can write to, and a private file only to the route’s organization. null removes the attachment. Any other field is rejected (422).Example: "7c9e6679-7425-40de-944b-e07fc1f90ae7"

Response

Returns the route as Get Transport Route does (HTTP 200), with its attachment:
object | null
The document attached to the route, or null when it was removed.

Example

Response (200)
The response is abridged: it carries every field of Get Transport Route.

Common Errors

404 Not Found

Cause: The route does not exist or belongs to another organization (TRANSPORT_ROUTE_NOT_FOUND), or attachment_file_id is not a file you can attach: unknown, outside your perimeter, pending, in the trash or private to another organization all answer the same NOT_FOUND naming File.

422 Unprocessable Entity

Cause: The body has no attachment_file_id, it is not a UUID, or it carries another field.