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.
To apply loyalty program discounts to an order:
-
Include an
appliedLoyaltyInfo
value in theCheck
object that the discount applies to.In the
AppliedLoyaltyInfo
object, provide the following information:-
loyaltyIdentifier
- The identification string for the loyalty program account. -
vendor
- The Toast API enumeration value for the loyalty program service provider. Thevendor
value is usuallyINTEGRATION
.
-
-
Include an
appliedDiscounts
value in theCheck
object for a check-level discount, or in aMenuItemSelection
object for an item-level discount.In the
AppliedDiscounts
object, include theloyaltyDetails
value.In the
LoyaltyDetails
object, provide the following information:-
vendor
- The Toast API enumeration value for the loyalty program service provider. Thevendor
value is usuallyINTEGRATION
. If vendor isINTEGRATION
, then you do not provide a discount GUID or amount. -
referenceId
- The identification string for the loyalty program discount. The loyalty program service provider recognizes this value and matches it to the specific discount.
-
The following example shows the JSON message body to
POST
an order with a check-level loyalty program
discount.
{ "entityType":"Order", "diningOption":{ "guid":"4f4d2103-2e0f-45d7-ae4c-8a9c16648fd1", "entityType":"DiningOption" }, "checks":[ { "entityType":"Check", "customer":{ "email":"fgauthier@example.com", "firstName":"Francis", "lastName":"Gauthier", "phone":"987-654-3210" }, "appliedLoyaltyInfo": {"loyaltyIdentifier": "6000101001599474",
"vendor": "INTEGRATION"
}, "selections":[ { "entityType":"MenuItemSelection", "itemGroup":{ "guid":"eeebddd6-6556-4c81-bd2b-1d1a1a716a83", "entityType":"MenuGroup" }, "item":{ "entityType":"MenuItem", "guid":"79df2dfb-340d-405f-a0f9-55b882606ce5" }, "quantity":3, "modifiers": [] } ], "appliedDiscounts": [
{ "loyaltyDetails": { "vendor": "INTEGRATION",
"referenceId": "4"
} } ] } ] }
The |
|
The |
|
The |
|
The |
|
The |
|
The |
This example shows the JSON message body to POST
an
order with an item-level loyalty program discount.
{ "entityType":"Order", "diningOption":{ "guid":"4f4d2103-2e0f-45d7-ae4c-8a9c16648fd1", "entityType":"DiningOption" }, "checks":[ { "entityType":"Check", "customer":{ "email":"fgauthier@example.com", "firstName":"Francis", "lastName":"Gauthier", "phone":"987-654-3210" }, "appliedLoyaltyInfo": {"loyaltyIdentifier": "6000101001599474",
"vendor": "INTEGRATION"
}, "selections":[ { "entityType":"MenuItemSelection", "itemGroup":{ "guid":"eeebddd6-6556-4c81-bd2b-1d1a1a716a83", "entityType":"MenuGroup" }, "item":{ "entityType":"MenuItem", "guid":"79df2dfb-340d-405f-a0f9-55b882606ce5" }, "quantity":3, "appliedDiscounts": [
{ "loyaltyDetails": { "vendor": "INTEGRATION",
"referenceId": "4"
} } ], "modifiers": [] } ] } ] }
The |
|
The |
|
The |
|
The |
|
The |
|
The |