Public
The commerce's data and the benefit catalog with no token at all, to show the program to a visitor.
Endpoints that require no token at all, only the X-Commerce-Id header.
They exist to show your loyalty program to a visitor who has not signed in yet: the branding in the header and the reward catalog, so they can see what they get by joining.
X-Commerce-Id: {your-commerce-id}The endpoints
Commerce data
Name, logo, brand color and category, to paint the header.
Benefit catalog
The commerce's live benefits.
After sign-in there is no need to ask again
Once the user signs in, the same data comes back through the My account endpoints:
| Signed out | Signed in |
|---|---|
GET /v1/public/commerce | Comes inside GET /v1/me |
GET /v1/public/benefits | GET /v1/me/benefits/available |
In practice: use the public ones for the welcome screen, and switch to the My account ones as soon as there is a session.
X-Commerce-Id is not a secret
It goes in the frontend without a problem. What it does is scope the response to your commerce, not authorize access.