Skip to main content
POST
Cancel before physical pickup

Authorizations

Authorization
string
header
required

OAuth 2.0 client-credentials flow for external machine-to-machine integrations.

Headers

Idempotency-Key
string

Optional. Retry safety is handled for you: when this header is absent DropHub derives the key from the reference you already send — the order number on a shipment create, the shipment id on a cancel — scoped to your merchant account. Two calls naming the same order are treated as one submission and the second returns the original result. Send your own key only if you want to control the replay window yourself; an explicit key always wins.

Required string length: 16 - 128
Example:

"merchant-order-20260822-0001"

Path Parameters

shipmentId
string<uuid>
required

Body

application/json
reason
string
default:MERCHANT_REQUESTED
Pattern: ^[A-Z][A-Z0-9_]{1,47}$

Response

Minimal partner-safe shipment

id
string<uuid>
required
reference
string
required
status
enum<string>
required

ASSIGNED covers an offer awaiting the driver's acceptance and an accepted one. NO_DRIVER_AVAILABLE means the bounded driver search ended without a driver; the shipment can still be cancelled.

Available options:
CREATED,
ASSIGNED,
PICKED_UP,
OUT_FOR_DELIVERY,
DELIVERED,
FAILED,
NO_DRIVER_AVAILABLE,
CANCELLED
trackingUrl
string<uri-reference>
required
createdAt
string<date-time>
required
version
integer<int64>
required
Required range: x >= 0
codAmount
number<decimal> | null
Required range: x >= 0
deliveryFeeAmount
number<decimal> | null
Required range: x >= 0
deliveryFeeCurrency
string | null
Example:

"SAR"

eta
object | null
proofAvailable
boolean
proofType
enum<string> | null
Available options:
PHOTO,
SIGNATURE,
null
deliveredAt
string<date-time> | null
failureReasonCode
string | null
cancellationReasonCode
string | null
driver
object | null

The driver who accepted the shipment, while it is still moving. Phone number, surname, licence and identifiers are not disclosed; contact goes through the shipment conversation.