billing
PATCH /v1/cdn/credit
Set the spend cap, or turn auto-top-up on or off.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس billing.payment.manage اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
یہ اینڈ پوائنٹ کوئی آرگنائزیشن آئی ڈی نہیں لیتا۔ آپ کی کلید پہلے ہی اس آرگنائزیشن کی شناخت کرتی ہے جس سے یہ تعلق رکھتی ہے، اور اس کا جواب اسی کے مطابق محدود ہوتا ہے۔
آزمائیں
کوئی بھی چیز جو زاویہ دار قوسین میں ہو اسے اپنی اقدار سے بدلیں، اور کلیدی پلیس ہولڈر کو اپنے ڈیش بورڈ کی کسی کلید سے بدلیں۔
curl -X PATCH https://api.zinndigital.com/v1/cdn/credit \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'لاگ ان ہیں؟ آپ کے ڈیش بورڈ میں موجود API کنسول آپ کی حقیقی تنظیم کی آئی ڈی اور آپ کی اپنی کلید خود بخود پُر کر دیتا ہے، اور لائیو API پر درخواست چلاتا ہے تاکہ آپ اصل ردعمل دیکھ سکیں۔ اس اینڈ پوائنٹ کو API کنسول میں کھولیں
تفصیلات
The spend cap is the customer's and it is enforced, not advisory: reaching it pauses metered serving. It has a platform minimum, below which a cap would pause an account before it could do anything useful. Auto-top-up refills the **balance** so serving continues below the ceiling. It never raises the ceiling — a top-up that moved the cap would make the cap unreachable and turn a spending limit into a delay. Raising the cap above current spend resumes an account paused by that cap. It does **not** resume one paused by staff, or one paused because the account is not in good standing; those need the thing that actually caused them. Reading the balance is `billing.view`; changing a ceiling is a money change and requires `billing.payment.manage`.
درخواست کا باڈی
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
spend_cap_minor | integer | نہیں | — |
auto_top_up | boolean | نہیں | — |
auto_top_up_amount_minor | integer | نہیں | — |
جواب
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
currency | string | ہاں | — |
balance_minor | integer | ہاں | — |
spend_cap_minor | integer | ہاں | The customer's own ceiling. Enforced, not advisory. |
spent_period_minor | integer | ہاں | — |
min_spend_cap_minor | integer | ہاں | The lowest cap the platform accepts. |
auto_top_up | boolean | ہاں | On by default. Refills the balance so serving continues **below** the cap; it never raises the cap. |
auto_top_up_amount_minor | integer | ہاں | — |
state | string<active, paused_cap, paused_standing, paused_admin> | ہاں | — |
paused_reason | string | نہیں | — |
worst_case_overshoot_minor | integer | نہیں | How far past the cap spending can run before the next usage sample stops it. Reported rather than hidden: the cap cannot be exact, and a product promising a ceiling it cannot ho… |
وہ خرابیان جو یہ اینڈ پوائنٹ واپس کر سکتا ہے
401 · 403 · 404 · 422 · 429