billing

GET /v1/cdn/credit

The account's prepaid metered-CDN balance, spend cap and top-up settings.

Tous les points de terminaison billing

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation billing.view ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

curl -X GET https://api.zinndigital.com/v1/cdn/credit \
  -H "Authorization: Bearer zdk_live_…"

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

The metered Enterprise-edge tier is prepaid. This is the balance, the customer's own spend ceiling, what has been spent this period, and whether auto-top-up is on. `worst_case_overshoot_minor` is reported to the customer rather than hidden, and it is the honest part of this endpoint. A spend cap cannot be exact: between one usage sample and the cut-off, traffic keeps flowing, so the cap is overshot by `peak_bandwidth x poll_interval x rate`. That is bounded by a hard egress rate limit at the vendor, not by how often we poll — but it is not zero, and a product that promises an exact ceiling it cannot hold is worse than one that states the tolerance. Requires `billing.view`.

Réponse

NomTypeObligatoireQu'est-ce que c'est
currencystringOui
balance_minorintegerOui
spend_cap_minorintegerOuiThe customer's own ceiling. Enforced, not advisory.
spent_period_minorintegerOui
min_spend_cap_minorintegerOuiThe lowest cap the platform accepts.
auto_top_upbooleanOuiOn by default. Refills the balance so serving continues **below** the cap; it never raises the cap.
auto_top_up_amount_minorintegerOui
statestring<active, paused_cap, paused_standing, paused_admin>Oui
paused_reasonstringNon
worst_case_overshoot_minorintegerNonHow 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…

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 429