v1

latestOpenAPI 3.0.32026-07-243003151.2 MB
Accounts

Earn Loyalty Points

This API method allows the calling application to credit Points into Wallet Account and create a Wallet Account Transaction (with event=EARN) within EES AIR. Currently available for POINTS accounts only. Please note this endpoint accepts one of two mutually exclusive Request Payload structures: one with explicit balance structure (the calling application need to provides explicit balance names and amounts), second one for instructing AIR to credit Points for an Account with the amounts calculated by EES AIR (referenced Point Schema Earn definitions(s) would be the base for this calculation)

patch/wallet/{walletId}/account/{accountId}/earn

Path parameters

walletIdstring string required

EES AIR Wallet ID

accountIdstring string required

EES AIR Wallet Account ID

Request body

totalTransactionValueinteger

Monetary Value of a Transaction for which AIR should calculate and credit amount of points

rateNamestring string

Optional rate name to be used for amount of points calculation, if not specified default will be used

Example request

{
  "details": {
    "details": {
      "key1": "Value1",
      "key2": "AnotherValue"
    }
  }
}

Response

OK

accountTransactionIdstring

The account transaction id.

accountIdstring

The account id related to this transaction.

parentAccountTransactionIdstring

The parent account transaction.

event'CREATE' | 'REDEEM' | 'UNLOCK' | 'UNREDEEM' | 'VERIFY' | 'ACTIVATE' | 'INACTIVATE' | 'REACTIVATE' | 'LOAD' | 'CREDIT' | 'DEBIT' | 'BALANCE' | 'INVALIDATE' | 'BLOCK' | 'UNBLOCK' | 'RESEND' | 'STOLEN' | 'CANCEL' | 'VOID' | 'REISSUE' | 'REFUND' | 'TRANSFER' | 'TRANSFER_IN' | 'TOPUP' | 'AUTOTOPUP' | 'STAMP' | 'SPEND'

The type of transaction.

valueinteger

The value related to this account transaction. Typically, if an account transaction like credit was executed with a value, then this value will be stored here. For Continuity, however, this value should always be 0, and the same for Coupon (since there is no value for a coupon).

sourcestring

The source of this transaction e.g. from a client, or automated.

transactionDetailsobject

An simple object of key value pairs representing the transaction details. For Points and Continuity, this can contain a JSON encoded object with the details of the amounts applied to each balance.

propertiesobject

Properties related to the account transaction.

dateCreatedstring

Date this account transaction was created

lastUpdatedstring

Date this account transaction was last updated

Example response

{
  "dateCreated": "2017-01-17T13:20:48+00:00",
  "lastUpdated": "2017-01-17T13:20:48+00:00",
  "children": [
    {
      "dateCreated": "2017-01-17T13:20:48+00:00",
      "lastUpdated": "2017-01-17T13:20:48+00:00"
    }
  ],
  "rewardAccounts": [
    {
      "dateCreated": "2017-01-17T13:20:48+00:00",
      "lastUpdated": "2017-01-17T13:20:48+00:00"
    }
  ]
}