Limit available products in an order
This guide will walk you through the steps of limiting the products the recipient can redeem.
Once a recipient clicks on their reward link, they can select which products they would like to spend their credits on, as pictured below. If the products
field is not included when placing an order through the Create Order
endpoint, all the products you're eligible for will be available to the recipient. However, you may add an array of products to this field to limit the products the recipient can choose from.

To choose which products to include in your order, explore WeGift's product catalogue through the List Products endpoint. To use it, first select a country code from our list of supported countries. Calling the List Products
endpoint using the selected country code as a query parameter and your API key as a request header (X-API-Key: <key>
) will return a list of products available to you in the selected country. You cannot combine products from different countries. To quickly try out the endpoint, navigate to the API reference for the List Products endpoint.
An example of a successful response can be found below. Note that the products in this example have different denomination_type
values. A product's denomination type can be either open
or fixed
:
open
products will includeminimum_value
andmaximum_value
fields. This determines the range of gift card values the recipient can redeem. When placing an order, theface_value
of your order items should be at least equal to the minimum values of the products included in your order so that the recipient has enough credits to redeem the gift cards.fixed
products will include aavailable_denominations
field. The recipient can only spend their credits on the product in the listed denominations. In the example below, recipients can only get $5 or $10 Walmart gift cards.
[
{
"code": "AIRBB-CA",
"name": "Airbnb CA",
"image_url": "https://image.com/airbnb.png",
"denomination_type": "open",
"categories": [
{
"code": "travel",
"name": "Travel"
}
],
"minimum_value": 50,
"maximum_value": 500,
"available_denominations": null
},
{
"code": "AMZ-CA",
"name": "Amazon.ca",
"image_url": "https://image.com/amazon.png",
"denomination_type": "open",
"categories": [
{
"code": "department-stores",
"name": "Department Stores"
}
],
"minimum_value": 1,
"maximum_value": 10
},
{
"code": "WMART-CA",
"name": "Walmart CA",
"image_url": "https://image.com/walmart.png",
"denomination_type": "fixed",
"categories": [
{
"code": "department-stores",
"name": "Department Stores"
}
],
"available_denominations": [
5,
10
]
}
]
Once you have explored the available products for a country, include the products you would like to make available for reward in the products
field in the Create Order endpoint. An example of the request body can be found below. Please note that the products must be available in the country selected in items
and all items and products must belong to the same country.
{
"items": [{"country": "CA", "face_value": 50},{"country": "CA", "face_value": 100}],
"idempotency_key": "985b8147-4120-4a05-ae9e-5b7477a6928d",
"card_id": "wg123abc"
"products":["AIRBB-CA", "WMART-CA"]
}
After placing the order, follow the same steps outlined in the guide for making an order to get your reward links. Using our example above, recipients using those links will only be able to get gift cards for Airbnb and Walmart in Canada.
Our next guide will show you how to send reward links to recipients directly via email, thus bypassing the need to get your reward links through our API.
Updated 2 months ago