agency-invoicing
GET /v1/agency-invoicing/clients/{clientId}
One client, with their whole invoice history.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение agency.invoicing.view; ключ без него отклоняется с кодом 403, а не 404.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X GET https://api.zinndigital.com/v1/agency-invoicing/clients/{clientId} \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
⭐ Every invoice you have raised against them, what they still owe and what they have been billed in total — the "all client history" screen in one request rather than a filtered list. Requires `agency.invoicing.view`.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
clientId (path) | Uuid | Да | — |
org_id (query) | Uuid | Нет | Which of your organizations is invoicing. Required only when you belong to more than one — otherwise it is inferred from your DIRECT membership, never from the subtree-expanded… |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | Uuid | Да | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Да | — |
contact_name | string | Нет | — |
email | string | Нет | — |
phone | string | Нет | — |
address | string | Нет | — |
tax_number_label | string | Нет | — |
tax_number | string | Нет | — |
currency | string | Да | — |
locale | string | Нет | Which language this client's invoices and payment page render in. An agency in Berlin invoicing a French client sends a French invoice. |
notes | string | Нет | — |
archived | boolean | Нет | — |
created_at | string | Нет | — |
invoices | AgencyInvoice[] | Нет | — |
outstanding_minor | integer | Нет | What this client still owes, in minor units. |
invoiced_total_minor | integer | Нет | Everything ever billed to them, void invoices excluded. |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 429