agency-invoicing

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

Email the invoice to your client, with the PDF attached.

Όλα τα τελικά σημεία agency-invoicing

Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα agency.invoicing.manage· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.

Πού μπαίνει το αναγνωριστικό του οργανισμού σας

Αυτό το τελικό σημείο δέχεται την παράμετρο org_id ως παράμετρο ερωτήματος. Παραλείψτε την και η κλήση καλύπτει ολόκληρο το υποδέντρο μίσθωσής σας· στείλτε την για να περιορίσετε την κλήση σε έναν οργανισμό.

Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

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

Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API

Λεπτομέρειες

Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. Requires `agency.invoicing.manage`.

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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…

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
tostringΌχιWhere to send it. Defaults to the client's stored email.
localestringΌχιWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringΌχιA covering line to put above the amount.

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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,…
sent_tostringΌχι

Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο

401 · 403 · 404 · 409 · 422 · 429 · 503