LoyaltyTransactionResponse

Information about a loyalty transaction from the loyalty provider. The Toast POS system uses this information to complete guests' loyalty transactions.

The set of information in this object depends on the loyalty transaction type. The transaction type is specified in the Toast-Transaction-Type header parameter for the request.

All LoyaltyTransactionResponse objects must include a transactionStatus value. The object must include one of the following additional values depending on the transaction type:

  • LOYALTY_INQUIRE - checkResponse
  • LOYALTY_SEARCH - searchResponse
  • LOYALTY_REDEEM - checkResponse
  • LOYALTY_ACCRUE - checkResponse
  • LOYALTY_REVERSE - none
  • LOYALTY_TRANSFER - transferResponse
object (ResponseCheck)

Response to an inquire, redeem, or accure request. For an inquire response this field is requried. For all other responses it is optional unless any of the redemptions were rejected. If the account corresponding to the identifier was not found, the service should return a 404 response.

object (ResponseSearch)

Response to a search request. Contains the array of account information matching the search criteria. If no matching accounts were found, the service should return a 404 response.

transactionStatus
string

Indicates the result of a loyalty transaction, reported by the loyalty service provider. Possible values are:

  • `ACCEPT` - The loyalty service provider processed the transaction successfully.
  • `ERROR_INVALID_TOAST_TRANSACTION_TYPE` - The requested Toast-Transaction-Type is not valid.
  • `ERROR_ACCOUNT_INVALID` - The loyalty account is not recognized or is not valid at the current restaurant.
  • `ERROR_INVALID_INPUT_PROPERTIES` - The specified JSON properties in the request body are not valid.
  • `ERROR_TRANSACTION_DOES_NOT_EXIST` - The transaction that is being requested to be reversed does not exist. Only occurs on a `LOYALTY_REVERSE` transaction.
  • `ERROR_INVALID_TOKEN` - The token supplied in the `Authorization` header field is invalid or cannot be validated.
  • `ERROR_TRANSACTION_CANNOT_BE_REVERSED` - The specified transaction cannot be reversed. Only `LOYALTY_REDEEM` and `LOYALTY_ACCRUE` transactions can be reversed.
  • `ERROR_INVALID_RESTAURANT` - The restaurant specified by the `Toast-Restaurant-External-ID` is invalid.
  • `ERROR_INVALID_TRANSFER` - The cards that is being requested to be Transfer could not be completed.
Enum: "ACCEPT" "ERROR_INVALID_TOAST_TRANSACTION_TYPE" "ERROR_ACCOUNT_INVALID" "ERROR_INVALID_INPUT_PROPERTIES" "ERROR_TRANSACTION_DOES_NOT_EXIST" "ERROR_INVALID_TOKEN" "ERROR_TRANSACTION_CANNOT_BE_REVERSED" "ERROR_INVALID_RESTAURANT" "ERROR_INVALID_TRANSFER"
object (ResponseTransfer)

Response to a transfer request. For a transfer response this field is required. Contains the loyalty identifier that the old account transferred to.

{
  • "transactionStatus": "ACCEPT",
  • "searchResponse": {
    },
  • "checkResponse": {
    },
  • "transferResponse": {
    }
}