agency-invoicing
GET /v1/agency-invoicing/invoices/{invoiceId}
One invoice, with its lines, payments and payment link.
Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X GET https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
invoiceId (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). |
number | string | Нет | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | Да | — |
is_overdue | boolean | Нет | ⭐ DERIVED from the due date and the status, never stored — so there is no sweep to maintain a flag and nothing to go stale. A draft is never overdue however old it is: nobody ha… |
client_id | Uuid | Нет | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Нет | — |
currency | string | Да | — |
issue_date | string | Да | — |
due_date | string | Нет | — |
reference | string | Нет | — |
notes | string | Нет | — |
footer | string | Нет | — |
subtotal_minor | integer | Нет | — |
discount_minor | integer | Нет | — |
tax_minor | integer | Нет | — |
total_minor | integer | Да | — |
amount_paid_minor | integer | Нет | — |
amount_due_minor | integer | Нет | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Нет | — |
source | string | Нет | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Нет | — |
last_sent_to | string | Нет | — |
paid_at | string | Нет | — |
void_reason | string | Нет | — |
created_at | string | Нет | — |
lines | AgencyInvoiceLine[] | Нет | — |
payments | AgencyInvoicePayment[] | Нет | — |
portal_url | string | Нет | The payment link to send to the client. ⛔ Returned on a SINGLE-invoice read only, never in a list: a list is the thing that gets logged, cached and pasted into a support ticket,… |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 404 · 429