commerce
GET /v1/orders/{orderId}/refund-eligibility
Preview an order's refund eligibility.
Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.view; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X GET https://api.zinndigital.com/v1/orders/{orderId}/refund-eligibility \
-H "Authorization: Bearer zdk_live_…"Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
The refund policy's decision for this order without opening a request — whether it is eligible, the amount that would be refunded, and whether it needs staff approval (docs/05 §4.13). Requires `billing.view`.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
orderId (path) | Uuid | Sì | The order's id. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
eligible | boolean | Sì | — |
policy_class | RefundPolicyClass | Sì | How the refund policy classified a request (captured at request time). |
requires_approval | boolean | Sì | — |
auto_approved | boolean | Sì | Eligible and needs no human — the money-back path issues immediately. |
amount | MoneyAmount | Sì | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
reason | string | Sì | A customer-safe explanation of the decision. |
Errori che questo endpoint può restituire
401 · 403 · 404 · 429