agency-invoicing
PATCH /v1/agency-invoicing/invoices/{invoiceId}
Edit a draft invoice.
認証
ベアラー トークンとして API キーを送信します。キーには agency.invoicing.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X PATCH https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
⛔ A `409` means the invoice has been issued and its figures are frozen. A sent invoice is a document your client is holding — void it and issue a replacement rather than restating it. 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… |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
currency | string | いいえ | — |
issue_date | string | いいえ | — |
due_date | string | いいえ | — |
reference | string | いいえ | — |
notes | string | いいえ | — |
footer | string | いいえ | — |
lines | AgencyInvoiceLineWrite[] | いいえ | — |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | Uuid | はい | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | いいえ | 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> | はい | — |
is_overdue | boolean | いいえ | ⭐ 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 | いいえ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | いいえ | — |
currency | string | はい | — |
issue_date | string | はい | — |
due_date | string | いいえ | — |
reference | string | いいえ | — |
notes | string | いいえ | — |
footer | string | いいえ | — |
subtotal_minor | integer | いいえ | — |
discount_minor | integer | いいえ | — |
tax_minor | integer | いいえ | — |
total_minor | integer | はい | — |
amount_paid_minor | integer | いいえ | — |
amount_due_minor | integer | いいえ | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | いいえ | — |
source | string | いいえ | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | いいえ | — |
last_sent_to | string | いいえ | — |
paid_at | string | いいえ | — |
void_reason | string | いいえ | — |
created_at | string | いいえ | — |
lines | AgencyInvoiceLine[] | いいえ | — |
payments | AgencyInvoicePayment[] | いいえ | — |
portal_url | string | いいえ | 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 · 409 · 422 · 429