reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Doğrulama
API açarını bearer token kimi göndərin. Açar reseller.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
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> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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`.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id (query) | Uuid | Xeyr | 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… |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | Uuid | Xeyr | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Bəli | — |
company_number | string | Xeyr | — |
address_line1 | string | Xeyr | — |
address_line2 | string | Xeyr | — |
city | string | Xeyr | — |
region | string | Xeyr | — |
postcode | string | Xeyr | — |
country | string | Bəli | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | Xeyr | — |
footer_text | string | Xeyr | — |
number_prefix | string | Bəli | 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 | Xeyr | True once an invoice has been issued under this company. |
created_at | string | Xeyr | — |
updated_at | string | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
data | ResellerLegalEntity | null | Bəli | `null` when no company details are held yet. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 409 · 422 · 429