Skip to Content

Developer / API Learning Center

Integrate shipping, tracking, labels, and rate quotes into your platform.

Cancel shipments

Use this endpoint to cancel a shipment that has not yet been assigned to a driver. Once a driver is assigned or the shipment is in progress, cancellation may not be available.

Authentication: an API key is required for this endpoint.

Endpoint

GET https://www.jetdelivery.com/api/v1/order/cancel/json/

Quick example

curl "https://www.jetdelivery.com/api/v1/order/cancel/json/?id=2345678&key=YOUR_API_KEY"

Tip: Use the tracking number returned from the Create Shipments endpoint as the id.

Parameters

Click any parameter to expand details.

id string Required
The 6–8 digit tracking number assigned to the shipment at time of booking (up to 8 characters).
key string Required
Your API key (linked to a Jet Delivery account). Required to cancel shipments.
If the shipment is already assigned to a driver, this endpoint may return an error or deny cancellation. In that case, contact your Jet Delivery representative or dispatch for assistance.

Response

On success, the endpoint returns a simple success result. If cancellation is not allowed or the request is invalid, the response will include an error message.

Example (success)

{
  "error": null,
  "data": {
    "result": "success"
  }
}

Example (error)

{
  "data": null,
  "error": {
    "message": "This order cannot be canceled.",
    "exception": null
  }
}
Common error messages include:
  • You did not provide an access token.
  • IP address is blocked
  • Access denied.
  • A valid tracking number is required.
  • The order is already canceled.
  • This order cannot be canceled.

Note: Depending on your account configuration (cancel method), some cancellations may return a provider response payload. If you need a strict, always-consistent response format, tell us and we can standardize it.

Next steps