[BK ES Migration] Loyalty API - V1 Current

This is the current version we recommend using for Loyalty API integration for both POS and Kiosk vendors. This supports multi-scanning and showing offers on the Kiosk UI.

Brands and markets want either their pre-existing or new kiosk implementations to work within the in-store loyalty experience. The kiosk user experience will have some slight nuances that we need to account for relating to the Loyalty APIs how Kiosks integrate with them.

Desired Kiosk User Flow

  1. User identifies themselves as a loyalty user at kiosk using identification mechanism (i.e. 6-digit short, code, QR code, etc.)

    1. The identification may include pre-selecting rewards and/or offers within the app similar to the in-store loyalty experience

  2. Upon successful identification:

    1. Any pre-selected rewards and/or offers are injected into the Kiosk order

    2. User’s information is populated within the Kiosk (i.e. name, points balance)

  3. User is able to proceed with placing their order by selecting desired items/combos

  4. User is able to browse and select additional rewards they wish to redeem

    1. Kiosk will display rewards based on user’s available point balance

  5. User completes order at Kiosk

  6. User picks up food at pick-up counter

 

General API Guidelines

Region {reg} variables:

  • euc1 EU Timezone Markets

  • apse1 APAC Timezone Markets

  • euw3 Iberia Timezone Market

Environment {env} variables:

  • dev

  • staging

  • qa

  • prod

Brand {brand} variables:

  • bk

  • plk

  • fhs

All API requests should include the following in the header:

  • x-region field. The value passed in this field should be the 2-character iso country code.

  • x-api-key field. The value passed in this field will be an environment, vendor and brand specific API key.

  • x-user-datetime field. The value passed in this field should be the local iso datetime string.

Endpoints

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

Expected Request Payload:

{ "identifier": "example@domain.com" OR "123456", "posVendor": { "operator": "300", // operator id "supportingPos": "POS vendor name (optional field)" // vendor to return plu for "posType": "Kiosk vendor name", "storeId": "9999", "terminal": "0", // terminal id "transactionId": "000000000257" // vendor transaction id } }

Expected Response Payload when LD-EMAIL Flag is OFF:

{ "balances": [ { "amount": 14464, "currency": "points" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "4711fc2a-3a8f-414f-a9e7-44dd5231dca7", "name": "Farhan" }, "order": [ { "productId": "Reward PLU", "incentiveId": "Sanity ID of Reward" "quantity": 1, "price": 0, "productType": "reward", "referenceId": "00", // unique line id }, { "productId": "Offer PLU", "incentiveId": "Sanity ID of Offer" "quantity": 1, "productType": "offer", "referenceId": "00", // unique line id }, ], "transactionId": "f4190848-169d-4c69-9f53-f916318c432b" // uuid of the loyalty order/transaction }

 Expected Response Payload when LD-EMAIL Flag is ON:

{ "balances": [ { "amount": 14464, "currency": "points" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "4711fc2a-3a8f-414f-a9e7-44dd5231dca7", "name": "Farhan", "email": "example@domain.com" }, "order": [ { "productId": "Reward PLU", "incentiveId": "Sanity ID of Reward" "quantity": 1, "price": 0, "productType": "reward", "referenceId": "00", // unique line id }, { "productId": "Offer PLU", "incentiveId": "Sanity ID of Offer" "quantity": 1, "productType": "offer", "referenceId": "00", // unique line id }, ], "transactionId": "f4190848-169d-4c69-9f53-f916318c432b" // uuid of the loyalty order/transaction }

Transaction Validation (POST)

Use Case: Kiosk sends the Loyalty API a preliminary version of the user’s order so that the Loyalty Platform can evaluate the order and determine if the user meets eligibility requirements of any included incentives (Rewards or Offers). This request should be an exact mirror of what the POS expects to send when they actually claim the transaction.

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

Expected Request Payload:

Expected Response Payload:

Expected Error Response:

 

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}

Expected Request Payload:

Expected Response Payload:

 

Unclaimed Transaction (POST)

Use Case: Kiosk sends a request to Loyalty even when a user does not identify w/ the Loyalty program. This allows us to still create a transaction for the purpose of metrics, analytics, and potentially receipt code claiming

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

Expected Request Payload:

Expected Response Payload:

 

Void Transaction

Use Case: Loyalty transaction needs to be voided/refunded.

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

 Expected Request Payload:

Expected Response Payload: