Method: customers.invoices.list

傳回特定月份與帳單設定相關聯的所有月結單。

擲回錯誤清單:AuthenticationError AuthorizationError FieldError HeaderError InternalError InvoiceError QuotaError RequestError

HTTP 要求

GET https://googleads.googleapis.com/v17/customers/{customerId}/invoices

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
customerId

string

必要欄位。要擷取月結單的客戶 ID。

查詢參數

參數
billingSetup

string

必要欄位。所需月結單的帳單設定資源名稱。

customers/{customerId}/billingSetups/{billing_setup_id}

issueYear

string

必要欄位。用來擷取月結單的年度,格式為 yyyy。只能擷取 2019 年以後開立的月結單。

issueMonth

enum (MonthOfYear)

必要欄位。擷取月結單的月份。

要求主體

要求主體必須為空白。

回應主體

對「InvoiceService.ListInvoices」的回應訊息。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "invoices": [
    {
      object (Invoice)
    }
  ]
}
欄位
invoices[]

object (Invoice)

符合帳單設定和時間範圍的月結單清單。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/adwords

詳情請參閱 OAuth 2.0 總覽

應付憑據

月結單。所有應付憑據資訊都會根據 PDF 月結單上的快照建立。對於 InvoiceService 問世之前的月結單,快照資訊與 PDF 月結單的資訊可能會不一致。

JSON 表示法
{
  "resourceName": string,
  "type": enum (InvoiceType),
  "serviceDateRange": {
    object (DateRange)
  },
  "adjustmentsSubtotalAmountMicros": string,
  "adjustmentsTaxAmountMicros": string,
  "adjustmentsTotalAmountMicros": string,
  "regulatoryCostsSubtotalAmountMicros": string,
  "regulatoryCostsTaxAmountMicros": string,
  "regulatoryCostsTotalAmountMicros": string,
  "replacedInvoices": [
    string
  ],
  "accountBudgetSummaries": [
    {
      object (AccountBudgetSummary)
    }
  ],
  "accountSummaries": [
    {
      object (AccountSummary)
    }
  ],
  "id": string,
  "billingSetup": string,
  "paymentsAccountId": string,
  "paymentsProfileId": string,
  "issueDate": string,
  "dueDate": string,
  "currencyCode": string,
  "exportChargeSubtotalAmountMicros": string,
  "exportChargeTaxAmountMicros": string,
  "exportChargeTotalAmountMicros": string,
  "subtotalAmountMicros": string,
  "taxAmountMicros": string,
  "totalAmountMicros": string,
  "correctedInvoice": string,
  "pdfUrl": string
}
欄位
resourceName

string

僅供輸出。月結單的資源名稱。多位客戶可以共用同一份月結單,因此多個資源名稱可能會指向同一份月結單。月結單資源名稱的格式如下:

customers/{customerId}/invoices/{invoice_id}

type

enum (InvoiceType)

僅供輸出。月結單類型。

serviceDateRange

object (DateRange)

僅供輸出。這份月結單的服務期間日期範圍。結束日期會包含結束日期。

adjustmentsSubtotalAmountMicros

string (int64 format)

僅供輸出。月結單層級調整項的稅前小計金額 (以百萬分之一為單位)。

adjustmentsTaxAmountMicros

string (int64 format)

僅供輸出。月結單層級調整項的稅金總和 (以微量為單位)。

adjustmentsTotalAmountMicros

string (int64 format)

僅供輸出。月結單層級調整項的總金額 (以百萬分之一為單位)。

regulatoryCostsSubtotalAmountMicros

string (int64 format)

僅供輸出。應付憑據層級規費的稅前小計金額,以百萬分之一為單位。

regulatoryCostsTaxAmountMicros

string (int64 format)

僅供輸出。應付憑據層級監管費用的稅金總和,以百萬分之一為單位。

regulatoryCostsTotalAmountMicros

string (int64 format)

僅供輸出。應付憑據層級規費的總金額 (以百萬分之一為單位)。

