Retrieve list of products
GET/api/rewards/products
Retrieve a list of products. These should be presented to the user, as choices, when the latter claims their rewards. Pass userId to also get, per product, whether the user's current balance can be claimed as it (claimable) and how much more they need to earn to reach its minimum (amountToUnlock).
Request
Query Parameters
Id of the user. When given, each product says whether this user's balance can be claimed as it.
Responses
- 200
- 401
- 403
- 404
- 500
List of products to display to the user as choices for claiming the reward.
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
Id of the product. Same value as productId, kept for existing callers.
Id of the product, passed back as the product parameter when claiming.
Name of the product
Available currencies for this product
List of countries in which this product is available to recipients.
Detailed description of the product.
Legal disclosures for this product. Can be in HTML format.
Possible values: [bank, charities, merchant_cards, paypal, visa]
images
object[]
List of product images associated with this product (e.g. logos or images of the gift cards).
URL to this image
Type of image
Smallest amount the provider accepts for this product. Null if the provider does not publish one.
Largest amount the provider accepts for this product. Null if the provider does not publish one.
Currency of minAmount and maxAmount.
Whether the user's current balance can be claimed as this product. Null when no userId was given.
How much more the user must earn before this product's minimum is reached. 0 when already reached. Null when no userId was given.
[
{
"id": "string",
"productId": "string",
"name": "string",
"currencyCodes": [
"string"
],
"countries": [
"string"
],
"description": "string",
"disclosure": "string",
"category": "bank",
"images": [
{
"src": "string",
"type": "string"
}
],
"minAmount": 0,
"maxAmount": 0,
"currency": "string",
"claimable": true,
"amountToUnlock": 0
}
]
Authorization error e.g. due to an invalid or missing API keys.
Forbidden. Possible error codes
-
ERROR_NO_PERMISSIONS_TO_RESOURCE
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
User not found. Possible error codes
-
ERROR_USER_NOT_FOUND
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}
Error fetching products because of remote call issues. Other Internal errors. Possible error codes
-
INTERNAL_SERVER_ERROR
-
ERROR_FETCHING_REWARDS_PRODUCTS
- application/json
- Schema
- Example (from schema)
Schema
Error code
A verbose error message
{
"error_code": "string",
"error_message": "string"
}