agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění agency.invoicing.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
⛔ 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`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
invoiceId (path) | Uuid | Ano | — |
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… |
Tělo požadavku
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
currency | string | Ne | — |
issue_date | string | Ne | — |
due_date | string | Ne | — |
reference | string | Ne | — |
notes | string | Ne | — |
footer | string | Ne | — |
lines | AgencyInvoiceLineWrite[] | Ne | — |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | Uuid | Ano | 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> | Ano | — |
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 | Ano | — |
issue_date | string | Ano | — |
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 | Ano | — |
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,… |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 409 · 422 · 429