vDrive
vDrive API Docs
vgrubs.com

Cancel delivery

POST/deliveries/{id}/cancel

Cancels 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

idintegerrequired

Our delivery id.

Request body

reasonstring, up to 500

Why you cancel. Optional, and so is the body.

Response

200OK

The delivery, cancelled.

idinteger

Our delivery id. The other calls take it.

externalIdstring

Your delivery id, as sent.

statusstring

Where the delivery is. See Delivery statuses.

providerstring | null

The fleet the delivery went to, e.g. grubhub. Can change when the delivery moves to another fleet.

pickupLocationobject

The restaurant.

driverobject | null

Null until a driver takes the delivery.

trackingUrlstring | null

Our tracking page, the same link the customer gets by SMS. Null until it is created.

pickupEtastring | null

When the driver is expected at the restaurant (ISO 8601).

dropoffEtastring | null

When the driver is expected at the customer (ISO 8601).

tipinteger

Customer tip, cents.

vDriveFeeinteger

Our fee, cents.

vGrubsFeeinteger

Cents, 0 by default.

deliveryFeeinteger

Fleet price, cents. While the delivery runs, the price at dispatch; once settled, the final price (or the cancellation fee).

amountinteger

What you owe for this delivery, cents. An estimate while it runs, final once settled. See Pricing.

settledboolean

true once the delivery is finished and its amount is final.

cancellationReasonstring | null

Why it was cancelled.

createdAtstring

ISO 8601.

updatedAtstring

ISO 8601. The latest update wins: see Webhooks.

Errors

400
Order is already picked up.The fleet no longer allows a cancellation.
400
Delivery is already finished.The delivery is already completed or cancelled.
401
Invalid API key.The key is missing, wrong or turned off.
404
Delivery not found.No such delivery, or it belongs to another account.