agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/payments

Record money received — mark it paid or part-paid.

Tous les points de terminaison agency-invoicing

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}/payments \
  -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

Defaults to the outstanding balance. The invoice's status is re-derived from the SUM of its payment rows, never incremented, so the two can never disagree. Requires `agency.invoicing.manage`.

Paramètres

NomTypeObligatoireQu'est-ce que c'est
invoiceId (path)UuidOui
org_id (query)UuidNonWhich 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

NomTypeObligatoireQu'est-ce que c'est
amount_minorintegerNonDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>Non
notestringNon

Réponse

NomTypeObligatoireQu'est-ce que c'est
idUuidOuiUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNonThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Oui
is_overduebooleanNon⭐ 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_idUuidNonUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNon
currencystringOui
issue_datestringOui
due_datestringNon
referencestringNon
notesstringNon
footerstringNon
subtotal_minorintegerNon
discount_minorintegerNon
tax_minorintegerNon
total_minorintegerOui
amount_paid_minorintegerNon
amount_due_minorintegerNon
tax_breakdownAgencyInvoiceTaxGroup[]Non
sourcestringNonWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNon
last_sent_tostringNon
paid_atstringNon
void_reasonstringNon
created_atstringNon
linesAgencyInvoiceLine[]Non
paymentsAgencyInvoicePayment[]Non
portal_urlstringNonThe 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,…

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 404 · 422 · 429