GET /trending/loyalty
Fetch the user's progress toward the every-Nth-order trending
promo. When the user's next trending order earns the reward, the
catalog already shows promo prices.
Use case
Show a progress bar ("2 orders until your next promo").
Headers
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer <accessToken> |
x-user-id | yes | End-user id, 1–256 chars [A-Za-z0-9_-]. |
Response 200
{ "loyalty": { "enabled": false } }
When the promo is not running for this user, loyalty is exactly
{ "enabled": false }. Otherwise it is the user's promo state
(including nextOrderPromo when the next order is rewarded); it
may gain fields, so read what you need and ignore the rest.
Errors
| Status | Meaning |
|---|---|
401 / 403 | Token missing, invalid, expired or revoked / API inactive. |
429 | Per-client rate limit hit. |
503 | Trending disabled or unavailable. |
Example
curl -H "Authorization: Bearer $ACCESS" -H "x-user-id: $USER_ID" \
"$BASE_URL/trending/loyalty"