v1

latestOpenAPI 3.0.32026-07-243003151.2 MB
Services

Exchange Points for Reward

This API method allows the calling application to perform a Reward Bank exchange. Exchange means a Consumer will receive a specific reward as per Rewards Bank definition. For example: receive a two for one COUPON in exchange for 150 loyalty points (reward cost), after reaching or exceeding 170 points current balance (reward threshold)). If for any reasons this operation fails, EES AIR would perform a Rollback operation, so Consumer Account's will be restored to the state before this API call. Most typical causes why an exchange could fail could be linked to Reward's complex configuration (e.g. Campaign's Issuance limits or Issuance Windows) Returned error code and an error message would explain why this exchange call failed.

Please note:

  • by default for Loyalty Points Accounts, EES AIR allows exchanges of an amount larger than the account's available balance, which would result in a negative balance. This could be mitigated by EES Scheme settings:
    • Disable 'allow negative balance'
    • Enable 'AUTOTOPUP' - EES AIR will detect these negative balances and instantly correct them by bringing a balance to zero (and creating a corresponding Account Transaction of type 'AUTOTOPUP').
  • ROLLBACK would leave traces in EES AIR in the form of VOIDED Wallet Transaction and VOIDED Wallet Account Transaction. If for any reasons Rollback mechanism fails, this endpoint would return the HTTP 207 (Multi-Status) header with all details, allowing to rectify this situation. If for any reasons Rollback mechanism fails, this endpoint would return the HTTP 207 (Multi-Status) header with all details, allowing to rectify this situation.

If the Reward Bank has an Exchange Limit set against it then the number of exchanges will be checked. The call will fail with an ELE Exchange Limit Exceeded error if the limit has been reached.

  • For PUBLIC Reward Banks the number of exchanges is counted against the calling walletId.
  • For PRIVATE Reward Banks the number of exchanges is counted against an active Wallet Link for the Reward Bank.

If multiple active Wallet Links exist between the same Personal Reward Bank and Wallet and are both valid for the same Reward then each link can be used up to the Exchange Limit before being marked as USED. EES AIR automatically selects the link expiring the soonest first, then the link most specific to the Reward being exchanged.

post/services/wallet/{walletId}/transaction/exchange/pointsreward

Path parameters

walletIdstring string required

EES AIR Wallet ID

Request body

accountIdstring string required

EES AIR Account ID

pointsRewardBankIdstring string required

EES AIR Reward Bank ID

pointsRewardBankRewardIdstring string required

EES AIR Reward Bank Reward ID

locationobject

This optional Request attribute allows to override a location arisen from a used API KEY to specify exactly in which Outlet this transaction has happened

Example request

{
  "accountId": "1178",
  "pointsRewardBankId": "55637",
  "pointsRewardBankRewardId": "222333444",
  "walletTransaction": {
    "state": "A_STATE",
    "reference": "An exchange Wallet Transaction reference",
    "meta": {
      "key": "Value"
    }
  },
  "exchangeAccountTransaction": {
    "details": {
      "key1": "Key 1 Value"
    }
  },
  "createAccountTransaction": {
    "state": "BASIC",
    "meta": {
      "accountMeta1": "foo-bar"
    },
    "details": {
      "foo": "bar"
    }
  },
  "location": {
    "storeId": "32432"
  }
}

Response

Created

walletTransactionIdstring

Wallet Transaction ID

parentWalletTransactionIdstring

Parent Wallet Transaction ID

walletIdstring

Wallet ID

referencestring

Calling party's reference to this transaction

transactionDateTimestring

Calling party's Transaction Date Time

identityIdstring

Wallet Identity ID used for this transaction.

typestring

Wallet Transaction Type

status'ACTIVE' | 'SETTLED' | 'EXPIRED' | 'CANCELLED' | 'DELETED' | 'PURGED'

Wallet Transaction status

statestring

Wallet Transaction state

expiryDatestring

Wallet Transaction Expiry Timestamp (date-time), when transaction should expiry and automatically be settled.

channelstring

Channel used for Transaction creation or update

dateCreatedstring

Date this Wallet Transaction was created

lastUpdatedstring

Date this Wallet Transaction was last updated