commerce
GET /v1/orders/{orderId}/refund-eligibility
Preview an order's refund eligibility.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن billing.view؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X GET https://api.zinndigital.com/v1/orders/{orderId}/refund-eligibility \
-H "Authorization: Bearer zdk_live_…"هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
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`.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
orderId (path) | Uuid | نعم | The order's id. |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
eligible | boolean | نعم | — |
policy_class | RefundPolicyClass | نعم | How the refund policy classified a request (captured at request time). |
requires_approval | boolean | نعم | — |
auto_approved | boolean | نعم | Eligible and needs no human — the money-back path issues immediately. |
amount | MoneyAmount | نعم | A money value — integer minor units + an ISO 4217 code (CLAUDE.md §2.8). |
reason | string | نعم | A customer-safe explanation of the decision. |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 404 · 429