Orders
Dispatch order
Partner hands an `accepted` or `ready` delivery order to its courier: its status becomes `in_delivery`.
https://api.maple.inc/v1/orders/{orderId}/dispatch API keyA pickup order answers 409 illegal_transition with details.fulfillment_type. Maple applies the action before it answers and returns the updated order, as GET /v1/orders/{orderId} does. An order already in the status the action sets is returned unchanged, so a resend is safe. Any other status answers 409 illegal_transition with details.from_status. If Maple has not finished applying the action within a few seconds it answers 409 operation_in_progress with details.retry_after: the action still applies; send the same request again. Needs orders:write and orders:read.
Authorization
Send your API key as Authorization: Bearer <key>: mpk_test_… for test mode, mpk_live_… for live mode. Both use https://api.maple.inc/v1. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.
Parameters
-
orderIdstring required -
Idempotency-KeystringYour unique key for this request, such as a UUID. A retry with the same key and the same body within 24 hours returns the first response, with
Idempotent-Replayed: true, and does not run again. See https://docs.maple.inc/developer-api/concepts/idempotency Up to 255 characters. -
Maple-VersionstringThe API version your code expects. A version Maple does not serve answers 400
invalid_requestwithparamMaple-Version. See https://docs.maple.inc/developer-api/concepts/versioning Always2026-11-27.
Responses
200 OK
Order
-
objectstring requiredAlways
order. -
idstring required -
livemodeboolean requiredTrue when the order belongs to the live environment; false for test-mode data.
-
createdinteger required -
updatedinteger requiredWhen the order last changed (Unix seconds), including its payment and delivery. Of two copies of one order, from webhooks that arrived out of order, the one with the larger
updatedis newer; on a tie, read it again withGET /v1/orders/{orderId}. -
statusstring requiredOne of
pending,submitted,accepted,ready,in_delivery,fulfilled,rejected,canceled. -
cancellation_reasonstring or null requiredWho canceled the order (
customerorrestaurant) whenstatusiscanceled; null otherwise. -
canceled_atinteger or null requiredWhen the order was canceled (Unix seconds); null unless
statusiscanceled, and null for orders canceled before 2026-11-24. -
rejection_reasonstring or null requiredWhy the order is
rejected:validation_failed(your app answered its validationinvalid, or did not answer),submission_failed(Maple could not hand the order to your app),denied(your app denied it),decision_timeout(no decision arrived in time) orexpired(the order was too old to make by the time Maple could send it). Null otherwise, and null for orders rejected before 2026-11-24. -
location_idstring requiredThe location the order belongs to.
-
fulfillment_typestring requiredpickup(the customer collects the order) ordelivery. One ofpickup,delivery. -
numberstring or null requiredThe short order number Maple gave the customer, the one they say at the counter (e.g.
1274). Not unique across locations or over time; useidto identify the order. -
sourcestring or null requiredWhere the customer placed the order:
phone(Maple’s phone agent),web(the restaurant’s Maple ordering website),kiosk, orpos. Null for orders Maple did not classify. -
notesstring or null requiredWhat the customer asked for on the whole order (special instructions); null when nothing. Item requests are on each line item’s
notes, delivery instructions ondelivery_address.notes. -
ready_byinteger requiredWhen the order is due (Unix seconds):
scheduled_forfor a scheduled order, otherwise the time Maple gave the customer, the order time plus the prep time. -
scheduled_forinteger or null requiredCustomer-selected completion time (Unix seconds) for scheduled orders; null for ASAP orders. Prepare the order for this time, not on receipt.
-
delivery_addressobject or null requiredThe delivery address for delivery orders, including delivery instructions; null for pickup orders or when no stored address is available.
-
delivery_address.line1string or null required -
delivery_address.line2string or null required -
delivery_address.citystring or null required -
delivery_address.statestring or null required -
delivery_address.postal_codestring or null required -
delivery_address.countrystring or null required -
delivery_address.notesstring or null required -
customerobject required -
customer.namestring required -
customer.phonestring or null requiredCustomer phone number in E.164 format (e.g. +14155552671); null when the customer provided none.
-
customer.phone_last_fourstring or null requiredLast four digits of the customer phone number.
-
line_itemsobject[] required -
line_items[].namestring required -
line_items[].external_idstring or null required -
line_items[].quantitynumber required -
line_items[].base_price_moneyobject required -
line_items[].base_price_money.amountinteger required -
line_items[].base_price_money.currencystring required -
line_items[].tax_moneyobject required -
line_items[].tax_money.amountinteger required -
line_items[].tax_money.currencystring required -
line_items[].notesstring or null required -
line_items[].modifier_groupsobject[] required -
line_items[].modifier_groups[].namestring required -
line_items[].modifier_groups[].external_idstring or null required -
line_items[].modifier_groups[].optionsobject[] required -
line_items[].modifier_groups[].options[].namestring required -
line_items[].modifier_groups[].options[].external_idstring or null required -
line_items[].modifier_groups[].options[].quantityinteger required -
line_items[].modifier_groups[].options[].price_moneyobject required -
line_items[].modifier_groups[].options[].price_money.amountinteger required -
line_items[].modifier_groups[].options[].price_money.currencystring required -
line_items[].modifier_groups[].options[].modifier_groupsobject[] required -
line_items[].modifier_groups[].options[].modifier_groups[].namestring required -
line_items[].modifier_groups[].options[].modifier_groups[].external_idstring or null required -
line_items[].modifier_groups[].options[].modifier_groups[].optionsobject[] required -
line_items[].modifier_groups[].options[].modifier_groups[].options[].namestring required -
line_items[].modifier_groups[].options[].modifier_groups[].options[].external_idstring or null required -
line_items[].modifier_groups[].options[].modifier_groups[].options[].quantityinteger required -
line_items[].modifier_groups[].options[].modifier_groups[].options[].price_moneyobject required -
line_items[].modifier_groups[].options[].modifier_groups[].options[].modifier_groupsobject[] required -
totalsobject requiredEach amount is
{ amount, currency }:amountin integer minor units (cents forUSD).subtotal_moneyis the line items and their modifiers before discounts;discount_moneyis what discounts took off them;tax_moneyis the tax charged, after discounts;surcharge_moneyis Maple’s processing fee passed to the customer;service_charge_moneyis the restaurant’s own fees its POS adds to the check;tip_moneyis the tip for the restaurant. Two POS systems file the restaurant’s fees elsewhere: Toast counts its non-gratuity service charges insubtotal_money, and Chowbus fees are insurcharge_money.total_moneyis what the customer pays: the amount charged online, or for anin_storeorder the amount the restaurant should collect (Maple does not see what it took). It is subtotal - discount + tax + surcharge + service charge + tip + delivery fee + delivery tip. -
totals.subtotal_moneyobject required -
totals.subtotal_money.amountinteger required -
totals.subtotal_money.currencystring required -
totals.discount_moneyobject required -
totals.discount_money.amountinteger required -
totals.discount_money.currencystring required -
totals.tax_moneyobject required -
totals.tax_money.amountinteger required -
totals.tax_money.currencystring required -
totals.surcharge_moneyobject required -
totals.surcharge_money.amountinteger required -
totals.surcharge_money.currencystring required -
totals.service_charge_moneyobject required -
totals.service_charge_money.amountinteger required -
totals.service_charge_money.currencystring required -
totals.tip_moneyobject required -
totals.tip_money.amountinteger required -
totals.tip_money.currencystring required -
totals.delivery_fee_moneyobject required -
totals.delivery_fee_money.amountinteger required -
totals.delivery_fee_money.currencystring required -
totals.delivery_tip_moneyobject required -
totals.delivery_tip_money.amountinteger required -
totals.delivery_tip_money.currencystring required -
totals.total_moneyobject required -
totals.total_money.amountinteger required -
totals.total_money.currencystring required -
paymentobject requiredHow the customer pays.
method:online(through a payment link or the ordering website) orin_store(at the restaurant, at pickup or delivery); null only when Maple recorded none.provider: the payment processor, null before a payment exists.payment_link_url: the link Maple sent the customer; null forin_storeorders or before a link exists. -
payment.methodstring or null required -
payment.providerstring or null required -
payment.statusstring or null requiredWhere the customer’s payment stands:
pending(not paid yet; anin_storeorder stayspendinguntil your app marks it paid withPOST /v1/orders/{orderId}/pay),paid,failed(the payment did not go through),voided(Maple canceled the payment before it settled),refundedorpartially_refunded. Null only when Maple recorded none. -
payment.payment_link_urlstring or null required
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
404Not found -
409Conflict -
429Too many requests -
500Server error
Every error body is one error object: branch on its type and code; message is for people, param names the field at fault, and doc_url links the code on Errors.
A 429 also sends Retry-After: Seconds to wait before retrying; also returned as error.retry_after in the body.