reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění reseller.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
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> }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
org_id (query) | Uuid | Ne | 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ělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | Uuid | Ne | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Ano | — |
company_number | string | Ne | — |
address_line1 | string | Ne | — |
address_line2 | string | Ne | — |
city | string | Ne | — |
region | string | Ne | — |
postcode | string | Ne | — |
country | string | Ano | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | Ne | — |
footer_text | string | Ne | — |
number_prefix | string | Ano | 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 | Ne | True once an invoice has been issued under this company. |
created_at | string | Ne | — |
updated_at | string | Ne | — |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
data | ResellerLegalEntity | null | Ano | `null` when no company details are held yet. |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 409 · 422 · 429