Provides information about a loyalty transaction processed by the Toast platform. The transaction information in the message body is intended to allow a loyalty provider to perform corresponding operations on the loyalty account, maintained by that provider.
You define the endpoint name for this implementation. The Toast POS system makes requests to the REST path that you supply during integration setup.
Each POST request to the endpoint includes a
Toast-Transaction-Type header parameter value to indicate the
type of loyalty transaction it represents. The possible
transaction types are:
The LoyaltyTransaction
object in the message body includes a set of information that
is specific for each transaction type.
The response time for a loyalty transaction request must be less than 500ms on average. A response time of greater than 5000ms will be considered a timeout and will be retried. There is a limit on the number of retries which depends on the context of the call.
All loyalty transactions must be considered idempotent. The
implementation must handle multiple requests with the same
Toast-Transaction-GUID and the same loyaltyIdentifier.
A LoyaltyTransaction
object containing information about the loyalty
transaction that the Toast POS system processed.
OK. The transactionStatus value of the
LoyaltyTransactionResponse object is ACCEPT.
Bad request. The transactionStatus value of the
LoyaltyTransactionResponse object is one of:
ERROR_INVALID_TOAST_TRANSACTION_TYPEERROR_ACCOUNT_INVALIDERROR_INVALID_INPUT_PROPERTIESERROR_TRANSACTION_DOES_NOT_EXISTERROR_INVALID_TOKENERROR_TRANSACTION_CANNOT_BE_REVERSEDERROR_INVALID_RESTAURANTInternal server error.
{- "toastTransactionType": "LOYALTY_INQUIRE",
- "searchTransactionInformation": {
- "searchCriteria": {
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "phone": "string"
}
}, - "checkTransactionInformation": {
- "loyaltyIdentifier": "string",
- "orderGuid": "string",
- "check": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string",
- "openedDate": "2019-08-24T14:15:22Z",
- "closedDate": "2019-08-24T14:15:22Z",
- "modifiedDate": "2019-08-24T14:15:22Z",
- "deletedDate": "2019-08-24T14:15:22Z",
- "deleted": true,
- "selections": [
- {
- "guid": "string",
- "entityType": "string",
- "externalId": "string",
- "item": {
- "guid": "string",
- "entityType": "string",
- "multiLocationId": null,
- "externalId": "string"
}, - "itemGroup": {
- "guid": "string",
- "entityType": "string",
- "multiLocationId": null,
- "externalId": "string"
}, - "optionGroup": {
- "guid": "string",
- "entityType": "string",
- "multiLocationId": null,
- "externalId": "string"
}, - "preModifier": {
- "guid": "string",
- "entityType": "string",
- "multiLocationId": null,
- "externalId": "string"
}, - "quantity": 0,
- "unitOfMeasure": "NONE",
- "selectionType": "NONE",
- "salesCategory": {
- "guid": "string",
- "entityType": "string",
- "multiLocationId": null,
- "externalId": "string"
}, - "appliedDiscounts": [
- {
- "guid": "string",
- "entityType": "string",
- "name": "string",
- "discountAmount": 0,
- "nonTaxDiscountAmount": 0,
- "discount": {
- "guid": null,
- "entityType": null
}, - "triggers": [
- null
], - "approver": {
- "guid": null,
- "entityType": null,
- "externalId": null
}, - "processingState": "PENDING_APPLIED",
- "loyaltyDetails": {
- "vendor": null,
- "referenceId": null
}, - "comboItems": [
- null
], - "appliedPromoCode": "string"
}
], - "deferred": true,
- "preDiscountPrice": 0,
- "price": 0,
- "tax": 0,
- "voided": true,
- "voidDate": "2019-08-24T14:15:22Z",
- "voidBusinessDate": 0,
- "voidReason": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "displayName": "string",
- "createdDate": "2019-08-24T14:15:22Z",
- "modifiedDate": "2019-08-24T14:15:22Z",
- "modifiers": [
- { }
], - "fulfillmentStatus": "NEW",
- "taxInclusion": "INCLUDED",
- "appliedTaxes": [
- {
- "guid": "string",
- "entityType": "string",
- "taxRate": {
- "guid": null,
- "entityType": null
}, - "name": "string",
- "rate": 0,
- "taxAmount": 0,
- "type": "PERCENT"
}
]
}
], - "appliedLoyaltyInfo": {
- "guid": "string",
- "entityType": "string",
- "loyaltyIdentifier": "string",
- "vendor": "INTEGRATION",
- "accrualFamilyGuid": "string",
- "accrualText": "string"
}, - "taxExempt": false,
- "displayNumber": "string",
- "appliedServiceCharges": [
- {
- "guid": "string",
- "entityType": "string",
- "externalId": "string",
- "chargeAmount": 0,
- "serviceCharge": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "chargeType": "FIXED",
- "name": "string",
- "delivery": true,
- "gratuity": true,
- "taxable": true,
- "appliedTaxes": [
- {
- "guid": "string",
- "entityType": "string",
- "taxRate": {
- "guid": null,
- "entityType": null
}, - "name": "string",
- "rate": 0,
- "taxAmount": 0,
- "type": "PERCENT"
}
]
}
], - "amount": 0,
- "taxAmount": 0,
- "totalAmount": 0,
- "payments": [
- {
- "guid": "string",
- "entityType": "string",
- "externalId": "string",
- "paidDate": "2019-08-24T14:15:22Z",
- "paidBusinessDate": 0,
- "type": "CASH",
- "cardEntryMode": "SWIPED",
- "amount": 0,
- "tipAmount": 0,
- "amountTendered": 0,
- "cardType": "VISA",
- "last4Digits": "string",
- "originalProcessingFee": 0,
- "server": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "cashDrawer": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "refundStatus": "NONE",
- "refund": {
- "refundAmount": 0,
- "tipRefundAmount": 0,
- "refundDate": "2019-08-24T14:15:22Z",
- "refundBusinessDate": 0
}, - "paymentStatus": "OPEN",
- "voidInfo": {
- "voidUser": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "voidApprover": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "voidDate": "2019-08-24T14:15:22Z",
- "voidBusinessDate": 0,
- "voidReason": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}
}, - "houseAccount": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "otherPayment": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "createdDevice": {
- "id": "string"
}, - "lastModifiedDevice": {
- "id": "string"
}, - "mcaRepaymentAmount": 0
}
], - "tabName": "string",
- "paymentStatus": "OPEN",
- "appliedDiscounts": [
- {
- "guid": "string",
- "entityType": "string",
- "name": "string",
- "discountAmount": 0,
- "nonTaxDiscountAmount": 0,
- "discount": {
- "guid": "string",
- "entityType": "string"
}, - "triggers": [
- {
- "selection": {
- "guid": null,
- "entityType": null,
- "externalId": null
}, - "quantity": 0
}
], - "approver": {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}, - "processingState": "PENDING_APPLIED",
- "loyaltyDetails": {
- "vendor": "INTEGRATION",
- "referenceId": "string"
}, - "comboItems": [
- {
- "guid": "string",
- "entityType": "string",
- "externalId": "string"
}
], - "appliedPromoCode": "string"
}
], - "voided": true,
- "voidDate": "2019-08-24T14:15:22Z",
- "voidBusinessDate": 0,
- "paidDate": "2019-08-24T14:15:22Z",
- "createdDevice": {
- "id": "string"
}, - "lastModifiedDevice": {
- "id": "string"
}
}, - "redemptions": [
- {
- "identifier": "string",
- "selectionGuid": "string",
- "appliedDiscountGuid": "string",
- "multiItemDiscountGuid": "string",
- "amount": 0,
- "itemApplication": [
- {
- "selectionIdentifier": "string",
- "amount": 0,
- "appliedDiscountIdentifier": null
}
], - "quantity": 0
}
]
}, - "reverseTransactionInformation": {
- "loyaltyIdentifier": "string",
- "transactionId": "string",
- "redemptions": [
- {
- "identifier": "string",
- "selectionGuid": "string",
- "appliedDiscountGuid": "string",
- "multiItemDiscountGuid": "string",
- "amount": 0,
- "itemApplication": [
- {
- "selectionIdentifier": "string",
- "amount": 0,
- "appliedDiscountIdentifier": null
}
], - "quantity": 0
}
]
}, - "transferTransactionInformation": {
- "fromLoyaltyIdentifier": "string",
- "toLoyaltyIdentifier": "string"
}
}{- "transactionStatus": "ACCEPT",
- "searchResponse": {
- "accounts": [
- {
- "identifier": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string",
- "pointsBalance": "string"
}
]
}, - "checkResponse": {
- "accountInfo": {
- "identifier": "string",
- "firstName": "string",
- "lastName": "string",
- "phone": "string",
- "email": "string",
- "pointsBalance": "string"
}, - "offers": [
- {
- "identifier": "string",
- "name": "string",
- "applicable": true,
- "selectionType": "CHECK",
- "itemApplication": [
- {
- "selectionIdentifier": "string",
- "amount": 0,
- "appliedDiscountIdentifier": null
}
], - "amount": 0,
- "quantity": 0,
- "expiration": [
- {
- "date": "2019-08-24T14:15:22Z",
- "quantity": null
}
]
}
], - "rejectedRedemptions": [
- {
- "redemption": {
- "identifier": "string",
- "selectionGuid": "string",
- "appliedDiscountGuid": "string",
- "multiItemDiscountGuid": "string",
- "amount": 0,
- "itemApplication": [
- {
- "selectionIdentifier": "string",
- "amount": 0,
- "appliedDiscountIdentifier": null
}
], - "quantity": 0
}, - "message": "string"
}
], - "appliedRedemptions": [
- {
- "identifier": "string",
- "selectionGuid": "string",
- "appliedDiscountGuid": "string",
- "multiItemDiscountGuid": "string",
- "amount": 0,
- "itemApplication": [
- {
- "selectionIdentifier": "string",
- "amount": 0,
- "appliedDiscountIdentifier": null
}
], - "quantity": 0
}
], - "userMessage": "string"
}, - "transferResponse": {
- "loyaltyIdentifier": "string"
}
}