agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation agency.invoicing.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Où insérer l'ID de votre organisation
Cet point de terminaison prend org_id comme paramètre de requête. Omettez-le et l'appel couvrira l'ensemble de votre sous-arbre de location ; envoyez-le pour restreindre l'appel à une seule organisation.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
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`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
invoiceId (path) | Uuid | Oui | — |
org_id (query) | Uuid | Non | 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… |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
to | string | Non | Where to send it. Defaults to the client's stored email. |
locale | string | Non | 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 | Non | A covering line to put above the amount. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Non | 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> | Oui | — |
is_overdue | boolean | Non | ⭐ 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 | Non | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Non | — |
currency | string | Oui | — |
issue_date | string | Oui | — |
due_date | string | Non | — |
reference | string | Non | — |
notes | string | Non | — |
footer | string | Non | — |
subtotal_minor | integer | Non | — |
discount_minor | integer | Non | — |
tax_minor | integer | Non | — |
total_minor | integer | Oui | — |
amount_paid_minor | integer | Non | — |
amount_due_minor | integer | Non | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Non | — |
source | string | Non | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Non | — |
last_sent_to | string | Non | — |
paid_at | string | Non | — |
void_reason | string | Non | — |
created_at | string | Non | — |
lines | AgencyInvoiceLine[] | Non | — |
payments | AgencyInvoicePayment[] | Non | — |
portal_url | string | Non | 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 | Non | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 409 · 422 · 429 · 503