Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

Code Block
{
    "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"OFFER or REWARD"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"
}

...