Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran billing.invoice.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X PUT https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
org_id (query) | Uuid | Tidak | The organization whose profile to replace; defaults to the caller's own. |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
legal_name | string | Tidak | — |
company_name | string | Tidak | — |
billing_address | BillingAddress | Ya | 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 | Tidak | — |
tax_id | LabelValue | Tidak | — |
custom_invoice_fields | LabelValue[] | Tidak | — |
billing_email | string | Tidak | — |
invoice_locale | string | Tidak | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
org_id | string | Ya | — |
legal_name | string | Ya | — |
company_name | string | Ya | — |
billing_address | BillingAddress | Ya | 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 | Ya | — |
vat_status | string<unvalidated, pending, valid, invalid> | Ya | 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 | Tidak | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | Ya | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | Ya | Where invoices are delivered; blank means the account email. |
invoice_locale | string | Ya | Preferred invoice language; blank means the account language. |
updated_at | string | Tidak | When the profile was last saved. Null if it has never been saved. |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 422 · 429