Get a benefit
The data of a catalog benefit, by its benefit_id.
GET/v1/benefits/{benefit_id}Commerce API key
Returns information about a catalog benefit using its id.
This endpoint redeems nothing
The benefit_id identifies a catalog benefit, not one belonging to a specific
member. To look up the benefit a member brings in to use, the identifier is the
client_benefit_code and the endpoint is
look up a code.
Parameters
benefit_idstringpathrequiredThe benefit's id.
Response
A Benefit object.
curl https://loybox-public-api-752998171300.southamerica-west1.run.app/v1/benefits/b_9f2a \
-H "Authorization: Bearer $LOYBOX_API_KEY"// 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
}Errors
| Code | When |
|---|---|
401 | The API key is invalid: it has no commerce attached. |
404 | The benefit does not exist. |
422 | The id is not a valid format. |