reseller
PUT /v1/reseller/legal-entity
Save the company details your clients' invoices are issued under.
認証
ベアラー トークンとして API キーを送信します。キーには reseller.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントはクエリパラメータとして 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… |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
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