{ "$schema": "https://json-structure.org/meta/core/v0/#", "$id": "https://raw.githubusercontent.com/api-evangelist/toast-tab/refs/heads/main/json-structure/orders-applied-discount-structure.json", "name": "AppliedDiscount", "description": "A discount applied to a check or item. The Toast platform calculates service\ncharges before it applies discounts. The system calculates tax after applying\ndiscounts.\n\nIn a `POST` request, you cannot apply open percent discounts. You can apply open amount discounts.\nYou can only apply one discount to a menu item selection. For more information, see\n[the _Toast Developer Guide_](https://doc.toasttab.com/doc/devguide/apiDiscountingOrders.html).\n", "type": "object", "definitions": { "ExternalReference": { "type": "object", "description": "A wrapper object with fields that allow reference to a Toast platform entity by Toast GUID or a partner's identifier.", "allOf": [ { "$ref": "#/$defs/ToastReference" }, { "type": "object", "properties": { "externalId": { "description": "External identifier string that is prefixed by the naming authority. You can use the orders API to set an `externalId` for an order and then GET the order with that `externalId`.", "type": "string" } } } ], "name": "ExternalReference" }, "ToastReference": { "type": "object", "description": "A wrapper object with fields that allow reference to a Toast entity by Toast GUID.", "required": [ "guid", "entityType" ], "properties": { "guid": { "description": "The GUID maintained by the Toast platform.", "type": "string", "example": "5a401af8-d2e2-4090-8c45-9f87b8b6c4d1" }, "entityType": { "x-toast-read-only": true, "description": "The type of object this is. Response only.", "type": "string", "example": "string" } }, "name": "ToastReference" }, "AppliedDiscountTrigger": { "type": "object", "description": "The Selection that triggered the application of this discount", "properties": { "selection": { "$ref": "#/$defs/ExternalReference" }, "quantity": { "type": "double", "description": "The amount of the selection used to trigger the applied discount.", "example": 1.0 } }, "name": "AppliedDiscountTrigger" }, "AppliedDiscountReason": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "The name of the reason for the applied discount.", "example": "Example Name" }, "description": { "type": "string", "description": "An optional description for the reason for the applied discount.", "example": "string" }, "comment": { "type": "string", "description": "An optional comment on the reason for the applied discount.", "example": "string" }, "discountReason": { "type": "object", "description": "A ToastReference object that contains the GUID for the discount reason configured for the discount.", "$ref": "#/$defs/ToastReference" } }, "name": "AppliedDiscountReason" }, "LoyaltyDetails": { "type": "object", "description": "Information about the loyalty program discount that is applied to a check. The loyalty program account is identified in the `AppliedLoyaltyInfo` value for the check.", "required": [ "vendor", "referenceId" ], "properties": { "vendor": { "type": "string", "description": "The specific loyalty program service provider that supports the loyalty account.", "enum": [ "TOAST", "PUNCHH", "PUNCHH2", "PAYTRONIX", "APPFRONT", "INTEGRATION" ], "example": "TOAST" }, "referenceId": { "type": "string", "description": "The identifier of the loyalty program discount that\nis recognized by the loyalty program service provider.\n\nThe Toast platform transmits the discount identifier to the service\nprovider to determine the validity and amount of the discount.\n", "example": "90a86f12" } }, "name": "LoyaltyDetails" } } }