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 5 Current »

Contents:

Overview

Description: This endpoint is used to get the order selection connected with the OTP, to check if the OTP is identified in store.

Requirements: The Get OTP endpoint needs to be called every 2 seconds. If the response of the call contains “status”: “claimed”. Then a new OTP needs to be generated in the app by calling the Create OTP endpoint.

URL: /otp/{otp} (otp is the OTP needs to be used)

Method: GET

Example response:

{
  "updatedAt": "string",
  "createdAt": "string",
  "loyaltyId": "string", // RBI Loyalty Id
  "expiry": 300, // Original setting: after how many seconds, the OTP will be expired, not real-time
  "order": [],
  "otp": "string",
  "restaurantId": "string",
  "status": "claimed", // claimed or pending, used to indicate if the OTP is identified in store
  "transactionId": "string", // RBI Loyalty Transaction Id
  "userDateTime": "string" // // user time in the format like "2024-01-01 12:12:12"
}

Scenario 1: Guest scans code in Kiosk or POS

Steps

App

Kiosk

Loyalty API

Guest opens the app clicks on Loyalty Code Page

Guest sees OTP

n / a

Guest scans OTP in Kiosk

  • Guest sees success message in the app

  • Guest sees a success message and any pre-selected rewards in Kiosk

  • Airtouch polls Get OTP endpoint every 2 seconds and Get OTP endpoint returns status: claimed

  • Airtouch shows success message in the app

  • Before status is “claimed“ the response will always come back as “pending“, in which case there should be no changes to current OTP.

Guest closes success message in the app

  • Guest sees a new OTP in the app

n / a

Guest completes order in the Kiosk and pays

  • Loyalty point balance is update with latest order

  • Guest pays in Kiosk and gets receipt

  • Call Update endpoint with status of “Claimed”

Scenario 2: Guest does not scan OTP and OTP expires

Steps

App

Kiosk

Loyalty API

Guest opens the app clicks on Loyalty Code Page

Guest sees OTP

Guest does not scan OTP and 5 minutes pass by

  • Guest sees an updated OTP automatically

  • Guest does not need to click on any button to see updated OTP

  • Updated OTP is different from initial 6 digit number

  • n / a

  • Airtouch polls Get OTP endpoint and get expiry in seconds of how long OTP will be valid for

  • Time of expiration time of OTP is reached

  • Then, Airtouch calls Create OTP endpoint to show a new OTP in the app automatically

  • No labels