v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Simulation transaction add

Lets you perform the simulation of the Transaction Add.

post/simulation/transactions

Query parameters

identifierName'mobile' | 'email' | 'externalId' | 'id' | 'wechat' | 'martjackId' | 'fbId' | 'cardnumber' | 'cardExternalId' required

Pass any of the registered identifier name of the customer.

identifierValuestring required

Pass the respective identifier value.

Headers

X-CAP-DIRECT-REPLAYboolean

Pass true to add the call to the event execution queue (reply event) - in this case, transaction is added and other events will be executed later. Pass false to directly execute the event.

Request body

type'REGULAR' | 'RETURN' | 'MIXED' required
billAmountnumber float required

Bill Amount is the net transaction value.

billNumberstring required

Bill Number

Response

200

Example response

{
  "sideEffects": [
    {
      "entityType": "USER",
      "rawAwardedPoints": 14586.4,
      "awardedPoints": 14586,
      "type": "points"
    }
  ],
  "simulatedPointsBreakup": {
    "eventName": "TransactionAdd",
    "eventDetails": {
      "maxConversionDate": "2024-10-09 00:00:00.0",
      "eventTime": "2023-10-09 11:42:49.680",
      "tillId": 13555163
    },
    "billDetails": {
      "type": "loyalty",
      "billNumber": "660TRE009110812",
      "billAmount": 1440,
      "pointsEarned": {
        "promised": [
          {
            "value": 100,
            "conversionDate": "2024-10-09 00:00:00.0",
            "programId": 2202,
            "programName": "Lotte Hotels Loyalty Program"
          }
        ]
      },
      "lineItems": [
        {
          "id": 5291920451004507000,
          "itemCode": "STAY123",
          "amount": 1400,
          "rate": 1400,
          "qty": 1,
          "pointsEarned": {
            "regular": [
              {
                "value": 14000,
                "expiresOn": "2026-10-31 23:59:59.999",
                "programId": 2202,
                "programName": "Lotte Hotels Loyalty Program",
                "expiryType": "fixed"
              }
            ]
          }
        }
      ]
    },
    "extendedFields": [
      {
        "name": "room_nights_count",
        "value": "3"
      }
    ],
    "pointInTimeSlabs": [
      {
        "pointInTimeSlabNumber": 1,
        "pointInTimeSlabName": "CLASSIC LEVEL",
        "programId": 2202
      }
    ]
  }
}