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

Transactions - List By Invoice

列出发票的事务。 交易包括购买、退款和 Azure 使用费。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2020-05-01

URI 参数

名称 必需 类型 说明
billingAccountName
path True

string

唯一标识计费帐户的 ID。

invoiceName
path True

string

唯一标识发票的 ID。

api-version
query True

string

要与客户端请求一起使用的 API 版本。 当前版本为 2020-05-01。

响应

名称 类型 说明
200 OK

TransactionListResult

没问题。 请求已成功。

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

TransactionsListByInvoice

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2020-05-01

Sample Response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/transactions/41000000-0000-0000-0000-000000000000",
      "name": "41000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/transactions",
      "properties": {
        "kind": "all",
        "date": "2018-05-01T00:00:00Z",
        "invoice": "2344233",
        "invoiceId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/2344233",
        "productFamily": "Storage",
        "productTypeId": "A12345",
        "productType": "VM Instance",
        "productDescription": "Standard D1, US West 3",
        "transactionType": "Purchase",
        "transactionAmount": {
          "currency": "USD",
          "value": 5000
        },
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
        "billingProfileDisplayName": "Contoso operations billing",
        "azurePlan": "Microsoft Azure Plan for DevTest",
        "azureCreditApplied": {
          "currency": "USD",
          "value": 2000
        },
        "billingCurrency": "USD",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "pricingCurrency": "USD",
        "quantity": 1,
        "servicePeriodStartDate": "2018-05-01T00:00:00Z",
        "servicePeriodEndDate": "2018-09-30T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 4500
        },
        "tax": {
          "currency": "USD",
          "value": 500
        },
        "unitOfMeasure": "1 Minute",
        "units": 11.25,
        "unitType": "1 Runtime Minute"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/transactions/51000000-0000-0000-0000-000000000000",
      "name": "51000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/transactions",
      "properties": {
        "kind": "all",
        "date": "2018-04-01T00:00:00Z",
        "invoice": "pending",
        "productFamily": "Storage",
        "productTypeId": "A12345",
        "productType": "VM Instance",
        "productDescription": "Standard Support",
        "transactionType": "Cancel",
        "transactionAmount": {
          "currency": "USD",
          "value": 50
        },
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
        "billingProfileDisplayName": "Contoso operations billing",
        "azurePlan": "Microsoft Azure Plan for DevTest",
        "azureCreditApplied": {
          "currency": "USD",
          "value": 20
        },
        "billingCurrency": "USD",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "pricingCurrency": "USD",
        "quantity": 1,
        "servicePeriodStartDate": "2018-05-01T00:00:00Z",
        "servicePeriodEndDate": "2018-09-30T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 45
        },
        "tax": {
          "currency": "USD",
          "value": 5
        },
        "unitOfMeasure": "1 Minute",
        "units": 1.25,
        "unitType": "1 Runtime Minute"
      }
    }
  ]
}

定义

名称 说明
Amount

金额。

ErrorDetails

错误的详细信息。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

ErrorSubDetails
ReservationType

交易类型。

Transaction

事务。

TransactionListResult

事务的列表。

TransactionTypeKind

事务类型。 选项为 all 或 reservation。

Amount

金额。

名称 类型 说明
currency

string

金额值的货币。

value

number

金额值。

ErrorDetails

错误的详细信息。

名称 类型 说明
code

string

错误代码。

details

ErrorSubDetails[]

错误的子详细信息。

message

string

指示操作失败原因的错误消息。

target

string

特定错误的目标。

ErrorResponse

错误响应指示服务无法处理传入请求。 错误消息中提供了原因。

名称 类型 说明
error

ErrorDetails

错误的详细信息。

ErrorSubDetails

名称 类型 说明
code

string

错误代码。

message

string

指示操作失败原因的错误消息。

target

string

特定错误的目标。

ReservationType

交易类型。

名称 类型 说明
Purchase

string

Usage Charge

string

Transaction

事务。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.azureCreditApplied

Amount

自动应用于此事务的任何 Azure 额度的金额。

properties.azurePlan

string

用于事务的订阅的 Azure 计划类型。

properties.billingCurrency

string

此交易的计费货币的 ISO 4217 代码。

properties.billingProfileDisplayName

string

将针对交易计费的计费对象信息的名称。

properties.billingProfileId

string

将针对交易计费的计费对象信息的 ID。

properties.customerDisplayName

string

发生事务的客户的名称。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.customerId

string

发生事务的客户 ID。 字段仅适用于Microsoft 合作伙伴协议计费帐户。

properties.date

string

交易日期。

properties.discount

number

应用于此交易的百分比折扣(如果有)。

properties.effectivePrice

Amount

应用任何折扣后的产品价格。

properties.exchangeRate

number

用于将收费金额转换为计费货币的汇率(如果适用)。

properties.invoice

string

对交易计费的发票;如果未对交易计费,则为“挂起”。

properties.invoiceId

string

计费交易的发票的 ID。 此字段仅适用于计费的事务。

properties.invoiceSectionDisplayName

string

将针对交易计费的发票科目的名称。

properties.invoiceSectionId

string

将针对交易计费的发票科目的 ID。

properties.kind

TransactionTypeKind

事务类型。 选项为 all 或 reservation。

properties.marketPrice

Amount

产品的零售价。

properties.orderId

string

预留的订单 ID。 字段仅适用于类型预留事务。

properties.orderName

string

预留订单的名称。 字段仅适用于类型预留的事务。

properties.pricingCurrency

string

产品定价货币的 ISO 4217 代码。

properties.productDescription

string

发生事务的产品的说明。

properties.productFamily

string

发生事务的产品系列。

properties.productType

string

发生事务的产品的类型。

properties.productTypeId

string

发生事务的产品类型的 ID。

properties.quantity

integer

在交易中购买的数量。

properties.servicePeriodEndDate

string

产品期限的结束日期,或使用结束月份的结束日期。

properties.servicePeriodStartDate

string

产品的购买日期,或开始使用的月份的开始日期。

properties.subTotal

Amount

交易的税前收费金额。

properties.subscriptionId

string

用于事务的订阅的 ID。 字段仅适用于类型预留事务。

properties.subscriptionName

string

用于事务的订阅的名称。 字段仅适用于类型预留事务。

properties.tax

Amount

应用于交易的税额。

properties.transactionAmount

Amount

与事务关联的费用。

properties.transactionType

ReservationType

交易类型。

properties.unitOfMeasure

string

用于为产品计费的度量单位。 例如,计算服务按小时计费。

properties.unitType

string

给定产品的度量单位的说明。

properties.units

number

用于给定产品的单位数。

type

string

资源类型。

TransactionListResult

事务的列表。

名称 类型 说明
nextLink

string

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

totalCount

number

总记录数。

value

Transaction[]

事务的列表。

TransactionTypeKind

事务类型。 选项为 all 或 reservation。

名称 类型 说明
all

string

reservation

string