agency-invoicing

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

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

Všechny koncové body agency-invoicing

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

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

Parametry

NázevTypPožadovánoCo to je
invoiceId (path)UuidAno
org_id (query)UuidNeWhich 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ázevTypPožadovánoCo to je
amount_minorintegerNeDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>Ne
notestringNe

Odpověď

NázevTypPožadovánoCo to je
idUuidAnoUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNeThe 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>Ano
is_overduebooleanNe⭐ 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_idUuidNeUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNe
currencystringAno
issue_datestringAno
due_datestringNe
referencestringNe
notesstringNe
footerstringNe
subtotal_minorintegerNe
discount_minorintegerNe
tax_minorintegerNe
total_minorintegerAno
amount_paid_minorintegerNe
amount_due_minorintegerNe
tax_breakdownAgencyInvoiceTaxGroup[]Ne
sourcestringNeWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNe
last_sent_tostringNe
paid_atstringNe
void_reasonstringNe
created_atstringNe
linesAgencyInvoiceLine[]Ne
paymentsAgencyInvoicePayment[]Ne
portal_urlstringNeThe 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 · 422 · 429