agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran agency.invoicing.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
⛔ 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`.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
invoiceId (path) | Uuid | Ya | — |
org_id (query) | Uuid | Tidak | 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… |
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
currency | string | Tidak | — |
issue_date | string | Tidak | — |
due_date | string | Tidak | — |
reference | string | Tidak | — |
notes | string | Tidak | — |
footer | string | Tidak | — |
lines | AgencyInvoiceLineWrite[] | Tidak | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Tidak | 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> | Ya | — |
is_overdue | boolean | Tidak | ⭐ 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 | Tidak | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Tidak | — |
currency | string | Ya | — |
issue_date | string | Ya | — |
due_date | string | Tidak | — |
reference | string | Tidak | — |
notes | string | Tidak | — |
footer | string | Tidak | — |
subtotal_minor | integer | Tidak | — |
discount_minor | integer | Tidak | — |
tax_minor | integer | Tidak | — |
total_minor | integer | Ya | — |
amount_paid_minor | integer | Tidak | — |
amount_due_minor | integer | Tidak | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Tidak | — |
source | string | Tidak | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Tidak | — |
last_sent_to | string | Tidak | — |
paid_at | string | Tidak | — |
void_reason | string | Tidak | — |
created_at | string | Tidak | — |
lines | AgencyInvoiceLine[] | Tidak | — |
payments | AgencyInvoicePayment[] | Tidak | — |
portal_url | string | Tidak | 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,… |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 409 · 422 · 429