reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso reseller.manage; una clave que no lo tenga se rechazará con un código 403, no 404.
Donde va el ID de tu organización
Este endpoint acepta org_id como parámetro de consulta. Omítelo y la llamada abarcará todo tu subárbol de inquilinos; envíalo para acotar la llamada a una sola organización.
El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.
Pruébalo
Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.
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> }'¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API
Detalles
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`.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
org_id (query) | Uuid | No | 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… |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
id | Uuid | No | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Sí | — |
company_number | string | No | — |
address_line1 | string | No | — |
address_line2 | string | No | — |
city | string | No | — |
region | string | No | — |
postcode | string | No | — |
country | string | Sí | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | No | — |
footer_text | string | No | — |
number_prefix | string | Sí | 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 | No | True once an invoice has been issued under this company. |
created_at | string | No | — |
updated_at | string | No | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
data | ResellerLegalEntity | null | Sí | `null` when no company details are held yet. |
Errores que este endpoint puede devolver
401 · 403 · 404 · 409 · 422 · 429