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.

How to update the delivery information

To update delivery information, you send a PATCH request to the /orders/{orderGuid}/deliveryInfo endpoint of the orders API. The request must include a JSON DeliveryInfo object that provides the updated values.

For more information about the endpoint used in this process, see the /deliveryInfo reference guide.

To update the delivery information for an existing order

  1. Locate the Toast platform GUID for the order you are updating. For more information on locating an order GUID see Finding an order or check GUID.

  2. If you plan to update an order's deliveryEmployee field, locate the Toast platform GUID of the employee to assign as the delivery driver. For information on retrieving employee details, see Getting All Employees of a Restaurant.

  3. Create a JSON DeliveryInfo object that contains the delivery information you want to update.

    You can update any of the following values and only need to include the values you are updating.

    dispatchedDate

    The date and time when the restaurant indicated the order was available for delivery and assigned to the delivery employee.

    For more information on formatting dates and times, see Dates and timestamps.

    deliveredDate

    The date and time when the delivery employee indicated the order was delivered.

    For more information on formatting dates and times, see Dates and timestamps.

    deliveryState

    The status of the delivery order. The available values for deliveryState are:

    • PENDING - The delivery order is not dispatched. Corresponds to the Unassigned tab for deliveries on the Toast POS application.

    • PICKED_UP - The delivery employee has picked up the order from the restaurant.

    • IN_PROGRESS - The order is on its way to the destination. Corresponds to the En Route tab for deliveries on the Toast POS application.

    • DELIVERED - The order was delivered. Corresponds to the Delivered tab for deliveries on the Toast POS application.

    A typical order's deliveryState transitions from PENDING to PICKED_UP to IN_PROGRESS to DELIVERED. However, you might change the deliveryState to a previous value to correct an error. For example, the delivery employee marks the wrong order as DELIVERED and needs to revert it to IN_PROGRESS.

    deliveryEmployee

    Contains the Toast platform GUID of the employee assigned as the delivery driver.

    The delivery location values (for example, street address and city) and the delivery notes value cannot be updated.

    For an example DeliveryInfo object, see Example DeliveryInfo object.

  4. Send a PATCH request to the /orders/{orderGuid}/deliveryInfo endpoint of the orders API.

    In the PATCH path, include the Toast platform GUID of the order.

    In the body of the request, include the DeliveryInfo object with the delivery information you want to update.

  5. Examine the response data you receive from the orders API. Verify your request is processed successfully with a 200 HTTP code response.

    The response contains the full Order object. For an example, see this response.