agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

Όλα τα τελικά σημεία 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 \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα 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`.

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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οςΥποχρεωτικόΤι είναι
client_idUuidΌχιUUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteΌχι
currencystringΌχι
issue_datestringΌχι
due_datestringΌχι
referencestringΌχι
notesstringΌχι
footerstringΌχι
linesAgencyInvoiceLineWrite[]Όχι

Απάντηση

ΌνομαΤύ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,…

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

401 · 403 · 404 · 422 · 429