Common data types and responses
These fields are used in multiple operations for both the Account Information and Points Bank APIs.
Amount
Variables indicating the loyalty rewards affected by the transaction.
Field | Description | Sample value | Mandatory? |
---|---|---|---|
value | Amount of loyalty reward, in points, miles, or other program currency | 100.00 | Yes |
currency | The currency in which the redemption was made, such as CAD, USD, POINTS, MILES, and more | USD | Yes |
DeclineReason
Reasons that a transaction would be declined. You can also add custom messaging that would be displayed to the customer.
reasonCode | Description | HTTP status code |
---|---|---|
ACCOUNT_INELIGIBLE | Account not eligible for the current redemption request | 200 |
ACCOUNT_NOT_FOUND | Account for redemption not found | 200 |
COULD_NOT_FIND_THE_ORIGINAL_TRANSACTION | Original transaction could not be found | 200 |
DUPLICATE_TRANSACTION | The redemption request has been previously received | 200 |
INSUFFICIENT_BALANCE | Insufficient balance in the user’s account | 200 |
INVALID_AMOUNT | Redemption amount is not valid | 200 |
INVALID_PROMO_ID | Redemption promo ID is not valid | 200 |
Errors
Information about errors to assist with logging and investigation.
Error responses
Field | Description |
---|---|
status | Failure status |
requestId | Unique request identifier |
errorCode | Error code; see Error codes table for values |
errorMessage | Custom error message |
additionalInfoMap | List of key value pairs |
Error codes
Error code | HTTP status code |
---|---|
ACCOUNT_NOT_FOUND | 4xx |
AUTH_FAILED | 4xx |
BAD_REQUEST | 4xx |
INTERNAL_CONFIGURATION_ISSUE | 5xx |
INVALID_ACCOUNT | 4xx |
INVALID_CREDENTIALS | 4xx |
REQUEST_IN_PROGRESS | 5xx |
RESOURCE_NOT_FOUND | 4xx |
TIMEOUT_ERROR | 5xx |
TIMEOUT_ERROR_CODE | 5xx |
UNKNOWN_ERROR_CODE | 5xx |