partner

POST /v1/partner/customers/{externalId}/domain-orders

Place a domain order for one of your customers, unpaid.

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

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

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

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

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

Испробајте

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

curl -X POST https://api.zinndigital.com/v1/partner/customers/{externalId}/domain-orders \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "return_url": <string>, "cancel_url": <string>, "items": <PartnerDomainItem[]>, "currency": <string> }'

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

Детаљи

Prices every line from our catalogue, re-verifies every availability token and places the order pending_payment. A line may be a registration or, with kind: domain_transfer and the auth_code, a transfer-in of a name held at another registrar — checked and priced exactly as POST /v1/domains/transfer/preflight quotes it, and refused with that check's reason when it is not eligible. ⛔ Nothing is charged here and no payment method is touched: the customer pays on the hosted page named by pay_url, and their browser is sent back to return_url (or cancel_url) with only ?order=<human_ref>&status=paid (or cancelled) appended. Both URLs must be https on a host allowlisted for your programme, matched exactly — anything else is a 422 and no order is placed. pay_url carries a secret that is stored nowhere and shown only in this response; it lives 24 hours. Idempotency-Key is required — a retry returns the same order with a fresh pay_url rather than buying the name twice. Requires partner.domains.

Параметри

НазивТипОбавезноШта је ово
externalId (path)stringДаYOUR id for that customer — whatever your own system calls them. It is what makes linking idempotent, and it is scoped to your partner programme: another partner's id is a 404…
Idempotency-Key (header)stringНеClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Тело захтева

НазивТипОбавезноШта је ово
return_urlstringДаWhere the customer's browser goes once the order is paid. https, on a host allowlisted for your programme (exact match, default port, no userinfo).
cancel_urlstringДаWhere the browser goes if the customer leaves without paying. Same rules.
localestringНеThe language the payment page opens in.
itemsPartnerDomainItem[]Да—
currencystringДа—
billing_countrystringНеOverrides the country on the customer's billing profile for this order.

Одговор

НазивТипОбавезноШта је ово
order_idstringДа—
human_refstringДаThe reference the payment page returns to you as ?order=.
pay_urlstringНеOnly in the response that placed (or replayed) the order: the hosted page the customer pays on. It carries a secret that is stored nowhere — treat it as one.
pay_expires_atstringНе—
org_idstringДа—
statusstringДаpending_payment for a freshly placed order; afterwards the order's lifecycle (paid, fulfilling, completed, partially_fulfilled, canceled, …).
currencystringДа—
subtotal_minorintegerДа—
tax_minorintegerДа—
total_minorintegerДа—
linesPartnerOrderLine[]Да—

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

401 · 403 · 404 · 409 · 422 · 429