billing

PATCH /v1/cdn/credit

Set the spend cap, or turn auto-top-up on or off.

Всички крайни точки в billing

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението billing.payment.manage; ключ без него се отхвърля с 403, а не с 404.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X PATCH https://api.zinndigital.com/v1/cdn/credit \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в 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_minorintegerНе
auto_top_upbooleanНе
auto_top_up_amount_minorintegerНе

Отговор

ИмеТипЗадължителноКакво представлява
currencystringДа
balance_minorintegerДа
spend_cap_minorintegerДаThe customer's own ceiling. Enforced, not advisory.
spent_period_minorintegerДа
min_spend_cap_minorintegerДаThe lowest cap the platform accepts.
auto_top_upbooleanДаOn by default. Refills the balance so serving continues **below** the cap; it never raises the cap.
auto_top_up_amount_minorintegerДа
statestring<active, paused_cap, paused_standing, paused_admin>Да
paused_reasonstringНе
worst_case_overshoot_minorintegerНе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…

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429