reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د reseller.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د پوښتنې پیرامیتر په توګه org_id اخلي. دا پریږدئ او زنګ ستاسو د استوګنې ټولې څانګې پوښي؛ د یوې سازمان لپاره د زنګ محدودولو لپاره یې واستوئ.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
curl -X PUT https://api.zinndigital.com/v1/reseller/legal-entity \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "country": <string>, "number_prefix": <string> }'ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ
تفصیلات
Creates the entity the first time and updates it afterwards — never a second row. `number_prefix` is **globally unique across every company on the platform** because it is what keeps two issuers' invoice numbers apart, so a value already in use is a 409; and it **freezes once an invoice has been issued** under this company, because releasing it would let the next taker mint numbers you have already issued. Everything else stays editable — a company that moves office must be able to say so. Requires `reseller.manage`.
پارامترونه
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
org_id (query) | Uuid | نه | Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r… |
د غوښتنې بدن
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
id | Uuid | نه | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | هو | — |
company_number | string | نه | — |
address_line1 | string | نه | — |
address_line2 | string | نه | — |
city | string | نه | — |
region | string | نه | — |
postcode | string | نه | — |
country | string | هو | ISO 3166-1 alpha-2. Stored uppercase. |
vat_number | string | نه | — |
footer_text | string | نه | — |
number_prefix | string | هو | The prefix in every invoice number you issue (`AG-INV-2026-000123`). Globally unique across all companies on the platform, and frozen once you have issued an invoice. |
number_prefix_locked | boolean | نه | True once an invoice has been issued under this company. |
created_at | string | نه | — |
updated_at | string | نه | — |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
data | ResellerLegalEntity | null | هو | `null` when no company details are held yet. |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 404 · 409 · 422 · 429