Download OpenAPI specification:
Public loyalty API, served by the edge gateway. Bearer-token auth. Balances are SHOP-scoped: a member's points are shared across all branches of a shop and isolated across shops. Points are integers; the ledger is append-only; redeem cannot exceed balance.
Idempotent when an Idempotency-Key is supplied.
| id required | string^[A-Za-z0-9_]+$ Member id. |
| Idempotency-Key | string <= 200 characters |
| Trace-Id | string |
| points required | integer >= 1 Whole points (never a decimal). |
| reason | string |
{- "points": 1,
- "reason": "string"
}{- "ok": true,
- "idempotent": true,
- "account": {
- "shop_id": 0,
- "member_id": "string",
- "balance": 0,
- "entries": 0,
- "ledger": [
- {
- "id": "string",
- "type": "earn",
- "points": 0,
- "reason": "string",
- "branch_id": 0,
- "at": "2019-08-24T14:15:22Z"
}
]
}
}Idempotent when an Idempotency-Key is supplied — a retried redeem never double-spends. Redeeming more than the balance is rejected; no ledger entry is written.
| id required | string^[A-Za-z0-9_]+$ Member id. |
| Idempotency-Key | string <= 200 characters |
| Trace-Id | string |
| points required | integer >= 1 Whole points (never a decimal). |
| reason | string |
{- "points": 1,
- "reason": "string"
}{- "ok": true,
- "idempotent": true,
- "account": {
- "shop_id": 0,
- "member_id": "string",
- "balance": 0,
- "entries": 0,
- "ledger": [
- {
- "id": "string",
- "type": "earn",
- "points": 0,
- "reason": "string",
- "branch_id": 0,
- "at": "2019-08-24T14:15:22Z"
}
]
}
}| id required | string^[A-Za-z0-9_]+$ Member id. |
| Trace-Id | string |
{- "ok": true,
- "account": {
- "shop_id": 0,
- "member_id": "string",
- "balance": 0,
- "entries": 0,
- "ledger": [
- {
- "id": "string",
- "type": "earn",
- "points": 0,
- "reason": "string",
- "branch_id": 0,
- "at": "2019-08-24T14:15:22Z"
}
]
}
}