統一發票

這一頁從系統實際的 tool 產生。授權項目是權杖要勾的項目;「核可」是 Agent 呼叫之後要不要等人在網站上核可。

einvoice_allowance_issue

寫入核可:一定要

替一張統一發票開折讓(金額含稅)。一定要人核可。

給 Agent 的原文

Issue an allowance on an e-invoice (amount including tax).

參數

名稱型別必填說明
idstring必填
amountstring必填Amount including tax, as a string
reasonstring必填1 to 20 characters
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:einvoices:allowance

einvoice_allowance_void

寫入核可:一定要

作廢一張統一發票的折讓。一定要人核可。

給 Agent 的原文

Void an allowance of an e-invoice.

參數

名稱型別必填說明
idstring必填
allowance_idstring必填
reasonstring必填1 to 20 characters
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:einvoices:void

einvoice_issue

寫入核可:不用

替一張請款單開統一發票。加值服務中心沒回應時發票是 PENDING,到了 queryable_at 再用 einvoice_sync 查。

給 Agent 的原文

Issue an e-invoice for a bill. When the provider does not answer, the e-invoice is PENDING; call einvoice_sync after its queryable_at.

參數

名稱型別必填說明
billstring必填Bill number (BL-000001) or id
buyerBuyer(可以是 null)Omitted uses the defaults from the order's buyer
buyer.typeB2B | B2C(可以是 null)
buyer.emailstring(可以是 null)
buyer.carrier_typePROVIDER | MOBILE | CITIZEN | DONATION | PRINT(可以是 null)
buyer.carrier_codestring
buyer.donation_codestring
customs_clearanceNON_CUSTOMS | CUSTOMS(可以是 null)
zero_tax_rate_reasonstring
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:einvoices:issue

核可:不用

查統一發票(開立日新的在前,處理中的排最上面),或用 id 查一張和它的折讓;也回自動開立失敗的請款單。

給 Agent 的原文

Search e-invoices (newest issue date first, pending ones on top), or get one with its allowances by id. Also returns the bills whose automatic issue failed.

參數

名稱型別必填說明
idstring(可以是 null)Get one e-invoice with its allowances instead of searching
limitintegerdefault: 20
cursorstring(可以是 null)
issued_fromdate(可以是 null)
issued_todate(可以是 null)
statusesPENDING | ISSUED | VOIDED[](可以是 null)
keywordstringE-invoice number, bill number or buyer; an email or phone needs pii:read

授權項目:einvoices:read;keyword 像 Email 或電話時,另外要 pii:read。

einvoice_sync

寫入核可:不用

向加值服務中心查一張還在等確認的發票;沒開成的話 einvoice 是 null。

給 Agent 的原文

Ask the provider about an e-invoice that is waiting for confirmation. einvoice is null when the issue did not happen.

參數

名稱型別必填說明
idstring必填
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:einvoices:issue

einvoice_void

寫入核可:一定要

作廢一張統一發票。一定要人核可。

給 Agent 的原文

Void an e-invoice.

參數

名稱型別必填說明
idstring必填
reasonstring必填1 to 20 characters
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:einvoices:void