agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

Всички крайни точки в agency-invoicing

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението agency.invoicing.manage; ключ без него се отхвърля с 403, а не с 404.

Където отива идентификаторът на вашата организация

Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.

ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.

Параметри

ИмеТипЗадължителноКакво представлява
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…

Тяло на заявката

ИмеТипЗадължителноКакво представлява
client_idUuidНеUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteНе
currencystringНе
issue_datestringНе
due_datestringНе
referencestringНе
notesstringНе
footerstringНе
linesAgencyInvoiceLineWrite[]Не

Отговор

ИмеТипЗадължителноКакво представлява
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,…

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429