agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit agency.invoicing.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Tashkilotingiz identifikatori kiritiladigan joy
Bu soʻrovnoma oxiri org_id parametrini soʻrov parametri sifatida qabul qiladi. Uni kiritmasangiz, chaqiruv butun ijarachi quyi daraxtingizni qamrab oladi; uni bitta tashkilotga cheklash uchun yuboring.
Tashkilotingiz identifikatori boshqaruv panelingizdagi API kalitlari ekranida, kalitning o'z yonida joylashgan. Bu siz amalga oshiradigan har bir so'rovda bir xil identifikator hisoblanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
⛔ 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`.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
invoiceId (path) | Uuid | Ha | — |
org_id (query) | Uuid | Yo'q | 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… |
Soʻrov tanasi
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
currency | string | Yo'q | — |
issue_date | string | Yo'q | — |
due_date | string | Yo'q | — |
reference | string | Yo'q | — |
notes | string | Yo'q | — |
footer | string | Yo'q | — |
lines | AgencyInvoiceLineWrite[] | Yo'q | — |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
id | Uuid | Ha | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Yo'q | 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> | Ha | — |
is_overdue | boolean | Yo'q | ⭐ 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 | Yo'q | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Yo'q | — |
currency | string | Ha | — |
issue_date | string | Ha | — |
due_date | string | Yo'q | — |
reference | string | Yo'q | — |
notes | string | Yo'q | — |
footer | string | Yo'q | — |
subtotal_minor | integer | Yo'q | — |
discount_minor | integer | Yo'q | — |
tax_minor | integer | Yo'q | — |
total_minor | integer | Ha | — |
amount_paid_minor | integer | Yo'q | — |
amount_due_minor | integer | Yo'q | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Yo'q | — |
source | string | Yo'q | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Yo'q | — |
last_sent_to | string | Yo'q | — |
paid_at | string | Yo'q | — |
void_reason | string | Yo'q | — |
created_at | string | Yo'q | — |
lines | AgencyInvoiceLine[] | Yo'q | — |
payments | AgencyInvoicePayment[] | Yo'q | — |
portal_url | string | Yo'q | 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,… |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 404 · 409 · 422 · 429