partner

POST /v1/partner/pro-discount-codes

One of your hosting customers' personal code for a Pro plugin.

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

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

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

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

Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.

Испробајте

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

curl -X POST https://api.zinndigital.com/v1/partner/pro-discount-codes \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "external_id": <string>, "email": <string>, "product": <string>, "hosting_in_good_standing": <boolean> }'

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

Детаљи

Returns the customer's personal, single-use code for product and a checkout link with it applied — created on the first call (201), the same code on later calls while it is valid and unused (200). Codes last 30 days; after an unused expiry a new one is issued; after a redemption none ever is (409). The discount is on the first payment only. ⛔ hosting_in_good_standing is YOUR assertion, made on every call, that this customer holds a paid hosting plan in good standing with you right now. V2 cannot see your billing, so it relies on it; false is refused (403) and an omitted field is a 422, never a yes. Requires partner.domains. Rate-limited.

Тело захтева

НазивТипОбавезноШта је ово
external_idstringДа—
emailstringДа—
productstringДа—
hosting_in_good_standingbooleanДаYour assertion, on every call, that this customer holds a paid hosting plan in good standing with you now. false is refused.

Одговор

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

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

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