reseller

PUT /v1/reseller/legal-entity

Save the company details your clients' invoices are issued under.

Բոլոր reseller վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա reseller.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն

Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:

Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը 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…

Հարցման մարմին

ԱնունՏեսակՊահանջվում էԻնչ է դա
idUuidՈչUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringԱյո
company_numberstringՈչ
address_line1stringՈչ
address_line2stringՈչ
citystringՈչ
regionstringՈչ
postcodestringՈչ
countrystringԱյոISO 3166-1 alpha-2. Stored uppercase.
vat_numberstringՈչ
footer_textstringՈչ
number_prefixstringԱյո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_lockedbooleanՈչTrue once an invoice has been issued under this company.
created_atstringՈչ
updated_atstringՈչ

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
dataResellerLegalEntity | nullԱյո`null` when no company details are held yet.

Այս վերջնակետի կողմից վերադարձվող սխալները

401 · 403 · 404 · 409 · 422 · 429