billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Бүх billing төгсгөлийн цэгүүд

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь billing.invoice.manage эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Таны байгууллагын дугаар орох газар

Энэ төгсгөл цэг нь org_id-г асуулгын параметр болгон авдаг. Үүнийг орхивол дуудлага таны бүх түрээсийн дэд модыг хамрах бөгөөд дуудлагыг зөвхөн нэг байгууллагаар хязгаарлахын тулд үүнийг илгээнэ үү.

Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

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 консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй 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_namestringҮгүй
company_namestringҮгүй
billing_addressBillingAddressТийм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_numberstringҮгүй
tax_idLabelValueҮгүй
custom_invoice_fieldsLabelValue[]Үгүй
billing_emailstringҮгүй
invoice_localestringҮгүй

Хариу үйлдэл

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
org_idstringТийм
legal_namestringТийм
company_namestringТийм
billing_addressBillingAddressТийм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_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_idLabelValueҮгүйA 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_emailstringТиймWhere invoices are delivered; blank means the account email.
invoice_localestringТиймPreferred invoice language; blank means the account language.
updated_atstringҮгүйWhen the profile was last saved. Null if it has never been saved.

Энэ төгсгөл цэгээс буцааж болох алдаанууд

401 · 403 · 422 · 429