reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл reseller.manage; ключ без нього відхиляється з кодом 403, а не 404.
Де вказується ідентифікатор вашої організації
Цей ендпоїнт приймає 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 у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого 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 r… |
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
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