reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте reseller.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Ұйымыңыздың идентификаторы орналасатын жер
Бұл соңғы нүкте сұрау параметрі ретінде 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`.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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… |
Сұрау денесі
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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 | Жоқ | — |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
data | ResellerLegalEntity | null | Иә | `null` when no company details are held yet. |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 409 · 422 · 429