agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/issue

Give the invoice its number and freeze it.

Все эндпоинты agency-invoicing

Аутентификация

Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение agency.invoicing.manage; ключ без него отклоняется с кодом 403, а не 404.

Идентификатор вашей организации

Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.

Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.

Попробовать

Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
  -H "Authorization: Bearer zdk_live_…"

Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли

Подробнее

Allocates the next number in YOUR series, freezes both parties onto the document and makes the payment link live. ⛔ An invoice with no lines, or one totalling zero, is refused — a numbered document for nothing is a gap in a sequence a tax authority expects to be unbroken. Requires `agency.invoicing.manage`.

Параметры

ИмяТипОбязательноЧто это
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…

Ответ

ИмяТипОбязательноЧто это
idUuidДаUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringНетThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Да
is_overduebooleanНет⭐ 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_idUuidНетUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringНет
currencystringДа
issue_datestringДа
due_datestringНет
referencestringНет
notesstringНет
footerstringНет
subtotal_minorintegerНет
discount_minorintegerНет
tax_minorintegerНет
total_minorintegerДа
amount_paid_minorintegerНет
amount_due_minorintegerНет
tax_breakdownAgencyInvoiceTaxGroup[]Нет
sourcestringНетWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringНет
last_sent_tostringНет
paid_atstringНет
void_reasonstringНет
created_atstringНет
linesAgencyInvoiceLine[]Нет
paymentsAgencyInvoicePayment[]Нет
portal_urlstringНет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 · 409 · 429