reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit reseller.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Tashkilotingiz identifikatori kiritiladigan joy
Bu soʻrovnoma oxiri org_id parametrini soʻrov parametri sifatida qabul qiladi. Uni kiritmasangiz, chaqiruv butun ijarachi quyi daraxtingizni qamrab oladi; uni bitta tashkilotga cheklash uchun yuboring.
Tashkilotingiz identifikatori boshqaruv panelingizdagi API kalitlari ekranida, kalitning o'z yonida joylashgan. Bu siz amalga oshiradigan har bir so'rovda bir xil identifikator hisoblanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
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> }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
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`.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
org_id (query) | Uuid | Yo'q | 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… |
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
id | Uuid | Yo'q | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Ha | — |
company_number | string | Yo'q | — |
address_line1 | string | Yo'q | — |
address_line2 | string | Yo'q | — |
city | string | Yo'q | — |
region | string | Yo'q | — |
postcode | string | Yo'q | — |
country | string | Ha | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | Yo'q | — |
footer_text | string | Yo'q | — |
number_prefix | string | Ha | 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 | Yo'q | True once an invoice has been issued under this company. |
created_at | string | Yo'q | — |
updated_at | string | Yo'q | — |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
data | ResellerLegalEntity | null | Ha | `null` when no company details are held yet. |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 404 · 409 · 422 · 429