Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Identify (POST)

Use Case: Successfully identify the loyalty user along with any potential rewards/offers that they had pre-selected within the app.

Endpoint URL: https://{reg}-{env}-{brand}-loyalty-middleware.rbictg.com/loyalty/identify

Variation: Unlike US markets, EMEA markets will need Loyalty to support cart level discount offers or rewards such as 10% off or $10 off. In order to tell the Kiosk what they need to discount, we will provide an eligibleDiscounts field for the response. This will contain the type of discount (% or value amount), and the actual amount, i.e 10 | 20, etc.

Expected Request Payload:

{
    "identifier": "$6digitCode or $loyaltyId",
     "posVendor": {
        "operator": "$operatorId",
        "posType": "$posVendorName",
        "storeId": "$rbiStoreId",
        "supportingPos": "POS vendor name (optional field)", // vendor to return plu for
        "terminal": "$terminalNumber",
        "transactionId": "$posTransactionId"
    }
}

Expected Response Payload:

{
    "balances": [
        {
            "amount": 14464,
            "currency": "points"
        }
    ],
    "eligibleDiscounts": [
        {
            "details": {
                "displayName": "20% off order",
                "discountValue": 20,
                "subtype": "PERCENTAGE_DISCOUNT or AMOUNT_DISCOUNT",
                "type": "OFFER or REWARD"
            },
            "incentiveId": "$sanityIncentiveId",
            "productId": "$incentivePlu",
            "referenceId": "$incentiveLoyaltyId"
        }
    ],
    "loyaltyUser": {
        "created": "2021-08-10T12:18:39.180Z",
        "id": "$loyaltyUserId",
        "name": "$loyaltyUserName"
    },
    "order": [],
    "transactionId": "$loyaltyTransactionId"
}

 

Transaction Update (PUT) - Claim / Commit

Use Case: Kiosk sends this transaction request with the order details to update the loyalty transaction. If the Kiosk states this transaction should be claimed, this will result in the user earning and redeeming eligible points.

Endpoint URL: https://{reg}-{env}-{brand}-loyalty-middleware.rbictg.com/loyalty/transaction/pos/{loyaltyTransactionId}

Variation: If we responded w/ eligibleDiscounts in the identify step, we expect Kiosk to send us an appliedDiscounts field to specify that the discount has actually been applied. In addition, we will also expect Kiosk to already apply the discount when calculating each line entry’s price. This means if a 10% discount was applied, the price of each entry should have 10% less than their actual value, and if a $10 discount was applied, each line entry’s price should have an equal portion of $10 deducted. We will respect any exemptions that the Kiosk makes, i.e If a Kiosk states they don’t want to discount alcohol line entries, there will be no validation or assertions done on Loyalty side to block this from happening.

Expected Request Payload:

{
    "channel": "Restaurant",
    "created": "2021-05-04T13:39:47Z",
    "loyaltyId": "$loyaltyUserId",
    "serviceMode": "$serviceMode",
    "status": "CLAIMED",
    "transactionDetails": {
        "appliedDiscounts": [
            {
                "details": {
                    "displayName": "20% off order",
                    "discountValue": 20,
                    "subtype": "PERCENTAGE_DISCOUNT or AMOUNT_DISCOUNT",
                    "type": "OFFER or REWARD"
                },
                "incentiveId": "$sanityIncentiveId",
                "productId": "$incentivePlu",
                "referenceId": "$incentiveLoyaltyId"
            }
        ],
        "currency": "USD",
        "order": [
            {
                "name": "med whopper combo",
                "price": 4.00,
                "productId": "$plu",
                "productType": "combo",
                "quantity": 1,
                "referenceId": "3",
                "tax": 0
            },
            {
                "name": "whopper",
                "parentReferenceId": "1",
                "price": 0,
                "productId": "$plu",
                "productType": "item",
                "quantity": 1,
                "referenceId": "4",
                "tax": 0
            },
            {
                "name": "med fries",
                "parentReferenceId": "1",
                "price": 0,
                "productId": "$plu",
                "productType": "item",
                "quantity": 1,
                "referenceId": "5",
                "tax": 0
            }
        ],
        "payments": [
            {
                "amount": 500,
                "type": "$paymentMethod",
                "ccToken"?: "$panToken"
            }
        ],
        "posVendor": {
            "operator": "$operatorId",
            "posType": "$posVendorName",
            "storeId": "$rbiStoreId",
            "supportingPos": "POS vendor name (optional field)", // vendor to return plu for
            "terminal": "$terminalNumber",
            "transactionId": "$posTransactionId"
        }
    },
    "transactionId": "$loyaltyTransactionId"
}

Expected Response Payload:

{
    "loyaltyId": "$loyaltyUserId",
    "points": 14464,
    "pointsEarned": 50,
    "pointsRedeemed": 750,
    "transactionId": "$loyaltyTransactionId"
}

 

  • No labels