v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
Cancel

Cancel a Shipment

Cancel an existing shipment and request a label refund from the carrier. The shipment must not have been picked up or entered the carrier network.

When to use: Call this endpoint when you need to void a previously generated label — for example, if the order was cancelled, the address is incorrect, or you need to regenerate the label with different details.

Prerequisites:

  • Valid JWT authentication token (Bearer)
  • The carrier identifier (e.g., fedex, dhl, ups)
  • The tracking number of the shipment to cancel

Key behaviors:

  • Returns a confirmation status indicating whether the cancellation was accepted by the carrier
  • Refund processing times vary by carrier
  • Some carriers only allow cancellation within a limited time window after label generation
  • Labels that have already been scanned by the carrier cannot be cancelled
post/ship/cancel/

Request body

carrierstring required

Name of the carrier

trackingNumberstring required

Tracking number of the label

foliostring

Reference id

ecommerceinteger

Ecommerce shop id

Example request

{
  "carrier": "fedex",
  "trackingNumber": "7520610403",
  "folio": "ENV-2026-001234"
}

Response

Successful shipment cancellation

metastring

Name of the action