agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
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 POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-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
Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. 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 |
|---|---|---|---|
to | string | Ne | Where to send it. Defaults to the client's stored email. |
locale | string | Ne | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | Ne | A covering line to put above the amount. |
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,… |
sent_to | string | Ne | — |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 409 · 422 · 429 · 503