reseller

PUT /v1/reseller/legal-entity

Save the company details your clients' invoices are issued under.

Всички крайни точки в reseller

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението 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, за да можете да видите действителния отговор. Отворете този крайpoint в 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…

Тяло на заявката

ИмеТипЗадължителноКакво представлява
idUuidНеUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringДа
company_numberstringНе
address_line1stringНе
address_line2stringНе
citystringНе
regionstringНе
postcodestringНе
countrystringДаISO 3166-1 alpha-2. Stored uppercase.
vat_numberstringНе
footer_textstringНе
number_prefixstringДа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_lockedbooleanНеTrue once an invoice has been issued under this company.
created_atstringНе
updated_atstringНе

Отговор

ИмеТипЗадължителноКакво представлява
dataResellerLegalEntity | nullДа`null` when no company details are held yet.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 409 · 422 · 429