agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Πισ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 PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API
Λεπτομέρειες
⛔ A `409` means the invoice has been issued and its figures are frozen. A sent invoice is a document your client is holding — void it and issue a replacement rather than restating it. 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ος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
currency | string | Όχι | — |
issue_date | string | Όχι | — |
due_date | string | Όχι | — |
reference | string | Όχι | — |
notes | string | Όχι | — |
footer | string | Όχι | — |
lines | AgencyInvoiceLineWrite[] | Όχι | — |
Απάντηση
| Όνομα | Τύ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,… |
Σφάλματα που μπορεί να επιστρέψει αυτό το τελικό σημείο
401 · 403 · 404 · 409 · 422 · 429