Skip to main content

Request ezCater Dispatch

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:

  1. The order’s orderType is updated from DELIVERY to THIRD_PARTY_DELIVERY. - This change does not mean the final pickup time has been set.

  2. ezCater asynchronously computes the final ezCater Dispatch pickup time

  3. 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:

  1. Call thirdPartyDeliveryCreate.

  2. Wait a short period (approximately 10 seconds).

  3. Call your standard order/delivery details query and read order.event.catererHandoffFoodTime.

  4. 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.

Did this answer your question?