agency-invoicing
POST /v1/agency-invoicing/invoices
Start a draft invoice.
Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu agency.invoicing.manage; ključ bez nje se odbija s kodom 403, a ne 404.
Gdje dolazi ID vaše organizacije
Ova krajnja točka uzima org_id kao parametar upita. Izostavite ga i poziv obuhvaćett cijelo stablo vašeg najma; pošaljite ga kako biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na zaslonu API ključeva u vašoj nadzornoj ploči, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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`.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
org_id (query) | Uuid | Ne | 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… |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
client_id | Uuid | Ne | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client | AgencyClientWrite | Ne | — |
currency | string | Ne | — |
issue_date | string | Ne | — |
due_date | string | Ne | — |
reference | string | Ne | — |
notes | string | Ne | — |
footer | string | Ne | — |
lines | AgencyInvoiceLineWrite[] | Ne | — |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
id | Uuid | Da | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Ne | 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> | Da | — |
is_overdue | boolean | Ne | ⭐ 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 | Ne | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Ne | — |
currency | string | Da | — |
issue_date | string | Da | — |
due_date | string | Ne | — |
reference | string | Ne | — |
notes | string | Ne | — |
footer | string | Ne | — |
subtotal_minor | integer | Ne | — |
discount_minor | integer | Ne | — |
tax_minor | integer | Ne | — |
total_minor | integer | Da | — |
amount_paid_minor | integer | Ne | — |
amount_due_minor | integer | Ne | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Ne | — |
source | string | Ne | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Ne | — |
last_sent_to | string | Ne | — |
paid_at | string | Ne | — |
void_reason | string | Ne | — |
created_at | string | Ne | — |
lines | AgencyInvoiceLine[] | Ne | — |
payments | AgencyInvoicePayment[] | Ne | — |
portal_url | string | Ne | 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,… |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422 · 429