Getting quote times for online orders

You use the /quoteTime endpoint of the order management API to calculate the amount of time a restaurant needs to fulfill an order. For example, an online ordering integration can use the /quoteTime endpoint to calculate how long it will take to complete orders and displays that information to restaurant guests.

Quote time strategy overview

Note

To view and configure your restaurant's quote time strategy, you must have the 6. Web Setup > 6.6 Restaurant Operations Setup permission. For more information about permissions, see Access permissions reference.

The quote time is the amount of time it takes to prepare a guest's online order for takeout or delivery. The quote time is the prep time plus applicable delivery time. The quote time for an order is displayed on your restaurant's Toast Online Ordering website, the Local by Toast app, Orders Hub, and on the Online ordering dashboard.

The Quote time strategy section on the Takeout & delivery page in Toast Web is where you can configure and manage your restaurant’s quote times for takeout and delivery. The Quote time strategy section offers four strategy options:

  • Manual: Directly configure takeout and delivery quote times.

  • Kitchen capacity: Configure takeout and delivery quote times based on order volume.

  • Order price: Add additional time to takeout and delivery quote times based on the total price of the order.

  • SmartQuote: Automatically configures takeout and delivery quote times based on historical and real-time data.

    Note

    The SmartQuote feature is in limited release.

For more information, see Quote time strategies.

Understanding quote time strategies

Note

Item firing by prep time is not included in quote time calculations. For more information, see Firing by item prep time.

Quote time strategies are affected by the order source, which indicates how the order was created in the Toast platform. For more information on order sources, see Effect of order source on order validation and processes.

Note

For all quote time strategies, orders created using the orders API must include the preDiscountPrice in the JSON Order object. For more information, see Order object summary.

  • Manual: Third-party online orders placed through the orders API are treated the same as Toast online orders and in-store orders placed on a Toast device.

  • Kitchen capacity: Third-party online orders and orders placed through the restaurant’s website do not count against the kitchen capacity quote time strategy. For example, if the restaurant sets a capacity of five orders for every 15 minute interval, you will not see a different quote time until at least five orders have been placed.

  • Order price: Third-party online orders must include the preDiscountPrice for each item in the JSON Order object in the POST request to the /quoteTime endpoint. The preDiscountPrice is the gross price for the item before tax and discounts.

  • SmartQuote: Not available for third-party online orders.

Using the quote time API

You send a POST request to the /quoteTime endpoint and use the response to estimate the order's quote time and the restaurant’s availability to fulfill your order for the requested day and time. Toast support recommends that you send a POST request to the /quoteTime endpoint when any of the following actions are performed:

  • A guest views your online ordering menu

  • A guest creates an order

Below is a high-level workflow of how to use the API to retrieve quote times.

Quote time API workflow.
Retrieving quote time when your guest views your online ordering menu

Toast support recommends that you send a POST request to the /quoteTime endpoint when your guest views your online ordering menu. You can send an empty message body to the /quoteTime endpoint to retrieve the estimated quote time for your order.

Retrieving quote time when your guest creates an order

Send another POST request with the JSON Order object to the /quoteTime endpoint when your guest creates the order, but before your guest places the order to retrieve the final quote time. Include the preDiscountPrice in the Order object to apply any quote time strategies set by the restaurant.

If you include a promisedDate in the Order object, the Toast platform validates if the order can be fulfilled for that future date and time. If you do not include a promisedDate, the Toast platform retrieves the quote time for an ASAP order scheduled for immediate fulfillment. For more information, see Setting promisedDate for a future order.

Example message body with a promisedDate and the preDiscountPrice

The following example shows the message body for a POST request to the /quoteTime endpoint with a promisedDate and the preDiscountPrice.

