agency-invoicing

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

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

Tutti gli endpoint agency-invoicing

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione agency.invoicing.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/payments \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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`.

Parametri

NomeTipoObbligatorioChe cos'è
invoiceId (path)Uuid
org_id (query)UuidNoWhich 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…

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
amount_minorintegerNoDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>No
notestringNo

Risposta

NomeTipoObbligatorioChe cos'è
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNoThe 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>
is_overduebooleanNo⭐ 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_idUuidNoUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNo
currencystring
issue_datestring
due_datestringNo
referencestringNo
notesstringNo
footerstringNo
subtotal_minorintegerNo
discount_minorintegerNo
tax_minorintegerNo
total_minorinteger
amount_paid_minorintegerNo
amount_due_minorintegerNo
tax_breakdownAgencyInvoiceTaxGroup[]No
sourcestringNoWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNo
last_sent_tostringNo
paid_atstringNo
void_reasonstringNo
created_atstringNo
linesAgencyInvoiceLine[]No
paymentsAgencyInvoicePayment[]No
portal_urlstringNoThe 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,…

Errori che questo endpoint può restituire

401 · 403 · 404 · 422 · 429