Place order for Delivery
This guide shows you how to let a customer place a Delivery order, where the food is brought to an address they choose. See Order Types for the full list.
Before proceeding, you should have implemented:
How the flow works
Delivery uses order type 7 and is built through the cart: create a cart, set the store, order type and delivery address, add items, check out, pay, place the order. Server Side Cart covers those calls in full; this page covers what delivery adds.
Delivery has one extra concern the pickup types do not: the address has to be deliverable from that store, and that can change. Which store can deliver where is decided during store selection, so do that first.
Tell the cart this is a Delivery order
Set metadata.order_type.id to 7 and include a delivery_info object with the destination. Four fields are required: latitude, longitude, street_name and formatted_address. Coordinates alone are not enough, and an address UUID from the customer's saved addresses is not a substitute — resolve the address to these fields before you send it.
Say when the customer wants it: delivery_asap: true, or delivery_at with a time formatted Y-m-d H:i:s in the venue's timezone. A customer_phone_number is also needed, since the driver has to be able to reach them.
Request
{
"method": "put",
"url": "https://api-public-demo.menu.app/api/cart/{cart_id}",
"headers": {
"X-Request-ID": "69da3547-204b-4093-a225-54e084c24215",
"Application": "f3a90488ffee32c3acb6fcd0ca417cf6",
"Api-Version": "<current-release-version>",
"Content-Type": "application/json"
},
"body": {
"metadata": {
"venue_id": "a9d6d0c8-1689-4114-b1ec-6da9c33f0384",
"order_type": {
"id": 7,
"delivery_asap": true,
"customer_phone_number": "+13125550143",
"delivery_info": {
"latitude": 37.7737509,
"longitude": -122.4135012,
"street_name": "Brannan St",
"street_number": "798",
"formatted_address": "798 Brannan St, San Francisco, CA 94103, USA",
"postcode": "94103",
"locality": "San Francisco",
"country": "United States"
}
}
},
"cart": {
"products": [
{
"price_id": "9a4e25be-9c32-4b69-81b7-19a4f3595406",
"quantity": 1,
"comment": "",
"product_groups": []
}
],
"discounts": [],
"tip": {
"amount": 0,
"type": 1
}
}
}
}
Offer the customer a delivery time
Orders Filtered Pickup Times returns the slots a store can deliver in. Send the delivery order type with the customer's coordinates on order_type.delivery_info, so the address is accounted for as well as the store. It takes a nested order_type.id and a singular_point_id rather than a venue_id — see Choosing a pickup or delivery time.
If the store is Dispatch-enabled — check has_delivery_integration on the venue — you need a delivery quote first, and without one the pickup-times call returns no slots. Ask for it with promise: true on Delivery Venues, the same call that found the store. Keep the promise_key it returns: send it as customer_order_key on Orders Filtered Pickup Times so the slots follow the quote, and put it on the cart as metadata.order_type.delivery_info.promise_key before checkout, or the quote is not attached to the order. Filtered Pickup Times returns the quote too, as promise and customer_order_key, and mints a fresh one when you call it without a key — that is how the PAR web app refreshes the quote just before placing the order. Nothing on order creation itself carries the quote; a promise_token there is ignored. See Delivery Quote.
If the customer changes their address or their delivery time, re-check deliverability. The new address may be outside the store's coverage, in which case you need to start store selection again to find one that can deliver there — see the Delivery Store Selection flow.
Check out, pay and place the order
The rest is common to all order types and documented in Server Side Cart. One thing to watch: the delivery fee is part of the cart total and can change when the address or time changes, so always show the customer the summary from the most recent cart response rather than a figure you cached.
Track the courier
The order status webhook tells you the order moved to Ready (a courier has it) and Final (it was delivered), and nothing else about the delivery. Everything you need to show the customer where their food is comes from two calls.
Find the dispatch id on the order
Once the order has been handed to PAR Dispatch, Get Order returns an order_additional_info object with three extra keys:
{
"uuid": "6d2f1b3e-8c4a-4f0e-9b7d-3a1c5e7f9a2b",
"short_code": "A7K2",
"driver_tracking_enabled": true
}
uuid here is the dispatch order id, not the order's own uuid. driver_tracking_enabled is the store's choice to share courier location with customers; when it is false, skip tracking and show the order status only. The keys are written while the order is being processed right after placement, so they are normally there by the time Get Order returns the order; if they are not, read the order again.
The same response carries delivery_status, which follows the courier more closely than the order status: Underway once a courier accepts, Completed when it is handed over. See Delivery statuses.
Poll Driver Tracking
Call Driver Tracking with that dispatch uuid. It needs only the Application and Api-Version headers — no customer token. Every 15 to 30 seconds is plenty.
GET /api/dispatch-service/orders/6d2f1b3e-8c4a-4f0e-9b7d-3a1c5e7f9a2b/driver-tracking
Decide what to show from two fields:
use_external_dsp_tracking_linkistrue. The store's dispatch hub wants customers on the delivery provider's own page — DoorDash Drive, for example. Openexternal_dsp_tracking_urland stop there. The URL can benullfor a moment before the provider publishes it, so fall through to the next case until it arrives.- Otherwise draw it yourself.
driver.latitudeanddriver.longitudeare the courier's last known position (driverisnulluntil one is assigned).driver_to_store_polylineandstore_to_order_polylineare encoded polylines ready to drop on a map, andreestimated_delivery_timeis the latest ETA when the courier or provider has pushed one.
The delivery_status in this response is dispatch's own wording (Assigned to Driver, Driver in the Store, Delivery in Progress, Order Delivered, …). It is a good label for the tracking screen, but do not compare it with the delivery_status on the order — they are different value sets.
Stop polling when the order's status reaches Final, Canceled or Failed, or when the tracking response says Order Delivered.
What can go wrong here
405 — driver tracking is switched off on the dispatch side. Show the order status instead.
The response has no order in it — the id is wrong. Make sure you sent order_additional_info.uuid, not the order's own uuid.
driver stays null — no courier has been assigned yet. Keep showing the ETA from expected_delivery_time until one appears.
What can go wrong
The delivery time is no longer available — HTTP 400, code 2002. Re-fetch the delivery times and let the customer choose again.
Ordering is paused for the store — code 2003.
Delivery is not enabled for the store — code 2025.
The phone number is missing or invalid — code 2021 or 2022, raised when the order is created. Validate it before you get that far.
Once placed, follow the order with order status webhooks.



