agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/issue
Give the invoice its number and freeze it.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu agency.invoicing.manage; ključ bez nje se odbija sa 403, a ne sa 404.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
Allocates the next number in YOUR series, freezes both parties onto the document and makes the payment link live. ⛔ An invoice with no lines, or one totalling zero, is refused — a numbered document for nothing is a gap in a sequence a tax authority expects to be unbroken. Requires `agency.invoicing.manage`.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
invoiceId (path) | Uuid | Da | — |
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… |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
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,… |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 409 · 429