billing
PUT /v1/billing/profile
Replace the organization's billing profile.
Autenticación
Envía una clave de API como token de portador. La clave debe tener el permiso billing.invoice.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/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'¿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
A full replace (PUT) of the editable "Bill to" fields; an omitted field resets to blank. `billing_address` (with its required `country`, needed for tax) is the one mandatory member. Editing changes only invoices issued **afterwards** — a past invoice snapshotted the buyer block at issue time and is never rewritten (docs/34 §1.1). `vat_status` is engine-owned (the validate-not-trust flow, §2.3) and is not accepted here; changing `vat_number` resets it to `unvalidated`. Requires `billing.invoice.manage` in the target organization.
Parámetros
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
org_id (query) | Uuid | No | The organization whose profile to replace; defaults to the caller's own. |
Cuerpo de la solicitud
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
legal_name | string | No | — |
company_name | string | No | — |
billing_address | BillingAddress | Sí | A billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server. |
vat_number | string | No | — |
tax_id | LabelValue | No | — |
custom_invoice_fields | LabelValue[] | No | — |
billing_email | string | No | — |
invoice_locale | string | No | — |
Respuesta
| Nombre | Tipo | Obligatorio | ¿Qué es esto? |
|---|---|---|---|
org_id | string | Sí | — |
legal_name | string | Sí | — |
company_name | string | Sí | — |
billing_address | BillingAddress | Sí | A billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server. |
vat_number | string | Sí | — |
vat_status | string<unvalidated, pending, valid, invalid> | Sí | State of the validate-not-trust check on `vat_number` (docs/34 §2.3). Read-only; a change to `vat_number` resets it to `unvalidated`. |
tax_id | LabelValue | No | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | Sí | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | Sí | Where invoices are delivered; blank means the account email. |
invoice_locale | string | Sí | Preferred invoice language; blank means the account language. |
updated_at | string | No | When the profile was last saved. Null if it has never been saved. |
Errores que este endpoint puede devolver
401 · 403 · 422 · 429