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.

Getting the list of applicable discounts for an order

A GET request to the /discounts endpoint returns all of the configured discounts for a restaurant. The response does not consider whether a discount applies to an order.

To get the applicable discounts for an order, send a POST request with the Order object to the /applicableDiscounts endpoint of the orders API. You can optionally provide a promotional code. The promotional code limits the results to applicable discounts that are associated with that promotional code.

The response contains a list of applicable discounts. For each discount, the response indicates whether it is a check-level discount or an item-level discount. For item-level discounts, the response identifies the menu selection items that the discount can be applied to.

Here is an example of a response to a POST request to the /applicableDiscounts endpoint:

[
    {
        "discount": {
            "guid": "1086966b-1411-4d4b-b275-6b8643f5afb0",1
            "entityType": "Discount"
        },
        "applicableChecks": [],2
        "applicableSelections": [
            {
                "guid": "1f801d3f-4715-4ae7-b518-5df56b9910a3",3
                "entityType": "SELECTION",
                "externalId": null
            }
        ]
    },
    {
        "discount": {
            "guid": "138c3818-371c-4de9-88b2-c839fa144e8c",
            "entityType": "Discount"
        },
        "applicableChecks": [4
            {
                "guid": null,
                "entityType": "CHECK",
                "externalId": null
            }
        ],
        "applicableSelections": []5
    }
]

1

The GUID of the applicable discount.

2

Because this is an item-level discount, the checks value is empty.

3

This is the GUID of a menu item selection that is eligible for the discount.

4

For a check-level discount, the applicableChecks value is populated.

5

For a check-level discount, the applicableSelections value is empty.