Troca pontos por um prêmio
cURL
curl --request POST \ --url https://api.example.com/rewards/{reward_uid}/redeem \ --header 'Content-Type: application/json' \ --data ' { "quantity": 123, "notes": "<string>" } '
{ "success": true, "redemption": { "id": "rdm_001", "reward_uid": "rwd_001", "product_name": "Pizza Margherita Grande", "points_spent": 200, "quantity": 1, "status": "pending", "code": "INDIQ-A1B2C3", "qr_code_url": "https://api.indiqai.com/qr/rdm_001", "expires_at": "2024-06-27T23:59:59Z", "created_at": "2024-06-20T15:30:00Z" }, "updated_balance": { "points_before": 350, "points_after": 150, "points_spent": 200 } }
curl -X POST "https://api.indiqai.com/api/v1/rewards/rwd_001/redeem" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \ -H "Content-Type: application/json" \ -d '{ "quantity": 1, "notes": "Sem cebola, por favor" }'
Show Campos
pending
validated
expired
cancelled
Usuário escolhe prêmio
Confirma resgate
POST /rewards/{uid}/redeem
Recebe código
Apresenta no estabelecimento
Prêmio entregue
Was this page helpful?