replacedInvoices[]

string

僅供輸出。原始應付憑據的資源名稱(如有),需重新收費或替換為該應付憑據。應付憑據合併後,可能會有多份替換的應付憑據。替換後的應付憑據可能不屬於同一個付款帳戶。如果設定 replacedInvoices,則不會設定 correctedInvoice。月結單資源名稱的格式如下:

customers/{customerId}/invoices/{invoice_id}

accountBudgetSummaries[]

object (AccountBudgetSummary)

僅供輸出。與這份月結單相關的帳戶預算資訊摘要清單。

accountSummaries[]

object (AccountSummary)

僅供輸出。與這份月結單相關的摘要帳戶資訊清單。

id

string

僅供輸出。應付憑據的 ID。名稱會在月結單 PDF 檔案上以「月結單號碼」顯示。

billingSetup

string

僅供輸出。這份應付憑據帳單設定的資源名稱。

customers/{customerId}/billingSetups/{billing_setup_id}

paymentsAccountId

string

僅供輸出。16 位數 ID,用來識別與帳單設定相關聯的付款帳戶,例如「1234-5678-9012-3456」。月結單在 PDF 檔案上會顯示為「帳單帳戶號碼」。

paymentsProfileId

string

僅供輸出。12 位數 ID,用來識別與帳單設定相關聯的付款資料 (例如「1234-5678-9012」)。名稱在月結單 PDF 檔案上會顯示為「帳單 ID」。

issueDate

string

僅供輸出。核發日期,格式為 yyyy-mm-dd。月結單在 PDF 檔案上會顯示為「開立日期」或「月結單日期」。

dueDate

string

僅供輸出。截止日格式為 yyyy-mm-dd。

currencyCode

string

僅供輸出。貨幣代碼。所有費用都會以這個幣別傳回。系統支援從 ISO 4217 標準衍生的部分貨幣代碼。

exportChargeSubtotalAmountMicros

string (int64 format)

僅供輸出。應付憑據層級出口費用的稅前小計金額,以百萬分之一為單位。

exportChargeTaxAmountMicros

string (int64 format)

僅供輸出。月結單層級出口費用的稅金總和 (以百萬分之一為單位)。

exportChargeTotalAmountMicros

string (int64 format)

僅供輸出。月結單層級出口費用的總金額 (以百萬分之一為單位)。

subtotalAmountMicros

string (int64 format)

僅供輸出。稅前金額小計金額,以微量為單位。這等於 AccountBudgetSummary 小計金額和 Invoice.Adjustments_subtotal_amount_micros 的總和。

taxAmountMicros

string (int64 format)

僅供輸出。月結單上的所有稅金總和 (以百萬分之一為單位)。亦即 AccountBudgetSummary 稅金金額總和,加上與特定帳戶預算無關的稅金。

totalAmountMicros

string (int64 format)

僅供輸出。總金額 (以百萬分之一表示)。計算方式為 Invoice.subtotal_amount_micros、Invoice.tax_amount_micros、Invoice.regulatory_costs_subtotal_amount_micros 和 Invoice.export_charge_subtotal_amount_micros (開頭為 V14.1 的委刊項)。

correctedInvoice

string

僅供輸出。由這份應付憑據更正、註銷或取消的原應付憑據資源名稱 (如適用)。如果設定 correctedInvoice,則不會設定 replacedInvoices。月結單資源名稱的格式如下:

customers/{customerId}/invoices/{invoice_id}

pdfUrl

string

僅供輸出。月結單的 PDF 副本網址。使用者必須傳入 OAuth 權杖,才能透過這個網址索取 PDF 檔案。

InvoiceType

可能的應付憑據類型。

列舉
UNSPECIFIED 未指定。
UNKNOWN 僅用於傳回值。代表這個版本中的不明值。
CREDIT_MEMO 金額為負值的月結單。帳戶會獲得抵免額。
INVOICE 金額為正數的月結單。帳戶餘額還有餘額。

AccountBudgetSummary

