agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

Toate punctele finale agency-invoicing

Autentificare

Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea agency.invoicing.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.

Unde merge ID-ul organizației tale

Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.

ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

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

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

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`.

Parametri

NumeTipObligatoriuCe este
org_id (query)UuidNuWhich 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…

Corp cerere

NumeTipObligatoriuCe este
client_idUuidNuUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteNu
currencystringNu
issue_datestringNu
due_datestringNu
referencestringNu
notesstringNu
footerstringNu
linesAgencyInvoiceLineWrite[]Nu

Răspuns

NumeTipObligatoriuCe este
idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNuThe 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>Da
is_overduebooleanNu⭐ 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_idUuidNuUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNu
currencystringDa
issue_datestringDa
due_datestringNu
referencestringNu
notesstringNu
footerstringNu
subtotal_minorintegerNu
discount_minorintegerNu
tax_minorintegerNu
total_minorintegerDa
amount_paid_minorintegerNu
amount_due_minorintegerNu
tax_breakdownAgencyInvoiceTaxGroup[]Nu
sourcestringNuWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNu
last_sent_tostringNu
paid_atstringNu
void_reasonstringNu
created_atstringNu
linesAgencyInvoiceLine[]Nu
paymentsAgencyInvoicePayment[]Nu
portal_urlstringNuThe 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,…

Erori pe care le poate returna acest punct final

401 · 403 · 404 · 422 · 429