reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу reseller.manage; кључ без ње се одбија уз 403, а не 404.
Где се уноси ID ваше организације
Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X PUT https://api.zinndigital.com/v1/reseller/legal-entity \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "country": <string>, "number_prefix": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Creates the entity the first time and updates it afterwards — never a second row. number_prefix is globally unique across every company on the platform because it is what keeps two issuers' invoice numbers apart, so a value already in use is a 409; and it freezes once an invoice has been issued under this company, because releasing it would let the next taker mint numbers you have already issued. Everything else stays editable — a company that moves office must be able to say so. Requires reseller.manage.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
org_id (query) | Uuid | Не | Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404… |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | Uuid | Не | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Да | — |
company_number | string | Не | — |
address_line1 | string | Не | — |
address_line2 | string | Не | — |
city | string | Не | — |
region | string | Не | — |
postcode | string | Не | — |
country | string | Да | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | Не | — |
footer_text | string | Не | — |
number_prefix | string | Да | The prefix in every invoice number you issue (AG-INV-2026-000123). Globally unique across all companies on the platform, and frozen once you have issued an invoice. |
number_prefix_locked | boolean | Не | True once an invoice has been issued under this company. |
created_at | string | Не | — |
updated_at | string | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
data | ResellerLegalEntity | null | Да | null when no company details are held yet. |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 409 · 422 · 429