Benefit catalog

The commerce's live benefits, with no token needed.

GET/v1/public/benefitsNo token

The commerce's live benefits, with no token needed.

It exists to show the loyalty program to a visitor who has not signed in yet: the shop window of rewards that answers "what do I get if I join?".

Headers

X-Commerce-Idintegerheaderrequired

Id 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/public/benefits \
  -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
  }
]

With a session, use the My account one

Once signed in it is better to use GET /v1/me/benefits/available, which is the same catalog but already filtered by what the commerce enabled for that user.

Errors

CodeWhen
400The commerce's benefits could not be fetched.
422The X-Commerce-Id header is missing.