Cancel Delivery
Parcel shipments can be canceled if they have not yet been handed off to DashLink. This includes shipments that were created in DashLink but never physically injected.
When to use cencel delivery
- Customer requested cancellation before shipment left facility
- Duplicate shipment detected
- Tracking code incorrectly printed on label
- Pre-labeling error (async flow)
Endpoint
PUT /drive/v2/deliveries/{external_delivery_id}/cancel
external_delivery_id must match the delivery ID.
Request Behavior
When cancellation succeeds:
- Delivery status becomes
cancelled cancellation_reason = "cancelled_by_creator"
When cancellation fails:
- Parcel may already have:
- Been scanned at a facility
- Been picked up by a dasher
- Entered a terminal state
Important operational note:
To prevent packages from being stranded, if you cancel an order but the package still arrives at a DashLink facility, DashLink will reactivate the order and schedule it for delivery.
Response Fields
In addition to the same quote and delivery request fields returned in the response, the fields below are either only sent in the response or possibly updated from the request inputs sent.
A sample response found in the Cancel Delivery Example appendix.
| Field | Type | Description |
|---|---|---|
external_delivery_id | string | Echoed unique delivery ID generated by the caller. |
delivery_status | string | Always "cancelled" for this endpoint. |
cancellation_reason | string | Always "cancelled_by_creator" for this endpoint. |
updated_at | string (ISO-8601) | Timestamp indicating when the delivery record was last updated. |
Note: Not all fields that may be returned by the Drive API are listed above.
This table includes only the fields relevant to the DashLink parcel use case.