你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Invoices - List By Billing Account

列出给定开始日期和结束日期的计费帐户的发票。 所有计费帐户类型都支持该作。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices?periodStartDate={periodStartDate}&periodEndDate={periodEndDate}&api-version=2024-04-01&filter={filter}&orderBy={orderBy}&top={top}&skip={skip}&count={count}&search={search}

URI 参数

名称 必需 类型 说明
billingAccountName
path True

string

pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$

唯一标识计费帐户的 ID。

api-version
query True

string

要用于客户端请求的 API 的版本。 当前版本为 2024-04-01。

count
query

boolean

Count 查询选项允许客户端请求响应中资源中包含的匹配资源的计数。

filter
query

string

筛选器查询选项允许客户端筛选请求 URL 寻址的资源集合。

orderBy
query

string

orderby 查询选项允许客户端按特定顺序请求资源。

periodEndDate
query

string (date)

生成发票的计费周期的结束日期。 日期采用 MM-DD-YYYY 格式。

periodStartDate
query

string (date)

生成发票的计费周期的开始日期。 日期采用 MM-DD-YYYY 格式。

search
query

string

搜索查询选项允许客户端请求与自由文本搜索表达式匹配的集合中的项。 仅字符串字段支持搜索。

skip
query

integer (int64)

skip 查询选项请求要跳过且不包含在结果中的查询集合中的项数。

top
query

integer (int64)

顶部查询选项请求将查询集合中的项数包含在结果中。 顶部支持的最大值为 50。

响应

名称 类型 说明
200 OK

InvoiceListResult

发票列表。

Other Status Codes

ErrorResponse

描述操作失败的原因的错误响应。

示例

InvoicesListByBillingAccount

示例请求

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices?periodStartDate=2023-01-01&periodEndDate=2023-06-30&api-version=2024-04-01

示例响应

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789",
      "name": "G123456789",
      "properties": {
        "amountDue": {
          "currency": "USD",
          "value": 8.53
        },
        "azurePrepaymentApplied": {
          "currency": "USD",
          "value": 25.46
        },
        "billedAmount": {
          "currency": "USD",
          "value": 33.99
        },
        "billingProfileDisplayName": "Contoso Operations Billing",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
        "creditAmount": {
          "currency": "USD",
          "value": 0
        },
        "documents": [
          {
            "kind": "Invoice",
            "name": "12345678"
          },
          {
            "kind": "TaxReceipt",
            "name": "22345678"
          }
        ],
        "documentType": "Invoice",
        "dueDate": "2023-02-16T17:32:28Z",
        "freeAzureCreditApplied": {
          "currency": "USD",
          "value": 0
        },
        "invoiceDate": "2023-02-01T17:32:28Z",
        "invoicePeriodEndDate": "2023-02-15T17:32:28Z",
        "invoicePeriodStartDate": "2023-02-01T17:32:28Z",
        "isMonthlyInvoice": false,
        "purchaseOrderNumber": "123456",
        "rebillDetails": {
          "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/I000002",
          "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/CreditNote2",
          "rebillDetails": {
            "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/I000001",
            "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/CreditNote"
          }
        },
        "status": "Due",
        "subTotal": {
          "currency": "USD",
          "value": 33.99
        },
        "taxAmount": {
          "currency": "USD",
          "value": 1
        },
        "totalAmount": {
          "currency": "USD",
          "value": 7.53
        }
      },
      "type": "Microsoft.Billing/billingAccounts/invoices"
    },
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G987654321",
      "name": "G987654321",
      "properties": {
        "amountDue": {
          "currency": "USD",
          "value": 0
        },
        "azurePrepaymentApplied": {
          "currency": "USD",
          "value": 25.46
        },
        "billedAmount": {
          "currency": "USD",
          "value": 33.99
        },
        "billingProfileDisplayName": "Contoso Operations Billing",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
        "creditAmount": {
          "currency": "USD",
          "value": 0
        },
        "documents": [
          {
            "kind": "Invoice",
            "name": "12345678"
          },
          {
            "kind": "TaxReceipt",
            "name": "22345678"
          }
        ],
        "documentType": "Invoice",
        "dueDate": "2023-01-16T17:32:28Z",
        "freeAzureCreditApplied": {
          "currency": "USD",
          "value": 0
        },
        "invoiceDate": "2023-01-01T17:32:28Z",
        "invoicePeriodEndDate": "2023-01-15T17:32:28Z",
        "invoicePeriodStartDate": "2023-01-01T17:32:28Z",
        "isMonthlyInvoice": false,
        "payments": [
          {
            "amount": {
              "currency": "USD",
              "value": 33.99
            },
            "date": "2023-01-14T17:32:28Z",
            "paymentMethodFamily": "CreditCard",
            "paymentMethodType": "visa",
            "paymentType": "debited"
          }
        ],
        "purchaseOrderNumber": "123455",
        "rebillDetails": {
          "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/I000002",
          "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/CreditNote2",
          "rebillDetails": {
            "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/I000001",
            "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/CreditNote"
          }
        },
        "status": "Paid",
        "subTotal": {
          "currency": "USD",
          "value": 33.99
        },
        "taxAmount": {
          "currency": "USD",
          "value": 1
        },
        "totalAmount": {
          "currency": "USD",
          "value": 7.53
        }
      },
      "type": "Microsoft.Billing/billingAccounts/invoices"
    }
  ]
}

