Benefits I can buy
The commerce's catalog of live benefits that the user can buy with their points.
GET/v1/me/benefits/availableEnd-user token
The commerce's catalog of live benefits, which the user can buy with their points.
To know which ones they can afford, compare each benefit's cost with the
points from GET /v1/me. The API does not
filter by balance: it returns the catalog and the UI decides what to show as
reachable and what as "you need N more points".
Headers
X-Commerce-IdintegerheaderrequiredId of the commerce integrating the API. Every response is scoped to this commerce.
Response
An array of Benefit.
curl https://loybox-public-api-752998171300.southamerica-west1.run.app/v1/me/benefits/available \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "X-Commerce-Id: 87"// 200 OK
[
{
"id": "b_9f2a",
"type": "percentage_discount",
"description": "20% de descuento en toda la tienda",
"cost": 250,
"expiration": "2026-12-31T23:59:59Z",
"benefit_type": "normal",
"color": "#f1a10d",
"buy_limit": 0,
"prize": {
"type": "percentage_discount",
"title": "20% off",
"description": "Válido en toda la tienda",
"value": 20,
"product": null,
"expiration": "2026-12-31T23:59:59Z",
"image": null
},
"tiendanube_coupon": null
}
]Each item's id is what you send as benefit_id to
buy a benefit.
Without a session, the same catalog is public
To show the catalog to a visitor who has not signed in yet there is
GET /v1/public/benefits, which needs no
token.
Errors
| Code | When |
|---|---|
401 | The access token is missing, expired, or does not belong to an end user. |
422 | The X-Commerce-Id header is missing. |