partner
POST /v1/partner/customers
Link (or create) the organization for one of your own customers.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу partner.domains; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/partner/customers \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "external_id": <string>, "email": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Idempotent on external_id — your own id for that customer. An email we do not know gets a new organization under yours, with a billing profile and no members; an email that already has a Zinn Digital® account is never taken on your say-so and answers 409, recording a consent request the customer answers in their own account. Requires partner.domains.
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
external_id | string | Да | Your own id for the customer. |
email | string | Да | — |
name | string | Не | — |
country | string | Не | ISO 3166-1 alpha-2. Used for tax determination and on the invoice. |
currency | string | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
external_id | string | Да | — |
org_id | string | Да | The organization you may act on, as X-Zinn-Org. Empty while the link is not active — a pending link names no organization you may use. |
state | string<active, pending_consent, revoked> | Да | — |
created_org | boolean | Да | Whether we made this organization for you, or the customer already had one. |
has_registrant | boolean | Да | Whether a registrant contact is on file. An order is refused until it is. |
email | string | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 409 · 422 · 429