Skip to main content

Cancel Freight Load

POST 

/api/freight/shipments/:id/cancel

Cancel a load. An unbooked load (draft or quoted) is simply cancelled. A booked load is cancelled at the provider when the provider has a cancel API; when it does not (see cancel_instructions on Get Freight Load, e.g. Warp cancels by email), cancel with the provider first and then call this with mark_only: true to record it.

Required scope: orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body fields

  • mark_only (boolean, default false): record the cancellation without calling the provider.

On cancel, the linked shipment's freight details get back their previous values for every field still holding the value the booking wrote; a value someone changed since is left alone. Refused with 409 when the load is already cancelled or delivered, or the provider can't cancel through the API and mark_only was not sent.

Errors. 409 when the load is in a state that does not allow this action; the body carries message and reasons (every problem, one per entry). 422 when the freight provider rejected the request; errors maps each field the provider named to its messages (an invalid API key appears under credentials). 502 when the freight provider did not answer; code carries the provider's error code when it sent one.

Authentication: Requires Bearer token with the orders:write scope.

Requires permission: freight.book

Request​

Responses​

OK

Response Headers
    Content-Type