Contents
Purpose
This endpoint is used to identify a guest who scans an identifier generated by the RBI app (which could be an OTP or the Loyalty ID) at a client device (typically a POS or Kiosk terminal). OTP is always allowed, but Loyalty ID’s may or may not be allowed depending on configuration.
Request Format
Endpoint
POST /loyalty/v2/identify
Headers
Bearer token in JWT format as specified in /wiki/spaces/IN/pages/3739288100.
Body
identifier
<string>: OTP (6 digit code) or Loyalty ID in UUID format.location
: object identifying the location the guest is identifying from.storeId
<integer>: uniquely identifies the store where the guest is identifying from.terminalId
<string> (optional): identifies the POS or Kiosk terminal used in the restauranthasLoyalty
<boolean> (optional): defaults totrue
. If false, then no points will be earned or burned for transaction and no rewards can be ordered.
content
<boolean> (optional): whether the endpoint should return the list of offers and rewards that are visible to this guest. Defaults tofalse
.
Example request
POST /loyalty/v2/identify { "identifier": "123456", "location": { "storeId": "9999", "terminalId": "0", "hasLoyalty": true }, "content": true }
Second request
PUT /loyalty/v2/identify { "identifier": "123456", "transactionId": xxx }
Response Format
Success response body
transactionId
<UUID>: unique identifier of the loyalty transaction created.
balances
: object that indicates loyalty balance of the user's accountamount
<number>: this represents the number of loyalty points the user has. If this QR code was pre-selected with rewards, then this number already has those loyalty points temporarily deducted from total user’s loyalty points balance.currency
<string>: this represents the currency the above amount. Normally set to "points".
loyaltyUser
: object that indicates information about this loyalty usercreated
<string>: string that represents that date and time user loyalty account was createdid
<string>: Loyalty ID of the user in UUID formatname
<string>: name of the user that was saved upon account creation.
order
: an array that includes objects with the below fields for each product that is in the order basket.productId
<string>: PLU of the product that was pre-selected in the app. This can be an offer or a reward.quantity
<number>: the amount of the above product that is in the loyalty order.price
<number>: the price of the productproductType
<string>: the type of product. In this case it would either beREWARD
orOFFER
referenceId
<string>: unique line ID of the product
content
: array that indicates all the offer and reward content available for that markettitle
<string>: title of the reward or offer as was set in Sanity.description
<string>: description of the reward or offer as was set in Sanity.moreInfo
<string>: disclaimer of the reward or offer as was set in Sanity.image
<link>: url of the image of the reward or offer as was set in Sanity.plu
<string>: PLU of the reward or offer as was set in Sanity for the pos vendor of the integrationrules
: array containing all rules inside offer or reward if applicable (e.g. 200 loyalty points needed to use the reward, offer only available on Wednesdays)
Success response example
{ "transactionId": "f4190848-169d-4c69-9f53-f916318c432b", // uuid of the loyalty order/transaction "balances": [ { "amount": 14464, "currency": "points" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "4711fc2a-3a8f-414f-a9e7-44dd5231dca7", "name": "Farhan" }, "order": [ { "productId": "2244", "quantity": 1, "price": 0, "productType": "REWARD", "referenceId": "01", }, { "productId": "6688", "quantity": 1, "price": 500, "productType": "OFFER", "referenceId": "02", }, ], "content": [ { "title": "Small Fries Reward", "description": "Order this reward and get free small fries", "moreInfo": "Contains allergens", "image": "https://cdn.sanity.io/images/czqk28jt/staging_bk_gb/fc7c2a73e7a9bf14f3e3401bedcc090c4f421c67-1333x1333.png", "plu": "8810", "rules": [ { "type": "loyaltyPoints", "points": 200, } ], }, { "title": "MEAT FREE MONDAYS VEGAN ROYALE", "description": "Vegan Royale for just £2.99. Only on Mondays. Use app code APP903 if using a kiosk.", "moreInfo": "Not valid in conjunction with any other offer. One voucher per transaction. Valid only in the UK. Subject to availability. Voucher valid at participating restaurants only. Not valid at Burger King motorway service locations, airports train stations and holiday parks. © 2023 Burger King Europe GmbH. All rights reserved.", "image": "https://cdn.sanity.io/images/czqk28jt/prod_bk_gb/aae9c1303b7cea013c984ee647ed7898ce6cfce9-1000x850.png", "plu": "9920", "rules": [ { "type": "day-of-week-band" friday:false monday:true saturday:false sunday:false thursday:false tuesday:false wednesday:false }, { "type": "service-mode-restrictions" CATERING_DELIVERY:true CATERING_PICKUP:true CURBSIDE:true DELIVERY:false DRIVE_THRU:true EAT_IN:true TABLE_SERVICE:true TAKEOUT:true }, { "type": "limit" interval:day maximumRedemptions:1 }, ], }, ] }
Error responses
All error responses use the standard Error Responses format.
HTTP
400 (Bad Request)
if the request body has an incorrect format. In this case, the response will include details about which specific field or fields have an incorrect format.HTTP
401 (Unauthorized)
if the bearer token is missing or not valid.HTTP
403 (Forbidden)
: if the specifiedidentifier
is not valid.HTTP
404 (Not Found)
: if the specifiedstoreId
was not found.