代表帳戶預算的可結算費用摘要。

JSON 表示法
{
  "billableActivityDateRange": {
    object (DateRange)
  },
  "invalidActivitySummaries": [
    {
      object (InvalidActivitySummary)
    }
  ],
  "customer": string,
  "customerDescriptiveName": string,
  "accountBudget": string,
  "accountBudgetName": string,
  "purchaseOrderNumber": string,
  "subtotalAmountMicros": string,
  "taxAmountMicros": string,
  "totalAmountMicros": string,
  "servedAmountMicros": string,
  "billedAmountMicros": string,
  "overdeliveryAmountMicros": string,
  "invalidActivityAmountMicros": string
}
欄位
billableActivityDateRange

object (DateRange)

僅供輸出。帳戶預算的收費活動日期範圍,落在這份月結單的服務日期範圍內。結束日期會包含結束日期。這可以與帳戶預算的開始和結束時間不同。

invalidActivitySummaries[]

object (InvalidActivitySummary)

僅供輸出。包含原始連結的無效活動抵免額清單。

customer

string

僅供輸出。與這個帳戶預算連結的客戶資源名稱。其中包含客戶 ID (在月結單 PDF 上,會顯示為「帳戶 ID」)。客戶資源名稱的格式如下:

customers/{customerId}

customerDescriptiveName

string

僅供輸出。帳戶預算的客戶描述性名稱。月結單在月結單 PDF 上會顯示為「帳戶」。

accountBudget

string

僅供輸出。與這筆可結算費用摘要相關聯的帳戶預算資源名稱。AccountBudget 資源名稱的格式為:

customers/{customerId}/accountBudgets/{account_budget_id}

accountBudgetName

string

僅供輸出。帳戶預算的名稱。它會在月結單 PDF 檔案上以「帳戶預算」的形式顯示。

purchaseOrderNumber

string

僅供輸出。帳戶預算的訂購單號碼。這在月結單 PDF 上會顯示為「訂購單」。

subtotalAmountMicros

string (int64 format)

僅供輸出。屬於此預算在服務期間的稅前金額小計,以微量為單位。

taxAmountMicros

string (int64 format)

僅供輸出。在服務期間,這筆預算的應徵稅額 (以百萬分之一為單位)。

totalAmountMicros

string (int64 format)

僅供輸出。這筆預算在服務期間的總金額 (以百萬分之一為單位)。也就是帳戶預算小計金額和帳戶預算稅額的總和。

servedAmountMicros

string (int64 format)

僅供輸出。導致這筆預算在服務期間的扣繳稅額 (以微量為單位)。這個方法僅適合用於核對月結單和寄送資料。

billedAmountMicros

string (int64 format)

僅供輸出。屬於此預算在服務期間的預付帳單金額,以微量為單位。實際調整時並不會考量到任何調整項。

overdeliveryAmountMicros

string (int64 format)

僅供輸出。服務期間這筆預算的超量放送超量放送金額,以微量 (負值) 表示。

invalidActivityAmountMicros

string (int64 format)

僅供輸出。可歸因於這筆預算的稅前無效活動金額,以微量 (負值) 表示。

InvalidActivitySummary

應付憑據無效活動的詳細資料,其中包含月結單的詳細分析資料。

JSON 表示法
{
  "originalMonthOfService": enum (MonthOfYear),
  "originalYearOfService": string,
  "originalInvoiceId": string,
  "originalAccountBudgetName": string,
  "originalPurchaseOrderNumber": string,
  "amountMicros": string
}
欄位
originalMonthOfService

enum (MonthOfYear)

僅供輸出。與這筆無效活動抵免額相關的服務月份。

originalYearOfService

string

僅供輸出。與這筆無效活動抵免額相關的服務年份。

originalInvoiceId

string

僅供輸出。與這筆無效活動抵免額相關的原始月結單號碼。

originalAccountBudgetName

string

僅供輸出。與這筆無效活動抵免額相關的原始帳戶預算名稱。

originalPurchaseOrderNumber

