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