agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա agency.invoicing.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ 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`.
Պարամետրեր
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
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… |
Հարցման մարմին
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
currency | string | Ոչ | — |
issue_date | string | Ոչ | — |
due_date | string | Ոչ | — |
reference | string | Ոչ | — |
notes | string | Ոչ | — |
footer | string | Ոչ | — |
lines | AgencyInvoiceLineWrite[] | Ոչ | — |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
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