Create delivery
/deliveriesCreates a delivery and dispatches it right away. Your own id of the order goes in externalId: sending the same externalId again returns the delivery already created, so retrying after a timeout or a 5xx is safe.
Leave provider out and we pick the fleet for you. To dispatch a fleet you chose from Get quotes, pass it as provider, and add maxPrice to refuse the delivery if that fleet costs more now.
The restaurant in pickup is created on its first delivery and updated when its details change. See Restaurants.
id of the answer: the other calls take it. Then follow the delivery through webhooks.Request body
Your delivery id. Sending the same id again returns the delivery already created (safe to retry), also while your account is blocked.
The restaurant, by your own id. Created on its first use, see Restaurants.
Where the food goes.
Who gets the food.
Dropoff instructions for the driver.
When the food is ready. Missing, or within 5 minutes from now, means as soon as possible.
Customer tip, cents.
Order subtotal, cents. Some fleets need the order value.
Order total, cents.
Dispatch this fleet: a provider from Get quotes. Left out, we pick the fleet.
Only with provider: refuse the delivery if that fleet's price (as in Get quotes, tip not included) is now higher. Cents.
Response
The delivery, dispatched. The same object every call and webhook returns.
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
message is an array, one entry per problem.There are currently no available drivers, please try again later.No fleet can take the delivery right now.Provider <x> is not enabled for your account.provider is a fleet your account does not use.No <x> offer is available for this delivery right now.The fleet in provider has no offer for this delivery.The vDrive price went up since it was confirmed.The fleet's price is above maxPrice.Pickup location <id> is disabled.The restaurant is turned off. Contact us.The pickup address could not be found. Send its latitude and longitude.An address came without coordinates and could not be geocoded. The same text says dropoff for the dropoff address.Invalid API key.The key is missing, wrong or turned off.Access denied: an invoice is past due. Pay it to resume deliveries.An invoice is past due. See Billing.Access denied: the credit limit is reached. Pay the open invoices to continue.What you owe reached your credit limit, if your account has one.Delivery <id> is already being created.Another request is creating the same externalId. Retry in a few seconds.externalId.