Cancel a package that has not been converted to a shipment

View as Markdown

Cancel a package that has not been converted to a shipment (i.e. it has no shipment_id).

Cancelling is a soft action: the package stays retrievable with status set to cancelled (see cancelled_at). Once attached to a shipment, a package can no longer be cancelled.

Authentication

X-Api-Keystring
API Key authentication via header

Path parameters

idstringRequired
Parcel token

Request

This endpoint expects an object.
commentstringOptional

Optional free-text reason for the cancellation.

Response

OK — package cancelled

parcel_idstringOptional
parcel_numberstringOptional
customer_identifierstringOptional
statusenumOptional
trade_directionenumOptional
quantityintegerOptional
declared_weightdoubleOptional
actual_weightdoubleOptional
lengthdoubleOptional
widthdoubleOptional
heightdoubleOptional
volumedoubleOptional
modeenumOptional
hold_instructionenumOptional
hold_released_atdatetime or nullOptional
warehouse_arrived_atdatetime or nullOptional
cancelled_atdatetime or nullOptional
Set when the parcel is cancelled. A parcel cannot be cancelled once it has been converted to a shipment.
storage_feeobjectOptional
noticeslist of objectsOptional
origin_countrystringOptional
destination_countrystringOptional
created_atdatetimeOptional

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error