string

僅供輸出。與這筆無效活動抵免額相關的原始訂購單號碼。

amountMicros

string (int64 format)

僅供輸出。無效活動金額 (以百萬分之一為單位)

AccountSummary

代表帳戶層級的摘要檢視。

JSON 表示法
{
  "customer": string,
  "billingCorrectionSubtotalAmountMicros": string,
  "billingCorrectionTaxAmountMicros": string,
  "billingCorrectionTotalAmountMicros": string,
  "couponAdjustmentSubtotalAmountMicros": string,
  "couponAdjustmentTaxAmountMicros": string,
  "couponAdjustmentTotalAmountMicros": string,
  "excessCreditAdjustmentSubtotalAmountMicros": string,
  "excessCreditAdjustmentTaxAmountMicros": string,
  "excessCreditAdjustmentTotalAmountMicros": string,
  "regulatoryCostsSubtotalAmountMicros": string,
  "regulatoryCostsTaxAmountMicros": string,
  "regulatoryCostsTotalAmountMicros": string,
  "exportChargeSubtotalAmountMicros": string,
  "exportChargeTaxAmountMicros": string,
  "exportChargeTotalAmountMicros": string,
  "subtotalAmountMicros": string,
  "taxAmountMicros": string,
  "totalAmountMicros": string
}
欄位
customer

string

僅供輸出。與帳戶摘要相關的帳戶。

billingCorrectionSubtotalAmountMicros

string (int64 format)

僅供輸出。稅前金額更正小計金額 (以百萬分之一為單位)。

billingCorrectionTaxAmountMicros

string (int64 format)

僅供輸出。帳單更正的稅金 (以微量為單位)。

billingCorrectionTotalAmountMicros

string (int64 format)

僅供輸出。帳單更正總額 (以微量為單位)。

couponAdjustmentSubtotalAmountMicros

string (int64 format)

僅供輸出。稅前優待券調整項小計金額 (以百萬分之一為單位)。

couponAdjustmentTaxAmountMicros

string (int64 format)

僅供輸出。優待券調整項的稅金 (以微量為單位)。

couponAdjustmentTotalAmountMicros

string (int64 format)

僅供輸出。優待券調整項總額 (以百萬分之一為單位)。

excessCreditAdjustmentSubtotalAmountMicros

string (int64 format)

僅供輸出。稅前超額抵免額調整項小計金額 (以百萬分之一為單位)。

excessCreditAdjustmentTaxAmountMicros

string (int64 format)

僅供輸出。超出抵免額調整項的稅金 (以微量為單位)。

excessCreditAdjustmentTotalAmountMicros

string (int64 format)

僅供輸出。超出抵免額調整項的總金額 (以百萬分之一為單位)。

regulatoryCostsSubtotalAmountMicros

string (int64 format)

僅供輸出。稅前規費小計金額,以百萬分之一為單位。

regulatoryCostsTaxAmountMicros

string (int64 format)

僅供輸出。規費稅金 (以百萬分之一表示)。

regulatoryCostsTotalAmountMicros

string (int64 format)

僅供輸出。總規費金額,以百萬分之一為單位。

exportChargeSubtotalAmountMicros

string (int64 format)

僅供輸出。稅前出口費用小計金額 (以微量為單位)。

exportChargeTaxAmountMicros

string (int64 format)

僅供輸出。出口稅的稅金 (以微量為單位)。

exportChargeTotalAmountMicros

string (int64 format)

僅供輸出。總出口費用金額 (以百萬分之一為單位)。

subtotalAmountMicros

string (int64 format)

僅供輸出。服務期間應付給帳戶的預付小計金額 (以微量為單位)。

taxAmountMicros

string (int64 format)

僅供輸出。帳戶在服務期間應繳納的稅金總額 (以微量為單位)。

totalAmountMicros

string (int64 format)

僅供輸出。服務期間應付給帳戶的總金額 (以微量為單位)。等於 subtotalAmountMicros 和 taxAmountMicros 的總和。