API — Loyalty program
Documentacao tecnica gerada automaticamente a partir da especificacao OpenAPI.
GET /api/loyalty/balance
Get Balance
Exemplo resposta (200):
{
"points_balance": 0,
"lifetime_points": 0,
"tier": "string",
"points_to_next_tier": 0
}
GET /api/loyalty/transactions
List Transactions
Parametros:
| Nome | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| page | integer | Nao | — |
| page_size | integer | Nao | — |
Exemplo resposta (200):
{
"items": [
"..."
],
"total": 0
}
Erros possiveis: 422 Validation Error
POST /api/loyalty/redeem
Redeem Points
Corpo do pedido:
| Campo | Tipo | Obrigatorio | Descricao |
|---|---|---|---|
| points | integer | Sim | Points |
Exemplo pedido:
{
"points": 0
}
Exemplo resposta (201):
{
"coupon_code": "string",
"discount_amount": 0,
"points_redeemed": 0,
"remaining_balance": 0
}
Erros possiveis: 422 Validation Error
Documentacao gerada automaticamente.