Public API for Restaurant Part...
Delivery API
Request ezCater Dispatch
5 min
this mutation allows partners to request ezcater dispatch (ezcater managed third party delivery drivers) for an existing order directly through the delivery api the graphql mutation name is thirdpartydeliverycreate in a partner’s interface, this mutation will typically power an action such as “request ezcater dispatch” , “request delivery driver” , or “send to ezcater dispatch” selecting this ui action should trigger the thirdpartydeliverycreate mutation in the background request ezcater dispatch on an existing delivery when you determine that an order should use third party delivery via ezcater dispatch, call the thirdpartydeliverycreate mutation on the existing order/delivery in the delivery api on the ezcater side the order’s ordertype will initially be delivery order event catererhandofffoodtime will already be populated with the event time for that order/delivery (the initial, pre dispatch pickup time) treat this initial order event catererhandofffoodtime as the pre dispatch pickup time how ezcater updates the pickup time after ezcater dispatch has been requested the order’s ordertype is updated from delivery to third party delivery this change does not mean the final pickup time has been set ezcater asynchronously computes the final ezcater dispatch pickup time once that computation is complete, we update order event catererhandofffoodtime with the new ezcater dispatch pickup time there is no separate pickupat field —you should always read the pickup time from order event catererhandofffoodtime querying for the updated pickup time once you’ve requested ezcater dispatch, query the delivery/orders api for that delivery to retrieve the updated order event catererhandofffoodtime value recommended integration pattern call thirdpartydeliverycreate wait a short period (approximately 10 seconds ) call your standard order/delivery details query and read order event catererhandofffoodtime if the value still matches the original event time and you require the ezcater dispatch pickup time (for example, to display to store staff), you can retry with a short backoff until it is updated, within reasonable limits ui labeling guidance in your restaurant facing ui, label this function as “ezcater dispatch” please avoid using “ezdispatch” in the ui copy