agency-invoicing
POST /v1/agency-invoicing/invoices
Start a draft invoice.
Autentifikimi
Drgoni një çelës API si një token mbajtës. Çelësi duhet të ketë lejen agency.invoicing.manage; një çelës pa të refuzohet me 403, jo 404.
Ku shkon id i organizatës suaj
Ky endpoint pranon org_id si parametër kërkimi. Lëreni bosh dhe thirrja do të mbulojë të gjithë nëndrurin tuaj të qiramarrjes; dërgojeni atë për ta ngushtuar thirrjen në një organizatë të vetme.
ID-ja e organizatës suaj ndodhet në ekranin e çelësave API në panelin tuaj të kontrollit, pranë vetë çelësit. Është i njëjti ID në çdo thirrje që bëni.
Provoje
Zëvendësoni çdo gjë brenda kllapave këndore me vlerat tuaja dhe vendbanuesin e çelësit me një çelës nga paneli juaj.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Jeni kyçur? Konsola e API-së në panelin tuaj plotëson ID-në tuaj reale të organizatës dhe çelësin tuaj, dhe ekzekuton kërkesën kundrejt API-së live, kështu që ju mund të shihni përgjigjen aktuale. Hapni këtë pikë fundore në konsolën e API-së
Detajet
Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.
Parametrat
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
org_id (query) | Uuid | Jo | 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… |
Trupi i kërkesës
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
client_id | Uuid | Jo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client | AgencyClientWrite | Jo | — |
currency | string | Jo | — |
issue_date | string | Jo | — |
due_date | string | Jo | — |
reference | string | Jo | — |
notes | string | Jo | — |
footer | string | Jo | — |
lines | AgencyInvoiceLineWrite[] | Jo | — |
Përgjigja
| Emri | Lloji | Kërkohet | Çfarë është kjo |
|---|---|---|---|
id | Uuid | Po | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Jo | 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> | Po | — |
is_overdue | boolean | Jo | ⭐ 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 | Jo | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Jo | — |
currency | string | Po | — |
issue_date | string | Po | — |
due_date | string | Jo | — |
reference | string | Jo | — |
notes | string | Jo | — |
footer | string | Jo | — |
subtotal_minor | integer | Jo | — |
discount_minor | integer | Jo | — |
tax_minor | integer | Jo | — |
total_minor | integer | Po | — |
amount_paid_minor | integer | Jo | — |
amount_due_minor | integer | Jo | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Jo | — |
source | string | Jo | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Jo | — |
last_sent_to | string | Jo | — |
paid_at | string | Jo | — |
void_reason | string | Jo | — |
created_at | string | Jo | — |
lines | AgencyInvoiceLine[] | Jo | — |
payments | AgencyInvoicePayment[] | Jo | — |
portal_url | string | Jo | 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,… |
Gabimet që ky pikëndalim mund të kthejë
401 · 403 · 404 · 422 · 429