reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
ავტორიზაცია
API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს reseller.manage ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.
სwhere your organisation id goes-ის ადგილი
ეს ენდპოინტი იყენებს პარამეტრად org_id. მისი გამოტოვების შემთხვევაში ზარი ფარავს თქვენი იჯარის მთელ ქვეხეს, ხოლო გაგზავნისას ზარი შეიზღუდება მხოლოდ ერთ ორგანიზაციამდე.
თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.
სცადეთ
შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.
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-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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