agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na agency.invoicing.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Kung saan mapupunta ang id ng iyong organisasyon
Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.
Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
⛔ 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`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
invoiceId (path) | Uuid | Oo | — |
org_id (query) | Uuid | Hindi | 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… |
Katawan ng kahilingan
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
currency | string | Hindi | — |
issue_date | string | Hindi | — |
due_date | string | Hindi | — |
reference | string | Hindi | — |
notes | string | Hindi | — |
footer | string | Hindi | — |
lines | AgencyInvoiceLineWrite[] | Hindi | — |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
id | Uuid | Oo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Hindi | 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> | Oo | — |
is_overdue | boolean | Hindi | ⭐ 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 | Hindi | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Hindi | — |
currency | string | Oo | — |
issue_date | string | Oo | — |
due_date | string | Hindi | — |
reference | string | Hindi | — |
notes | string | Hindi | — |
footer | string | Hindi | — |
subtotal_minor | integer | Hindi | — |
discount_minor | integer | Hindi | — |
tax_minor | integer | Hindi | — |
total_minor | integer | Oo | — |
amount_paid_minor | integer | Hindi | — |
amount_due_minor | integer | Hindi | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Hindi | — |
source | string | Hindi | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Hindi | — |
last_sent_to | string | Hindi | — |
paid_at | string | Hindi | — |
void_reason | string | Hindi | — |
created_at | string | Hindi | — |
lines | AgencyInvoiceLine[] | Hindi | — |
payments | AgencyInvoicePayment[] | Hindi | — |
portal_url | string | Hindi | 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,… |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 404 · 409 · 422 · 429