Skip to main content
POST
/
api
/
shipments
/
{id}
/
cancel
Cancel a shipment
curl --request POST \
  --url https://clarus-api.com/api/shipments/{id}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Clarus-Subdomain: <api-key>'
{
  "data": {
    "id": 123,
    "type": "<string>",
    "attributes": {}
  }
}

Behavior

  • Cancels shipment with carrier API
  • Voids any generated labels
  • Returns updated shipment status

Important

  • Only submitted shipments can be cancelled
  • Some carriers may not support cancellation after pickup

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the shipment to cancel

Response

Shipment cancelled successfully

Standard successful response wrapper following JSON:API format

data
object

The response payload