agency-invoicing

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

Give the invoice its number and freeze it.

Svi agency-invoicing krajnji točke

Autentifikacija

Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu agency.invoicing.manage; ključ bez nje se odbija s kodom 403, a ne 404.

Gdje dolazi ID vaše organizacije

Ova krajnja točka uzima org_id kao parametar upita. Izostavite ga i poziv obuhvaćett cijelo stablo vašeg najma; pošaljite ga kako biste suzili poziv na jednu organizaciju.

ID vaše organizacije nalazi se na zaslonu API ključeva u vašoj nadzornoj ploči, pored samog ključa. To je isti ID u svakom pozivu koji uputite.

Isprobajte

Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.

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

Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli

Pojedinosti

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

Parametri

NazivVrstaObaveznoŠto je to
invoiceId (path)UuidDa
org_id (query)UuidNeWhich 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…

Odgovor

NazivVrstaObaveznoŠto je to
idUuidDaUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNeThe 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_overduebooleanNe⭐ 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_idUuidNeUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNe
currencystringDa
issue_datestringDa
due_datestringNe
referencestringNe
notesstringNe
footerstringNe
subtotal_minorintegerNe
discount_minorintegerNe
tax_minorintegerNe
total_minorintegerDa
amount_paid_minorintegerNe
amount_due_minorintegerNe
tax_breakdownAgencyInvoiceTaxGroup[]Ne
sourcestringNeWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNe
last_sent_tostringNe
paid_atstringNe
void_reasonstringNe
created_atstringNe
linesAgencyInvoiceLine[]Ne
paymentsAgencyInvoicePayment[]Ne
portal_urlstringNeThe 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,…

Pogreške koje ova krajnja točka može vratiti

401 · 403 · 404 · 409 · 429