billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Wszystkie punkty końcowe billing

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie billing.invoice.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Miejsce na identyfikator organizacji

Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.

Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Parametry

NazwaTypWymaganeCo to jest
org_id (query)UuidNieThe organization whose profile to replace; defaults to the caller's own.

Treść żądania

NazwaTypWymaganeCo to jest
legal_namestringNie
company_namestringNie
billing_addressBillingAddressTakA 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_numberstringNie
tax_idLabelValueNie
custom_invoice_fieldsLabelValue[]Nie
billing_emailstringNie
invoice_localestringNie

Odpowiedź

NazwaTypWymaganeCo to jest
org_idstringTak
legal_namestringTak
company_namestringTak
billing_addressBillingAddressTakA 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_numberstringTak
vat_statusstring<unvalidated, pending, valid, invalid>TakState 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_idLabelValueNieA free-label secondary tax id (US EIN, AU ABN, …). Null when unset.
custom_invoice_fieldsLabelValue[]TakUp to five customer-defined `{label, value}` lines, rendered verbatim.
billing_emailstringTakWhere invoices are delivered; blank means the account email.
invoice_localestringTakPreferred invoice language; blank means the account language.
updated_atstringNieWhen the profile was last saved. Null if it has never been saved.

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 422 · 429