agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Πισ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ος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
to | string | Όχι | Where to send it. Defaults to the client's stored email. |
locale | string | Όχι | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | Όχι | A covering line to put above the amount. |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
id | Uuid | Ναι | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Όχι | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | Ναι | — |
is_overdue | boolean | Όχι | ⭐ 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_id | Uuid | Όχι | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Όχι | — |
currency | string | Ναι | — |
issue_date | string | Ναι | — |
due_date | string | Όχι | — |
reference | string | Όχι | — |
notes | string | Όχι | — |
footer | string | Όχι | — |
subtotal_minor | integer | Όχι | — |
discount_minor | integer | Όχι | — |
tax_minor | integer | Όχι | — |
total_minor | integer | Ναι | — |
amount_paid_minor | integer | Όχι | — |
amount_due_minor | integer | Όχι | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Όχι | — |
source | string | Όχι | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Όχι | — |
last_sent_to | string | Όχι | — |
paid_at | string | Όχι | — |
void_reason | string | Όχι | — |
created_at | string | Όχι | — |
lines | AgencyInvoiceLine[] | Όχι | — |
payments | AgencyInvoicePayment[] | Όχι | — |
portal_url | string | Όχι | 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_to | string | Όχι | — |
Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο
401 · 403 · 404 · 409 · 422 · 429 · 503