定义

名称 说明
Amount

金额。

AmountDue

截至现在到期的金额。

AmountRefunded

退款金额。

AmountRequested

所请求的退款金额。

AzurePrepaymentApplied

应用于费用的 Azure 预付款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

BilledAmount

发票计费周期的总费用。

createdByType

创建资源的标识的类型。

CreditAmount

发票计费周期内退货和取消的总退款。 此字段适用于协议类型Microsoft客户协议的计费帐户。

DocumentSource

文档的源。 适用于巴西的 ENF 和世界其他地区的 DRS。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

FailedPayment

付款失败。

FailedPaymentReason

付款失败的原因。

FreeAzureCreditApplied

应用于费用的免费 Azure 额度量。 此字段适用于协议类型Microsoft客户协议的计费帐户。

Invoice

发票。

InvoiceDocument

文档的属性。

InvoiceDocumentType

文档的类型。

InvoiceListResult

资源列表的容器

InvoiceProperties

发票。

InvoiceStatus

发票的当前状态。

InvoiceType

发票类型。

Payment

发票付款。

PaymentMethodFamily

付款方式系列。

RebillDetails

发票的重新计费详细信息。

RefundDetails

退款请求的详细信息。

RefundReasonCode

退款的原因。

RefundStatus

退款请求的状态。

SpecialTaxationType

标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。

SubTotal

应收税前金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

systemData

与创建和上次修改资源相关的元数据。

TaxAmount

计费周期的税款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

TotalAmount

生成发票时到期的金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

Amount

金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

AmountDue

截至现在到期的金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

AmountRefunded

退款金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

AmountRequested

所请求的退款金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

AzurePrepaymentApplied

应用于费用的 Azure 预付款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

BilledAmount

发票计费周期的总费用。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

CreditAmount

发票计费周期内退货和取消的总退款。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

DocumentSource

文档的源。 适用于巴西的 ENF 和世界其他地区的 DRS。

说明
DRS
ENF
Other

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

FailedPayment

付款失败。

名称 类型 说明
date

string (date-time)

尝试付款的日期。

failedPaymentReason

FailedPaymentReason

付款失败的原因。

FailedPaymentReason

付款失败的原因。

说明
BankDeclined
CardExpired
IncorrectCardDetails
Other

FreeAzureCreditApplied

应用于费用的免费 Azure 额度量。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

Invoice

发票。

名称 类型 说明
id

string (arm-id)

资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

资源的名称

properties

InvoiceProperties

发票。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

与资源关联的元数据字典。 它可能不会针对所有资源类型进行填充。 支持的最大键/值长度为 256 个字符。 键/值不应为空值,也不应为 null。 键不能包含 <> % & \ ? /

type

string

资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

InvoiceDocument

文档的属性。

名称 类型 说明
documentNumbers

string[]

发票文档的文档编号。

externalUrl

string

如果源位于 Microsoft.Billing 外部,则下载发票文档的 URL。

kind

InvoiceDocumentType

文档的类型。

name

string

唯一标识发票文档的 ID。 此 ID 可以是发票 PDF、信用单或税务收据的标识符。

source

DocumentSource

文档的源。 适用于巴西的 ENF 和世界其他地区的 DRS。

url

string

如果源是内部Microsoft.Billing,则下载发票文档的 URL。

InvoiceDocumentType

文档的类型。

说明
CreditNote
Invoice
Other
Summary
TaxReceipt
Transactions
VoidNote

InvoiceListResult

资源列表的容器

名称 类型 说明
nextLink

string

指向下一页结果的链接(url)。

value

Invoice[]

资源列表。

InvoiceProperties

发票。

名称 类型 说明
amountDue

AmountDue

截至现在到期的金额。

