billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Tutti gli endpoint billing

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione billing.invoice.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X PUT https://api.zinndigital.com/v1/billing/profile \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "billing_address": <BillingAddress> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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.

Parametri

NomeTipoObbligatorioChe cos'è
org_id (query)UuidNoThe organization whose profile to replace; defaults to the caller's own.

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
legal_namestringNo
company_namestringNo
billing_addressBillingAddressA 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_numberstringNo
tax_idLabelValueNo
custom_invoice_fieldsLabelValue[]No
billing_emailstringNo
invoice_localestringNo

Risposta

NomeTipoObbligatorioChe cos'è
org_idstring
legal_namestring
company_namestring
billing_addressBillingAddressA 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_numberstring
vat_statusstring<unvalidated, pending, valid, invalid>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_idLabelValueNoA free-label secondary tax id (US EIN, AU ABN, …). Null when unset.
custom_invoice_fieldsLabelValue[]Up to five customer-defined `{label, value}` lines, rendered verbatim.
billing_emailstringWhere invoices are delivered; blank means the account email.
invoice_localestringPreferred invoice language; blank means the account language.
updated_atstringNoWhen the profile was last saved. Null if it has never been saved.

Errori che questo endpoint può restituire

401 · 403 · 422 · 429