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.

Creating dine-in orders

You can create a dine-in order at a specific restaurant table. Adding an order at a table allows you to associate guest information with that order. For example, a reservation service might POST an order to a restaurant table to send guest information to a restaurant, but without any menu item selections.

When you create an order at a restaurant table through the orders API, that order is available from a Toast POS device in the table layout and open orders displays. The behavior of the table layout screen depends on whether there is an existing order open at the table when you create an order at that table using the orders API. If the table does not have an existing order, selecting the table will open the order that you create in the orders API. If the table does have an existing order, the order you create in the orders API is not visible at the table until the previous order is closed.

Note

The way you configure your restaurant to approve orders API orders affects creating orders at a restaurant table. If your restaurant is configured to require approval of orders API orders, you must approve each order at a restaurant table. The orders API will create an order that is visible to restaurant employees but will not fire any menu item selections unless the order is approved. You can configure your restaurant to automatically approve API orders.

To specify the table for an order, you include the Toast platform GUID for the table in the table value of the Order object. Include the GUID in an ExternalReference object.

If desired, you can include the following additional information when creating orders:

  • You can specify the restaurant employee who is responsible for the order. If you want to specify the restaurant employee, you include the Toast platform GUID of the employee in the server value of the Order object. You include the GUID in an ExternalReference object. The employee must exist and must have access to the current restaurant location. The orders API will not prevent you from specifying a deleted employee.

  • You can specify the revenue center associated with the order. Restaurants may use revenue centers to report on order volume in specific locations of a restaurant, such as the patio, bar, or dining room. For more information about revenue centers, see Revenue centers. The revenue center GUID must be a valid GUID returned by the /revenueCenters endpoint of the configuration API. To specify the revenue center, you include the Toast platform GUID of the revenue center in the revenueCenter value of the Order object.

    You can get the revenue center for a table or service area from the /tables and /serviceAreas endpoints of the configuration API. For more information, see the reference documentation for the configuration API.

The following example shows the message body for a POST request to the /orders endpoint that will create an order at a restaurant table.

Example POST request message body to create a dine-in order at a table

{
  "entityType": "Order",
  "table": {
    "guid": "170b5f39-060e-45c3-89f0-4907c16ab12c",1
    "entityType": "Table"
  },
  "server": {
    "guid": "dc9b7cd6-4389-4a6d-83c3-2fde7f033567",2
    "entityType": "RestaurantUser"
  },
  "diningOption": {
    "guid": "18855a26-40d4-4a8f-b484-c6af211dd597",3
    "entityType": "DiningOption"
  },
  "revenueCenter": {
    "guid": "908f0483-ac03-4c9a-a5a4-43c37786e237",4
    "entityType": "RevenueCenter"
  },
  "checks": [
    {5
      "entityType": "Check",
      "customer": {
        "entityType": "Customer",
        "firstName": "Severe",
        "lastName": "Thibault",
        "phone": "555-555-5555",
        "email": "severe@example.com"6
      }
    }
  ]
}

1

Include a table value with the GUID of the table that you want to create an order at. You can get the GUIDs of restaurant tables from the configuration API. For more information, see the reference documentation for the configuration API.

2

You can specify the restaurant employee who is responsible for the order in the server value of the Order object. This example specifies the Toast platform GUID of the employee in an ExternalReference object. Specifying an employee is optional.

3

To create an order at a table, the dining option behavior must be Dine In. You can get the GUIDs of dining options from the configuration API. For more information, see the reference documentation for the configuration API.

4

You can specify the revenue center associated with the order in the revenueCenter value of the Order object. This example specifies the Toast platform GUID of the revenue center in an ExternalReference object. Specifying a revenue center is optional. For more information about revenue centers, see Revenue centers.

5

You must include a checks value with at least one Check object. The check does not need to include any menu item selections. You can include a customer value with information about the restaurant guest.

6

The email value in a Customer object is the key value that indicates guest uniqueness. email must be unique per individual guest.