agency-invoicing

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

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

すべての agency-invoicing エンドポイント

認証

ベアラー トークンとして API キーを送信します。キーには agency.invoicing.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

組織 ID を入力する場所

このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。

組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く

詳細

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

パラメータ

名前タイプ必須これがその内容です
invoiceId (path)Uuidはい
org_id (query)Uuidいいえ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…

リクエスト本文

名前タイプ必須これがその内容です
amount_minorintegerいいえDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>いいえ
notestringいいえ

返信

名前タイプ必須これがその内容です
idUuidはいUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringいいえThe 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_overduebooleanいいえ⭐ 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_idUuidいいえUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringいいえ
currencystringはい
issue_datestringはい
due_datestringいいえ
referencestringいいえ
notesstringいいえ
footerstringいいえ
subtotal_minorintegerいいえ
discount_minorintegerいいえ
tax_minorintegerいいえ
total_minorintegerはい
amount_paid_minorintegerいいえ
amount_due_minorintegerいいえ
tax_breakdownAgencyInvoiceTaxGroup[]いいえ
sourcestringいいえWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringいいえ
last_sent_tostringいいえ
paid_atstringいいえ
void_reasonstringいいえ
created_atstringいいえ
linesAgencyInvoiceLine[]いいえ
paymentsAgencyInvoicePayment[]いいえ
portal_urlstringいいえ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,…

このエンドポイントが返すエラー

401 · 403 · 404 · 422 · 429