{
   "guid": "string",
   "entityType": "string",
   "externalId": "string",
   "openedDate": "2024-08-24T14:15:22Z",
   "modifiedDate": "2024-08-24T14:15:22Z",
   "promisedDate": "2025-08-24T14:15:22Z", 1
   "channelGuid": "3c66b5cf-1850-49e6-aef3-40576e6de979",
   "diningOption": {
     "guid": "string",
     "entityType": "string",
     "externalId": "string"
   },
   "checks": [
     {
       "guid": "string",
       "entityType": "string",
       "externalId": "string",
       "createdDate": "2024-08-24T14:15:22Z",
       "openedDate": "2024-08-24T14:15:22Z",
       "closedDate": "2024-08-24T14:15:22Z",
       "modifiedDate": "2024-08-24T14:15:22Z",
       "deletedDate": "2024-08-24T14:15:22Z",
       "deleted": true,
       "selections": [
         {
           "guid": "string",
           "entityType": "string",
           "externalId": "string",
           "item": {
             "guid": "string",
             "entityType": "string",
             "multiLocationId": "string",
             "externalId": "string"
           },
           [content omitted]

           "deferred": true,
           "preDiscountPrice": 10, 2
           "price": 0,
           "tax": 0,
           "voided": true,
           "voidDate": "2019-08-24T14:15:22Z",
           "voidBusinessDate": 0,
           "voidReason": {
             "guid": "string",
             "entityType": "string",
             "externalId": "string"
           },
 [content omitted]
}

1

For scheduled orders, the date and time that the order is scheduled to be fulfilled. For ASAP orders, the promisedDate is null.

2

The gross item price before tax and discounts.


Understanding quote times, quoted fulfillment time, and availability status

The QuoteTimes object returned by the /quoteTime endpoint contains the leadTime, prepTime, and deliveryTime values. The sum of these three values is the quote time, which is the amount of time needed to fulfill an order. For more information about these values, see Quote time values.

The quotedFulfillmentTime value indicates the time when the restaurant will fulfill a specific order.

Immediate orders

For an order placed for immediate fulfillment, the quotedFulfillmentTime is derived by adding the quote time value to the next earliest time when the restaurant will fulfill online orders. The restaurant's online ordering schedule specifies the next earliest time when online orders will be accepted. If the restaurant is currently fulfilling online orders, the next earliest time is the current time.

For example, consider a restaurant that is currently not fulfilling online orders. The current time is 2020-10-08T12:00:00Z (12:00 PM). According to the restaurant's online ordering schedule, the next earliest time when the restaurant will fulfill online orders for delivery is 2020-10-08T16:30:00Z (4:30 PM). The quote time is 45 minutes (prepTime = 15 minutes, deliveryTime = 30 minutes). If a guest places a delivery order at the current time for immediate fulfillment, the /quoteTime endpoint returns a quotedFulfillmentTime of 2020-10-08T17:15:00Z (5:15 PM).

Scheduled orders

For an order that is scheduled for future fulfillment, if the requested fulfillment time falls within the restaurant's online ordering hours, then the quotedFulfillmentTime is the same as the requested time. For example, consider that the current time is 2020-10-08T12:00:00Z (12:00 PM) and a guest wants to schedule a takeout order for fulfillment at a future time, 2020-10-10T13:30:00Z (1:30 PM). The restaurant is currently accepting and fulfilling orders, so the order will be fulfilled at 2020-10-10T13:30:00Z (1:30 PM).

If the scheduled order's requested fulfillment time is outside the restaurant's online ordering hours, then the quotedFulfillmentTime value is the next earliest time when the restaurant can fulfill the online order. For example, consider that the current time is 2020-10-08T12:00:00Z (12:00 PM) and a guest wants to schedule a takeout order for fulfillment at the future time, 2020-10-10T13:30:00Z (1:30 PM). However, according to the restaurant's online ordering schedule, orders will be fulfilled starting at 2020-10-10T14:30:00Z (2:30 PM). The quote time is 15 minutes (prepTime = 15 minutes, deliveryTime = 0 for takeout orders). The /quoteTime endpoint returns a quotedFulfillmentTime of 2020-10-10T14:45:00Z (2:45 PM). This indicates that the guest's order will be delayed and their order will not be ready to pick up at the time they requested.

You use the quotedFulfillmentTime and availability.status values to display the status of an order on your online ordering platform. The availability.status value indicates if an order will be ready at the requested time, if it will be delayed, or if the restaurant cannot prepare the order because the requested time is outside the online ordering hours.

The following table describes different online ordering scenarios and the corresponding availability.status and quotedFulfillmentTime values.

Scenario quotedFulfillmentTime value availability.status How to represent this information on your ordering platform

Takeout or curbside orders

Takeout or curbside order is placed for immediate fulfillment and the restaurant is currently fulfilling online orders for those dining behaviors.

quotedFulfillmentTime = next earliest time when the restaurant will fulfill online orders + leadTime + prepTime

AVAILABLE

Display the expected time the order is available for pick up.

Takeout or curbside order is placed for immediate fulfillment, but the restaurant is currently not fulfilling online orders for those dining behaviors.

null

UNAVAILABLE

Display that online ordering is currently unavailable at the restaurant. Use the /orderingSchedule endpoint to determine when the restaurant will accept online orders again, and display when the guest can place their order next.

Takeout or curbside order is scheduled for a future time that is during the restaurant's online ordering hours.

quotedFulfillmentTime is the scheduled time.

AVAILABLE

Display the scheduled time the order is available for pick up.

Takeout or curbside order is scheduled for a future time that is outside the restaurant's online ordering hours.

quotedFulfillmentTime is the next earliest time when the restaurant will fulfill online orders.

DELAYED

Display that the order will be delayed, and will be ready to pick up at quotedFulfillmentTime instead.

Delivery orders

Delivery order is placed for immediate fulfillment and the restaurant is currently fulfilling online orders for the delivery dining behavior.

quotedFulfillmentTime = next earliest time when the restaurant will fulfill online orders + leadTime + prepTime + deliveryTime

AVAILABLE

Display the expected time the order will be delivered.

Delivery order is placed for immediate fulfillment, but the restaurant is currently not fulfilling online orders for the delivery dining behavior.

null

UNAVAILABLE

Display that online ordering is currently unavailable at the restaurant. Use the /orderingSchedule endpoint to determine when the restaurant will accept online orders again, and display when the guest can place their order next.

Delivery order is scheduled for a future time that is during the restaurant's online ordering hours.

quotedFulfillmentTime = scheduled time

AVAILABLE

Display the scheduled time the order will be delivered.

Delivery order is scheduled for a future time that is outside the restaurant's online ordering hours.

quotedFulfillmentTime is the next earliest time when the restaurant will fulfill online orders.

DELAYED

Display that the order will be delayed, and will be delivered at quotedFulfillmentTime instead.

Example order quote time requests

The following sections explain how to use the /quoteTime endpoint to retrieve quote time information for online orders.

Retrieving quote time for orders placed for immediate fulfillment

Send a POST request to the /quoteTime endpoint to retrieve the quote time for an order placed for immediate fulfillment. Using this information, your online ordering platform can display the earliest date and time a guest can expect the restaurant to fulfill their order for a specific dining option behavior if they place it for immediate fulfillment.

POST request to retrieve quote times for orders placed for immediate fulfillment

In the following example, you send a POST request to the /quoteTime endpoint to retrieve the quote time and availability for an order that a guest wants to place for immediate fulfillment. You specify a delivery time of 45 minutes.

Note

It is optional to specify a delivery time in the POST request. Online ordering integrations that use their own delivery drivers can specify a delivery time using the deliveryTimeMinutes parameter. If specified, this value overrides the delivery time configured by the restaurant in the Toast platform. Otherwise, the delivery time configured by the restaurant is returned as the deliveryTime value in the /quoteTime endpoint response.

curl -X POST \
-H "Authorization: Bearer eyJzI1NiJ9hbGciOiJSU.eyJhd9yaXR5Ij
oiQ1JVTkNIVElNRSIsInJzR3VpZCI6IjE4YzQ5YWJlLWFlODItNGFlYy04ND
M1LWJhYTRjMjVlYTY2MiIsInNjb3BlIjpbImxWQiOlsidG9hc3QiXSwibmFt
aW5nQXV0aGhYm9yIiwib3JkZXJzIiwidXNlcm1nbXQiXSwiZXhwIjoxNDg0M
zg5ODUwLCJqdGkiOiJlMDYzZjJkMy1jNGYyLTRiZjItODJmNi01MTg1NWMzZ
DAxM2YiLCJjbGllbnRfaWQiOiJjcnVuY2h0aW1lIn0.X1_0y9Hzj5F9gdOw2
o6VSYTyZwooAJiFMDmNakbZrtiUdYwLzuLwLpCMQzX5pKYtOqDUz_cetGJL3
txKL1L-K2j1Enoq8An8hEM6e8J0KdAiwrYFO3W3CmWedaoz95K9ghNZVCs28
Td2Sp3Ix3fObxbrvanocx9_OT8S9uM8hdSXmBI_ykTWvOVgK4hO24V3DJy4b
9bz1FtgOvrClhELxCe8dJy7jiwAR60xczlCF5rna98RMLN6zY4ffjmljKFZ6
QV0KkVppWjEiJn7oFHiIylCX1sSg7sddrGatj0xJzts3GJ8u8_lryUNHaEvJ
dWq4Yzwo007AMgxjH9d241Y-g" \1
-H "Toast-Restaurant-External-ID: 08aa055a-a067-4792-8e4c-092ffc8g71a8" \2
"https://[toast-api-hostname]/ordermgmt/v1/quoteTime?
deliveryTimeMinutes=45"3

1

Include an authentication token. For more information, see Authentication and restaurant access.

2

Specify the GUID of the restaurant whose online ordering schedule you want to retrieve. This must be an individual restaurant and not a restaurant group GUID.

3

If your online ordering platform uses a delivery time estimate for an order that is different than the delivery time configured by the restaurant in the Toast platform, specify the value in minutes using the deliveryTimeMinutes parameter. If specified, this value overrides the delivery time configured by the restaurant.


Response containing quote times for orders placed for immediate fulfillment

The response from the /quoteTime endpoint contains a DiningOptionQuoteTime object for each dining option behavior that the restaurant offers for online ordering. If the restaurant offers only one dining option behavior for online orders, the /quoteTime endpoint returns only one DiningOptionQuoteTime object.

The following example shows the response containing the current quote time for the takeout and delivery dining option behaviors.

{
    "diningOptionQuoteTimes": [
        {
            "diningOptionBehavior": "DELIVERY",
            "quoteTimes": {
                "leadTime": "PT0S",
                "prepTime": "PT15M",1
                "deliveryTime": "PT45M"2
            },
            "quotedFulfillmentTime": "2020-10-10T16:00:00Z",3
            "availability": {
                "status": "UNAVAILABLE",4
                "reasons": [
                    {
                        "reasonCode": "toast.schedule_availability",
                        "reasonMessage": "Unable to fulfill order at the requested time. Schedule has no availability"5
                    }
                ]
            }
        },
        {
            "diningOptionBehavior": "TAKE_OUT",
            "quoteTimes": {
                "leadTime": "PT0S",
                "prepTime": "PT15M",
                "deliveryTime": "PT0S"6
            },
            "quotedFulfillmentTime": "2020-10-09T14:57:00Z",7
            "availability": {
                "status": "AVAILABLE",8
                "reasons": []9
            }
        }
    ]
}

1

The restaurant has configured 15 minutes of prep time.

2

The deliveryTime value is the deliveryTimeMinutes parameter you specified in the POST request. If you don't specify the deliveryTimeMinutes parameter in the request, this value is the delivery time configured by the restaurant.

3

When availability.status is UNAVAILABLE, the quotedFulfillmentTime value is the next earliest time when the restaurant can fulfill online orders for delivery. This value is determined by adding the quoteTimes.prepTime and quoteTimes.deliveryTime values to the next earliest available time specified by the restaurant's online ordering schedule.

4

The UNAVAILABLE status indicates that the restaurant is currently not fulfilling online orders for the delivery dining option behavior.

5

The message provides more information about the availability.status value.

6

The deliveryTime value is always zero when the dining option behavior is TAKE_OUT.

7

The quotedFulfillmentTime value is the time when the restaurant will fulfill a takeout order placed. This value includes the quoteTimes.prepTime value.

8

The AVAILABLE status indicates that the restaurant currently fulfills online orders placed for immediate fulfillment for the takeout dining option behavior.

9

No message is returned when availability.status is AVAILABLE.


Retrieving quote time for future orders

Use the /quoteTime endpoint to retrieve the estimated quote time and availability for orders scheduled for future fulfillment. Send a POST request and include the promisedDate value in the request body to specify the time when the guest wants the restaurant to fulfill their order. Using this information, your online ordering platform can display whether the restaurant can fulfill the guest's order at the desired time.

POST request to retrieve quote time for a future order

In the following example, you send a POST request to the /quoteTime endpoint to retrieve the quote time for an order scheduled to be fulfilled at a future time, specified by promisedDate.

curl -X POST \
-H "Authorization: Bearer eyJzI1NiJ9hbGciOiJSU.eyJhd9yaXR5Ij
oiQ1JVTkNIVElNRSIsInJzR3VpZCI6IjE4YzQ5YWJlLWFlODItNGFlYy04ND
M1LWJhYTRjMjVlYTY2MiIsInNjb3BlIjpbImxWQiOlsidG9hc3QiXSwibmFt
aW5nQXV0aGhYm9yIiwib3JkZXJzIiwidXNlcm1nbXQiXSwiZXhwIjoxNDg0M
zg5ODUwLCJqdGkiOiJlMDYzZjJkMy1jNGYyLTRiZjItODJmNi01MTg1NWMzZ
DAxM2YiLCJjbGllbnRfaWQiOiJjcnVuY2h0aW1lIn0.X1_0y9Hzj5F9gdOw2
o6VSYTyZwooAJiFMDmNakbZrtiUdYwLzuLwLpCMQzX5pKYtOqDUz_cetGJL3
txKL1L-K2j1Enoq8An8hEM6e8J0KdAiwrYFO3W3CmWedaoz95K9ghNZVCs28
Td2Sp3Ix3fObxbrvanocx9_OT8S9uM8hdSXmBI_ykTWvOVgK4hO24V3DJy4b
9bz1FtgOvrClhELxCe8dJy7jiwAR60xczlCF5rna98RMLN6zY4ffjmljKFZ6
QV0KkVppWjEiJn7oFHiIylCX1sSg7sddrGatj0xJzts3GJ8u8_lryUNHaEvJ
dWq4Yzwo007AMgxjH9d241Y-g" \1
-H "Toast-Restaurant-External-ID: 08aa055a-a067-4792-8e4c-092ffc8g71a8" \2
-d '{"promisedDate": "2020-10-10T13:00:00Z"}'3
"https://[toast-api-hostname]/ordermgmt/v1/quoteTime"

1

Include an authentication token. For more information, see Authentication and restaurant access.

2

Specify the GUID of the restaurant whose online ordering schedule you want to retrieve. This must be an individual restaurant and not a restaurant group GUID.

3

Specify the future time when the guest would like the restaurant to fulfill their order.


Response containing quote time and availability information for a future order

The following example shows the response containing quote time and availability information for an order scheduled for future fulfillment. Using the response, you can inform the guest whether the restaurant can fulfill their order at the desired time based on the dining option behavior they select for the order.

{
    "diningOptionQuoteTimes": [
        {
            "diningOptionBehavior": "DELIVERY",1
            "quoteTimes": {
                "leadTime": "PT0S",2
                "prepTime": "PT15M",
                "deliveryTime": "PT30M"
            },
            "quotedFulfillmentTime": "2020-10-10T15:45:00Z",3
            "availability": {
                "status": "UNAVAILABLE",4
                "reasons": [
                    {
                        "reasonCode": "toast.schedule_availability",
                        "reasonMessage": "Unable to fulfill order at the requested time. Schedule has no availability"
                    }
                ]
            }
        },
        {
            "diningOptionBehavior": "TAKE_OUT",5
            "quoteTimes": {
                "leadTime": "PT0S",
                "prepTime": "PT15M",
                "deliveryTime": "PT0S"
            },
            "quotedFulfillmentTime": "2020-10-10T13:00:00Z",6
            "availability": {
                "status": "AVAILABLE",7
                "reasons": []
            }
        }
    ]
}

1

This DiningOptionQuoteTimes object contains quote time information for the DELIVERY dining option behavior.

2

quoteTimes.leadTime is always zero for scheduled orders.

3

The quotedFulfillmentTime value is later than the promisedDate when the guest would like the restaurant to fulfill their order. The value returned by the endpoint is the sum of the earliest time when the restaurant's online ordering hours begin on the requested date and the quoteTimes.prepTime and quoteTimes.deliveryTime values.

4

The UNAVAILABLE status indicates that the restaurant cannot fulfill the guest's order with the delivery dining option behavior at the requested time as the restaurant has reached capacity for the day.

5

This DiningOptionQuoteTimes object contains quote time information for the TAKE_OUT dining option behavior.

6

The quotedFulfillmentTime value is the same as the promisedDate value specified by the guest. This indicates that the restaurant can fulfill the guest's order at the requested time.

7

The AVAILABLE status indicates that the restaurant can fulfill the guest's order with the takeout dining option behavior at the requested time.


Quote time values

The following table describes the values that make up an order's quote time.

Values

Value Description

leadTime

The amount of time added to the prepTime. Lead times are also known as throttling delays, which puts a hold on or pauses online orders. The leadTime plus the prepTime is the quote time.

Note

The lead time value for scheduled orders is always zero.

You can configure lead times on the online ordering dashboard in Toast Web. Choose Takeout & delivery > Toast online ordering to open the online ordering dashboard. For more information, see Online ordering dashboard.

prepTime

The amount of time required by the restaurant to prepare an order and make it available for a guest (for takeout and curbside pickup orders) or a delivery driver (for delivery orders) to pick up. The prepTime value is the same for all online orders regardless of dining option behavior.

You can configure your prep times in the Toast Web. Choose Takeout & delivery > Quote time strategy to open the quote time section and set your Takeout prep time (quote time).

deliveryTime

The amount of time required for a delivery driver to deliver the order to the guest.

You can configure the delivery time in Toast Web. Choose Takeout & delivery > Quote time strategy to open the quote time section and set your Delivery quote time.

Note

If the restaurant uses an external delivery provider to deliver orders, the delivery time configured by the provider overrides the delivery time configured by the restaurant on the Toast platform. To use this value in quote time calculations, specify it using the deliveryTimeMinutes parameter while sending a POST request to the /quoteTime endpoint.