This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.

Calculating order wait time

When you use the orders API to create an order, the orders API does not validate the time when you submit the order. The orders API accepts the order even if, for example, the restaurant is not currently open, is not currently accepting online orders, or will close before the order can be fulfilled.

You can use information from the restaurant configuration to:

  • Determine when the restaurant is open and is accepting online orders.

  • For as soon as possible (ASAP) orders, estimate the amount of time that the guest will wait until a delivery order arrives or a takeout order is available.

  • For scheduled orders, ensure that the promisedDate that you provide is realistic.

When you use the orders API to create the order, the estimatedFulfillmentDate value in the response indicates when the order will be fulfilled. The algorithm that the Toast platform uses to set estimatedFulfillmentDate includes the configured restaurant quotes times, hours, and throttling.