Manage countries and currencies
Do you like to filter your catalog for your recipients based on country and currency? Let's assume you are offering your recipient in France an option to choose from 34 gift cards that can be used in France and three different currencies. Instead of displaying all 34 gift cards side-by-side and confusing your recipients, you can group them by currency.
Wondering what currency to display first as the default currency? Use the GET /rewardCountries
endpoint to determine the preferred currency. In this example, the endpoint returns Euros as the preferred currency for France.
You can also filter and get the reward country data such as the name of the country. You can list the countries that include "united" in their name. The search entry "united" is not case-sensitive. Use the pagination feature to walk through the fill list.
Get a list of countries and their preferred currency
Use the GET {URI}/rewardCountries
endpoint to get a list of countries and their preferred currency.
Function | Purpose |
---|---|
GET {URI}/rewardCountries | Get a list of countries in your catalog. |
Use the following query parameters with this endpoint. Use pagination to go through the list:
Query params | Data type | Description |
---|---|---|
prevCursor | string | The cursor to use for the previous page of results. |
nextCursor | string | The cursor to use for the next page of results. |
maxResults | int32 | The maximum number of results to return. The default is 10, and the maximum is 200. |
countries | string | Comma-separated string of the countries to be queried. |
preferredCurrencies | string | Comma-separated string of the preferred currencies to be queried. Note: We only accept CAD, EUR, GBP, or USD. Only one currency can be specified. Currency can never be changed. The currency defaults to USD if no currency is specified. |
The following example payload is returned when you choose "EUR" as preferredCurrencies
and "3" for maxResults
. If maxResults
is not selected, you will get ten listed. The maximum number of results that can be returned is 200.
{
"prevCursor": null,
"nextCursor": "MTE=",
"prevPageAvailable": false,
"nextPageAvailable": true,
"maxResults": 3,
"items": [
{
"twoLetterCode": "FR",
"threeLetterCode": "FRA",
"countryName": "France",
"preferredCurrency": "EUR"
},
{
"twoLetterCode": "DE",
"threeLetterCode": "DEU",
"countryName": "Germany",
"preferredCurrency": "EUR"
},
{
"twoLetterCode": "IT",
"threeLetterCode": "ITA",
"countryName": "Italy",
"preferredCurrency": "EUR"
}
],
"numberOfElements": 3
}
The possible response codes for this endpoint are:
- 200 OK
- 400 Bad request
Updated 7 days ago