commerce
POST /v1/refund-requests/{refundRequestId}/approve
Approve a pending refund request (staff).
Πισtoποίηση
Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Αυτό το τελικό σημείο δεν ορίζει μια συγκεκριμένη άδεια στην προδιαγραφή, οπότε δώστε στο κλειδί σας τα ελάχιστα δυνατά δικαιώματα και ελέγξτε την απόκριση αντί να κάνετε υποθέσεις.
Αυτό το τελικό σημείο δεν δέχεται αναγνωριστικό οργανισμού. Το κλειδί σας προσδιορίζει ήδη τον οργανισμό στον οποίο ανήκει, και η απάντηση περιορίζεται σε αυτόν.
Δοκιμάστε το
Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.
curl -X POST https://api.zinndigital.com/v1/refund-requests/{refundRequestId}/approve \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API
Λεπτομέρειες
Approves a pending (pro-rata / goodwill) refund request and issues the refund. Staff-only — requires the `billing.refund` permission held by a staff role, not by any customer role.
Παράμετροι
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
refundRequestId (path) | Uuid | Ναι | The refund request's id. |
Σώμα αίτησης
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
note | string | Όχι | — |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
id | Uuid | Ναι | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | Ναι | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
order_id | Uuid | Ναι | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
status | RefundRequestStatus | Ναι | A refund request's lifecycle state (docs/05 §4.13). |
policy_class | RefundPolicyClass | Ναι | How the refund policy classified a request (captured at request time). |
amount | MoneyAmount | Ναι | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
to_wallet | boolean | Ναι | Refund destination, frozen at request time — `false` (the default) reverses the original payment, `true` credits the account wallet. Any part of the order that was settled from… |
reason | string | Ναι | — |
decided_by | string | Ναι | — |
decision_note | string | Ναι | — |
decided_at | object | Ναι | — |
refund_reference | string | Ναι | Set once the refund has been issued (its idempotency key). |
created_at | string | Ναι | — |
updated_at | string | Ναι | — |
Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο
401 · 403 · 404 · 409 · 422 · 429