azurePrepaymentApplied

AzurePrepaymentApplied

应用于费用的 Azure 预付款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

billedAmount

BilledAmount

发票计费周期的总费用。

billedDocumentId

string

此发票无效后最初计费的活动发票的 ID。 此字段仅适用于无效发票。

billingProfileDisplayName

string

为其生成发票的计费配置文件的名称。

billingProfileId

string

为其生成发票的计费配置文件的 ID。

creditAmount

CreditAmount

发票计费周期内退货和取消的总退款。 此字段适用于协议类型Microsoft客户协议的计费帐户。

creditForDocumentId

string

发票的 ID 已失效,因此发出了此信用单。 此字段仅适用于信用额度。

documentType

InvoiceDocumentType

文档的类型。

documents

InvoiceDocument[]

可供下载和查看的文档列表,例如发票、信用单或税务收据。

dueDate

string (date-time)

发票的截止日期。

failedPayments

FailedPayment[]

失败付款列表。

freeAzureCreditApplied

FreeAzureCreditApplied

应用于费用的免费 Azure 额度量。 此字段适用于协议类型Microsoft客户协议的计费帐户。

invoiceDate

string (date-time)

生成发票的日期。

invoicePeriodEndDate

string (date-time)

生成发票的计费周期的结束日期。 日期采用 MM-DD-YYYY 格式。

invoicePeriodStartDate

string (date-time)

生成发票的计费周期的开始日期。 日期采用 MM-DD-YYYY 格式。

invoiceType

InvoiceType

发票类型。

isMonthlyInvoice

boolean

指定发票是否作为每月开票周期的一部分生成。 此字段适用于协议类型Microsoft客户协议的计费帐户。

payments

Payment[]

付款列表。

purchaseOrderNumber

string

发票的可选采购订单号。

rebillDetails

RebillDetails

重新计费发票的详细信息。

refundDetails

RefundDetails

退款请求的详细信息。

specialTaxationType

SpecialTaxationType

标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。

status

InvoiceStatus

发票的当前状态。

subTotal

SubTotal

应收税前金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

subscriptionDisplayName

string

为其生成发票的计费订阅的名称。

subscriptionId

string

为其生成发票的订阅的 ID。

taxAmount

TaxAmount

计费周期的税款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

totalAmount

TotalAmount

生成发票时到期的金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

InvoiceStatus

发票的当前状态。

说明
Due
Locked
Other
OverDue
Paid
Void

InvoiceType

发票类型。

说明
AzureMarketplace
AzureServices
AzureSupport
Other

Payment

发票付款。

名称 类型 说明
amount

Amount

付费金额。

date

string (date-time)

付款的日期。

paymentMethodFamily

PaymentMethodFamily

付款方式系列。

paymentMethodId

string

唯一标识用于发票的付款方式的 ID。

paymentMethodType

string

付款方式的类型。

paymentType

string

付款类型。

PaymentMethodFamily

付款方式系列。

说明
CheckWire
CreditCard
Credits
DirectDebit
EWallet
None
Other
TaskOrder

RebillDetails

发票的重新计费详细信息。

名称 类型 说明
creditNoteDocumentId

string

信用额度的 ID。

invoiceDocumentId

string

发票的 ID。

rebillDetails

RebillDetails

发票的重新计费详细信息。

RefundDetails

退款请求的详细信息。

名称 类型 说明
amountRefunded

AmountRefunded

退款金额。

amountRequested

AmountRequested

所请求的退款金额。

approvedOn

string (date-time)

已批准退款的日期。

completedOn

string (date-time)

退款完成的日期。

rebillInvoiceId

string

退款的重新计费发票的发票 ID。

refundOperationId

string

退款操作的 ID。

refundReason

RefundReasonCode

退款的原因。

refundStatus

RefundStatus

退款请求的状态。

requestedOn

string (date-time)

请求退款的日期。

transactionCount

integer (int32)

退款的交易数。

RefundReasonCode

退款的原因。

说明
AccidentalConversion
AccidentalPurchase
ForgotToCancel
Other
UnclearDocumentation
UnclearPricing

RefundStatus

退款请求的状态。

说明
Approved
Cancelled
Completed
Declined
Expired
Other
Pending

SpecialTaxationType

标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。

说明
InvoiceLevel
SubtotalLevel

SubTotal

应收税前金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

TaxAmount

计费周期的税款金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。

TotalAmount

生成发票时到期的金额。 此字段适用于协议类型Microsoft客户协议的计费帐户。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。 例如,如果货币是美元,则值 600 将为 $600.00。