Skip to Content
dzshipBY DZBUILD
Shipping

Cancel a parcel

Cancels a parcel at the courier. Couriers accept this only before they collect the parcel; after that they refuse and the answer is 424 with their reason. Couriers with no cancel call (capabilities.cancelShipment false) answer 422.

POST
/v1/cancel

Cancels a parcel at the courier. Couriers accept this only before they collect the parcel; after that they refuse and the answer is 424 with their reason. Couriers with no cancel call (capabilities.cancelShipment false) answer 422.

Request Body

application/json
  1. body
courier*string
credentials?

The caller's own credentials for that courier, 1-8 string fields. Never stored. Omit entirely for the sandbox courier.

options?
trackingNumber*string
Lengthlength <= 80

Response Body

The courier accepted the cancellation

application/json
  1. response
trackingNumber*string
cancelled*boolean
Example Request
curl -X POST 'https://freeship.dzbuild.com/v1/cancel' \  -H 'Content-Type: application/json' \  -d '{  "courier": "string",  "trackingNumber": "string"}'
Example Response
{  "trackingNumber": "string",  "cancelled": true}