billing

POST /v1/pro-discounts/{product}/code

Your personal code for one Pro plugin — created on first ask, the same one after.

Све billing крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу billing.view; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка узима org_id као поље у JSON телу.

Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

curl -X POST https://api.zinndigital.com/v1/pro-discounts/{product}/code \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли

Детаљи

Returns your personal, single-use code for product and a checkout link with it already applied. The first call creates it (201); asking again while it is valid and unused returns the same code (200). A code lasts 30 days; after an unused expiry a new one is issued. Once a code has been used, no other is ever issued for that plugin — the discount is on the first payment only, and renewals are at the normal price. Requires billing.view. 403 when the account does not qualify, 404 when the plugin has no discount, 409 when it has already been used, 503 when the store could not be reached (nothing is created). Rate-limited.

Параметри

НазивТипОбавезноШта је ово
product (path)stringДаThe Pro product's key, from listProDiscounts (offers[].product).

Тело захтева

НазивТипОбавезноШта је ово
org_idstringНеThe account to act for. Required when you belong to more than one.

Одговор

НазивТипОбавезноШта је ово
productstringДа—
createdbooleanДа—
codeProDiscountCodeДаOne personal, single-use code. The code itself is a credential worth one purchase.

Грешке које ова крајња тачка може вратити

401 · 403 · 404 · 409 · 422 · 429 · 503