reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea reseller.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.
Unde merge ID-ul organizației tale
Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.
ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
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> }'Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
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`.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
org_id (query) | Uuid | Nu | 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… |
Corp cerere
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
id | Uuid | Nu | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Da | — |
company_number | string | Nu | — |
address_line1 | string | Nu | — |
address_line2 | string | Nu | — |
city | string | Nu | — |
region | string | Nu | — |
postcode | string | Nu | — |
country | string | Da | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | Nu | — |
footer_text | string | Nu | — |
number_prefix | string | Da | 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 | Nu | True once an invoice has been issued under this company. |
created_at | string | Nu | — |
updated_at | string | Nu | — |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
data | ResellerLegalEntity | null | Da | `null` when no company details are held yet. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 409 · 422 · 429