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.

Applying loyalty program discounts to an order

To apply loyalty program discounts to an order:

  1. Include an appliedLoyaltyInfo value in the Check 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. The vendor value is usually INTEGRATION.

  2. Include an appliedDiscounts value in the Check object for a check-level discount, or in a MenuItemSelection object for an item-level discount.

    In the AppliedDiscounts object, include the loyaltyDetails value.

    In the LoyaltyDetails object, provide the following information:

    • vendor - The Toast API enumeration value for the loyalty program service provider. The vendor value is usually INTEGRATION. If vendor is INTEGRATION, 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": {1
            "loyaltyIdentifier": "6000101001599474",2
            "vendor": "INTEGRATION"3
         },
         "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": [4
           {
             "loyaltyDetails": {
               "vendor": "INTEGRATION",5
               "referenceId": "4"6
             }
           }
         ]
      }
   ]
}

1

The appliedLoyaltyInfo value holds an AppliedLoyaltyInfo object that associates a check with a specific loyalty account.

2

The loyaltyIdentifier value is the unique identifier of the loyalty account that is recognized by the loyalty program service provider. For example, this might be the loyalty card number for a program member.

3

The vendor value specifies the loyalty program service provider. The value is one of the enumerated service provider names that the Toast POS system supports. The value is usually INTEGRATION.

4

The appliedDiscounts value holds an AppliedDiscount object that specifies the loyalty program discount or discounts to apply to the check.

5

The vendor value specifies the loyalty program service provider. The value is one of the enumerated service provider names that the Toast platform supports. The value is usually INTEGRATION. If vendor is INTEGRATION, then you do not provide a discount GUID or amount.

6

The referenceId value is the unique identifier that is recognized by the loyalty program service provider. The loyalty program service provider matches this value to its own discount records.

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": {1
            "loyaltyIdentifier": "6000101001599474",2
            "vendor": "INTEGRATION"3
         },
         "selections":[  
            {  
               "entityType":"MenuItemSelection",
               "itemGroup":{  
                  "guid":"eeebddd6-6556-4c81-bd2b-1d1a1a716a83",
                  "entityType":"MenuGroup"
               },
               "item":{  
                  "entityType":"MenuItem",
                  "guid":"79df2dfb-340d-405f-a0f9-55b882606ce5"
               },
               "quantity":3,
               "appliedDiscounts": [4
                 {
                   "loyaltyDetails": {
                   "vendor": "INTEGRATION",5
                   "referenceId": "4"6
                   }
                 }
               ],
               "modifiers": []
            }
         ]
      }
   ]
}

1

The appliedLoyaltyInfo value holds an AppliedLoyaltyInfo object that associates a check with a specific loyalty account.

2

The loyaltyIdentifier value is the unique identifier of the loyalty account that is recognized by the loyalty program service provider. For example, this may be the loyalty card number for a program member.

3

The vendor value specifies the loyalty program service provider. The value is one of the enumerated service provider names that the Toast platform supports. The value is usually INTEGRATION.

4

The appliedDiscounts value holds an AppliedDiscount object that specifies the loyalty program discount or discounts being applied to the item.

5

The vendor value specifies the loyalty program service provider. The value is one of the enumerated service provider names that the Toast platform supports. The value is usually INTEGRATION. If vendor is INTEGRATION, then you do not provide a discount GUID or discount amount.

6

The referenceId value is the unique identifier that is recognized by the loyalty program service provider. The loyalty program service provider matches this value to its own discount records.