احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز billing.invoice.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
جایی که شناسه سازمان شما قرار میگیرد
این نقطه پایانی org_id را به عنوان یک پارامتر پرسوجو میپذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجارهای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.
شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواستهایی که ارسال میکنید یکسان است.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X PUT https://api.zinndigital.com/v1/billing/profile \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "billing_address": <BillingAddress> }'وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
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.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
org_id (query) | Uuid | خیر | The organization whose profile to replace; defaults to the caller's own. |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
legal_name | string | خیر | — |
company_name | string | خیر | — |
billing_address | BillingAddress | بله | 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 | خیر | — |
tax_id | LabelValue | خیر | — |
custom_invoice_fields | LabelValue[] | خیر | — |
billing_email | string | خیر | — |
invoice_locale | string | خیر | — |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
org_id | string | بله | — |
legal_name | string | بله | — |
company_name | string | بله | — |
billing_address | BillingAddress | بله | 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 | بله | — |
vat_status | string<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_id | LabelValue | خیر | A free-label secondary tax id (US EIN, AU ABN, …). Null when unset. |
custom_invoice_fields | LabelValue[] | بله | Up to five customer-defined `{label, value}` lines, rendered verbatim. |
billing_email | string | بله | Where invoices are delivered; blank means the account email. |
invoice_locale | string | بله | Preferred invoice language; blank means the account language. |
updated_at | string | خیر | When the profile was last saved. Null if it has never been saved. |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 422 · 429