Cancel delivery
/deliveries/{id}/cancelCancels the delivery at the fleet. Cancel before pickup: once the food is picked up the fleet may refuse it.
A cancellation after a driver accepted the delivery is charged: check Cancellation fee first, and see Pricing.
Path parameters
Our delivery id.
Request body
Why you cancel. Optional, and so is the body.
Response
The delivery, cancelled.
Our delivery id. The other calls take it.
Your delivery id, as sent.
Where the delivery is. See Delivery statuses.
The fleet the delivery went to, e.g. grubhub. Can change when the delivery moves to another fleet.
The restaurant.
Null until a driver takes the delivery.
Our tracking page, the same link the customer gets by SMS. Null until it is created.
When the driver is expected at the restaurant (ISO 8601).
When the driver is expected at the customer (ISO 8601).
Customer tip, cents.
Our fee, cents.
Cents, 0 by default.
Fleet price, cents. While the delivery runs, the price at dispatch; once settled, the final price (or the cancellation fee).
What you owe for this delivery, cents. An estimate while it runs, final once settled. See Pricing.
true once the delivery is finished and its amount is final.
Why it was cancelled.
ISO 8601.
ISO 8601. The latest update wins: see Webhooks.
Errors
Order is already picked up.The fleet no longer allows a cancellation.Delivery is already finished.The delivery is already completed or cancelled.Invalid API key.The key is missing, wrong or turned off.Delivery not found.No such delivery, or it belongs to another account.