Doğrulama
API açarını bearer token kimi göndərin. Açar billing.invoice.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X PUT https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id (query) | Uuid | Xeyr | The organization whose profile to replace; defaults to the caller's own. |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
legal_name | string | Xeyr | — |
company_name | string | Xeyr | — |
billing_address | BillingAddress | Bəli | 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 | Xeyr | — |
tax_id | LabelValue | Xeyr | — |
custom_invoice_fields | LabelValue[] | Xeyr | — |
billing_email | string | Xeyr | — |
invoice_locale | string | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id | string | Bəli | — |
legal_name | string | Bəli | — |
company_name | string | Bəli | — |
billing_address | BillingAddress | Bəli | 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 | Bəli | — |
vat_status | string<unvalidated, pending, valid, invalid> | Bəli | 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 | Xeyr | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | Bəli | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | Bəli | Where invoices are delivered; blank means the account email. |
invoice_locale | string | Bəli | Preferred invoice language; blank means the account language. |
updated_at | string | Xeyr | When the profile was last saved. Null if it has never been saved. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422 · 429