Loyalty Management POS API Powered by MuleSoft
Restaurants
Use Loyalty Management Restaurants POS Integrations API to provide a seamless dining experience to your loyalty program members. Instead of creating different APIs for each loyalty action, this integration contains a single API with these enum values to choose the API request:
- LOYALTY_SEARCH
- LOYALTY_INQUIRE
- LOYALTY_REDEEM
- LOYALTY_ACCRUE
To add or modify these enum values, modify the post:\loyalty-integrations\restaurants\pos:application\json:loyalty-management-api-config
flow in the loyalty-management-api.xml
file.
This workflow explains the flow of the Loyalty Management Restaurant POS API:
Search for a Member
POST /loyalty-integrations/restaurants/pos
Request
Headers
Transaction-Type
String Required
The type of transaction.
Enum value:
LOYALTY_SEARCH
Transaction-GUID
String
The identifier that helps to uniquely identify a transaction across the integration.
Authorization
String Required
Alphanumberic token to authorize the request.
Body
Media type: application/json
loyalty-search:
{
"transactionType":"LOYALTY_SEARCH",
"searchTransactionInformation":{
"searchCriteria":{
"firstName": "Greg",
"lastName": "",
"email": "",
"phone": "14200000000"
}
}
}
Response
loyalty-search:
{
"searchResponse": {
"accounts": [
{
"identifier": "24345677",
"firstName": "Greg",
"lastName": "Thompson",
"phone": "14200000000",
"email": "gregthompson@sfloyaltymanagementdemo.org"
}
]
},
"transactionStatus": "ACCEPT"
}
Inquire Member Vouchers
Retrieves member profile details and the assigned vouchers.
POST /loyalty-integrations/restaurants/pos
Request
Headers
Transaction-Type
String Required
The type of transaction.
Enum value:
LOYALTY_INQUIRE
Transaction-GUID
String
The identifier that helps to uniquely identify a transaction across the integration.
Authorization
String Required
Alphanumberic token to authorize the request.
Body
loyalty-inquire-request:
{
"transactionType": "LOYALTY_INQUIRE",
"checkTransactionInformation": {
"loyaltyIdentifier": "24345677",
"check": {
"guid": "9d2dee33-7803-485a-a2b1-2c7538e597ee",
"entityType":null,
"paymentStatus": "OPEN",
"amount": 97.42,
"taxExempt": false,
"totalAmount": 103.51,
"selections": [
{
"guid": "5e4fa4aa-4269-4383-9bbd-774591bbfb3c",
"entityType": null,
"externalId": null,
"fulfillmentStatus": "NEW",
"item": {
"guid": "5abf524e-31b5-4c1b-a797-7a44d888d071",
"entityType": "MenuItem",
"externalId": "100000000100004071"
},
"quantity": 8
}
]
}
}
}
Response
loyalty-inquire-response:
{
"checkResponse": {
"accountInfo": {
"identifier": "24345677",
"firstName": "Greg",
"lastName": "Thompson",
"email": "gregthompson@sfloyaltymanagementdemo.org"
},
"offers": [
{
"identifier": "0kDHu000000QiyqMAC_00000006_HLDY2002SEAS",
"name": "HLDY2002SEAS",
"applicable": true,
"selectionType": "CHECK",
"amount": 19.4840,
"quantity": 1,
"expiration": [
{
"date": "2023-12-21T00:00:00Z",
"quantity": 1
}
],
"itemApplicable": []
}
],
"rejectedRedemptions": [],
"appliedRedemptions": [],
"userMessage": "Visit https://salesforce.com for exciting offers!"
},
"transactionStatus": "ACCEPT"
}
Redeem Member Vouchers
Redeems a voucher for a loyalty program member.
POST /loyalty-integrations/restaurants/pos
Request
Headers
Transaction-Type
String Required
The type of transaction.
Enum value:
LOYALTY_REDEEM
Transaction-GUID
String
The identifier that helps to uniquely identify a transaction across the integration.
Authorization
String Required
Alphanumberic token to authorize the request.
Body
loyalty-redeem-request:
{
"transactionType":"LOYALTY_REDEEM",
"checkTransactionInformation":{
"loyaltyIdentifier": "24345677",
"check": {
"guid":"9c1opk33-7803-485a-a2b1-2c7538e597ee",
"entityType":"Check",
"selections":[]
},
"redemptions": [
{
"identifier": "0kDHu000000QiyqMAC_00000006_HLDY2002SEAS",
"amount": 19.24
}
]
}
}
Response
loyalty-redeem-response:
{
"transactionStatus": "ACCEPT",
"checkResponse": {
"accountInfo": {
"identifier": "24345677",
"firstName": "Greg",
"lastName": "Thompson",
"email": "gregthompson@sfloyaltymanagementdemo.org"
},
"rejectedRedemptions": [],
"appliedRedemptions": [
{
"amount": 19.24,
"identifier": "0kDHu000000QiyqMAC_00000006_HLDY2002SEAS",
"itemApplication": []
}
],
"userMessage": "Visit https://salesforce.com for exciting offers!"
}
}
Create Accrual Order
Creates accrual order after the member pays the bill at the restaurant.
POST /loyalty-integrations/restaurants/pos
Request
Headers
Transaction-Type
String Required
The type of transaction.
Enum value:
LOYALTY_ACCRUE
Transaction-GUID
String
The identifier that helps to uniquely identify a transaction across the integration.
Authorization
String Required
Alphanumberic token to authorize the request.
Body
loyalty-accrue-request:
{
"transactionType": "LOYALTY_ACCRUE",
"searchTransactionInformation": null,
"checkTransactionInformation": {
"loyaltyIdentifier": "24345677",
"check": {
"guid":"9d2dee33-7803-485a-a2b1-2c7538e597ee",
"entityType":"Check",
"externalId":null,
"displayNumber":"183",
"payments":[
{
"guid":"8b251345-3cda-486e-91c9-cd760c6087c6",
"entityType":"OrderPayment",
"houseAccount": null,
"amount":8,
"tipAmount":0,
"amountTendered":9,
"type":"CASH",
"paidDate":"2019-04-08T21:16:46.738Z",
"paymentStatus":"CAPTURED"
}
],
"paymentStatus":"CLOSED",
"amount":8,
"openedDate":"2023-11-21T08:16:45.862Z",
"selections":[
{
"guid":"c3283098-44c1-4712-866a-2b53cdc39w25",
"entityType":"MenuItemSelection",
"externalId":null,
"fulfillmentStatus":"SENT",
"selectionType":"NONE",
"price":8,
"quantity": 1,
"item":{
"guid":"859d3db8-9dd4-42ab-9f6a-374d09e27825",
"entityType":"MenuItem",
"externalId":null
},
"createdDate":"2019-04-08T21:16:46.345Z"
}
],
"closedDate":"2019-04-08T21:16:46.767Z"
}
}
}
Response
loyalty-accrue-response:
{
"transactionStatus": "ACCEPT"
}