Transactions - List By Invoice
列出发票的事务。 交易包括购买、退款和 Azure 使用费。
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2024-04-01&filter={filter}&orderBy={orderBy}&top={top}&skip={skip}&count={count}&search={search}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
billing
|
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。 |
|
invoice
|
path | True |
string pattern: ^(H[0-9]-[A-Z0-9]+)$|^(?:([GHT]|HT){1}[A-Z0-9]{9})$|^(?:[D]{1}[A-Z0-9]{9})$|^(?:E{1}[B-Z0-9]{1}[A-Z0-9]{8})$|^(?:EA[A-Z0-9]{8})$ |
唯一标识发票的 ID。 |
|
api-version
|
query | True |
string |
要用于客户端请求的 API 的版本。 当前版本为 2024-04-01。 |
|
count
|
query |
boolean |
Count 查询选项允许客户端请求响应中资源中包含的匹配资源的计数。 |
|
|
filter
|
query |
string |
筛选器查询选项允许客户端筛选请求 URL 寻址的资源集合。 |
|
|
order
|
query |
string |
orderby 查询选项允许客户端按特定顺序请求资源。 |
|
|
search
|
query |
string |
搜索查询选项允许客户端请求与自由文本搜索表达式匹配的集合中的项。 仅字符串字段支持搜索。 |
|
|
skip
|
query |
integer (int64) |
skip 查询选项请求要跳过且不包含在结果中的查询集合中的项数。 |
|
|
top
|
query |
integer (int64) |
顶部查询选项请求将查询集合中的项数包含在结果中。 顶部支持的最大值为 50。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
事务列表。 |
|
| Other Status Codes |
描述操作失败的原因的错误响应。 |
示例
TransactionsListByInvoice
示例请求
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789/transactions?api-version=2024-04-01
示例响应
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/BillingProfiles/xxxx-xxxx-xxx-xxx/transactions/41000000-0000-0000-0000-000000000000",
"name": "41000000-0000-0000-0000-000000000000",
"properties": {
"azureCreditApplied": {
"currency": "USD",
"value": 2000
},
"billingCurrency": "USD",
"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",
"consumptionCommitmentDecremented": {
"currency": "USD",
"value": 100
},
"date": "2023-05-01T00:00:00Z",
"discount": 0.1,
"effectivePrice": {
"currency": "USD",
"value": 10
},
"exchangeRate": 1,
"invoice": "G123456789",
"invoiceId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/22000000-0000-0000-0000-000000000000",
"marketPrice": {
"currency": "USD",
"value": 20
},
"partNumber": "0001",
"pricingCurrency": "USD",
"productDescription": "Standard D1, US West 3",
"productFamily": "Storage",
"productTypeId": "A12345",
"productType": "VM Instance",
"quantity": 1,
"servicePeriodStartDate": "2023-05-01T00:00:00Z",
"servicePeriodEndDate": "2023-09-30T00:00:00Z",
"subTotal": {
"currency": "USD",
"value": 4500
},
"tax": {
"currency": "USD",
"value": 500
},
"transactionAmount": {
"currency": "USD",
"value": 5000
},
"transactionType": "Purchase",
"units": 11.25,
"unitOfMeasure": "1 Minute",
"unitType": "1 Runtime Minute"
},
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions"
},
{
"id": "/providers/Microsoft.Billing/BillingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/BillingProfiles/xxxx-xxxx-xxx-xxx/transactions/51000000-0000-0000-0000-000000000000",
"name": "51000000-0000-0000-0000-000000000000",
"properties": {
"azureCreditApplied": {
"currency": "USD",
"value": 20
},
"billingCurrency": "USD",
"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",
"consumptionCommitmentDecremented": {
"currency": "USD",
"value": 50
},
"date": "2024-04-01T00:00:00Z",
"discount": 0.1,
"effectivePrice": {
"currency": "USD",
"value": 10
},
"exchangeRate": 1,
"invoice": "pending",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/22000000-0000-0000-0000-000000000000",
"marketPrice": {
"currency": "USD",
"value": 20
},
"partNumber": "0002",
"pricingCurrency": "USD",
"productDescription": "Standard Support",
"productFamily": "Storage",
"productTypeId": "A12345",
"productType": "VM Instance",
"quantity": 1,
"servicePeriodStartDate": "2023-05-01T00:00:00Z",
"servicePeriodEndDate": "2023-09-30T00:00:00Z",
"subTotal": {
"currency": "USD",
"value": 45
},
"tax": {
"currency": "USD",
"value": 5
},
"transactionAmount": {
"currency": "USD",
"value": 50
},
"transactionType": "Cancel",
"units": 1.25,
"unitOfMeasure": "1 Minute",
"unitType": "1 Runtime Minute"
},
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions"
}
]
}
定义
| 名称 | 说明 |
|---|---|
|
Amount |
退款金额。 |
|
Amount |
所请求的退款金额。 |
|
Azure |
自动应用于此事务的任何 Azure 额度量。 |
|
Consumption |
通过事务减少Microsoft Azure 消耗承诺(MACC)的数量。 |
|
created |
创建资源的标识的类型。 |
|
Credit |
事务的信用类型。 仅适用于信用交易。 |
|
Effective |
应用任何折扣后产品的价格。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Market |
产品的零售价格。 |
|
Refund |
交易的退款详细信息。 |
|
Special |
标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。 |
|
Sub |
交易的税前收费金额。 |
|
system |
与创建和上次修改资源相关的元数据。 |
| Tax |
应用于交易的税额。 |
| Transaction |
事务。 |
|
Transaction |
与事务关联的费用。 |
|
Transaction |
事务类型、计费或未计费。 |
|
Transaction |
资源列表的容器 |
|
Transaction |
事务。 |
AmountRefunded
退款金额。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
AmountRequested
所请求的退款金额。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
AzureCreditApplied
自动应用于此事务的任何 Azure 额度量。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
ConsumptionCommitmentDecremented
通过事务减少Microsoft Azure 消耗承诺(MACC)的数量。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CreditType
事务的信用类型。 仅适用于信用交易。
| 值 | 说明 |
|---|---|
| Other | |
| AzureFreeCredit | |
| AzureCreditOffer | |
| ServiceInterruption | |
| Refund |
EffectivePrice
应用任何折扣后产品的价格。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
MarketPrice
产品的零售价格。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
RefundTransactionDetails
交易的退款详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| amountRefunded |
退款金额。 |
|
| amountRequested |
所请求的退款金额。 |
|
| refundOperationId |
string |
退款操作的 ID。 |
SpecialTaxationType
标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。
| 值 | 说明 |
|---|---|
| SubtotalLevel | |
| InvoiceLevel |
SubTotal
交易的税前收费金额。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
Tax
应用于交易的税额。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
Transaction
事务。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties |
事务。 |
|
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| tags |
object |
与资源关联的元数据字典。 它可能不会针对所有资源类型进行填充。 支持的最大键/值长度为 256 个字符。 键/值不应为空值,也不应为 null。 键不能包含 <> % & \ ? / |
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
TransactionAmount
与事务关联的费用。
| 名称 | 类型 | 说明 |
|---|---|---|
| currency |
string |
金额值的货币。 |
| value |
number |
金额值。 例如,如果货币是美元,则值 600 将为 $600.00。 |
TransactionKind
事务类型、计费或未计费。
| 值 | 说明 |
|---|---|
| Other | |
| All | |
| Reservation |
TransactionListResult
资源列表的容器
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
指向下一页结果的链接(url)。 |
| value |
资源列表。 |
TransactionProperties
事务。
| 名称 | 类型 | 说明 |
|---|---|---|
| azureCreditApplied |
自动应用于此事务的任何 Azure 额度量。 |
|
| azurePlan |
string |
Azure 计划的详细信息。 |
| billingCurrency |
string |
用于计费此交易的货币的 ISO 4217 代码。 |
| billingProfileDisplayName |
计费配置文件的名称。 |
|
| billingProfileId |
string |
唯一标识计费配置文件的完全限定 ID。 |
| consumptionCommitmentDecremented |
通过事务减少Microsoft Azure 消耗承诺(MACC)的数量。 |
|
| creditType |
事务的信用类型。 仅适用于信用交易。 |
|
| customerDisplayName |
string |
客户的名称。 |
| customerId |
string |
唯一标识客户的完全限定 ID。 |
| date |
string (date-time) |
事务的日期。 |
| discount |
number |
应用于此事务的百分比折扣(如果有)。 |
| effectivePrice |
应用任何折扣后产品的价格。 |
|
| exchangeRate |
number |
用于将收费金额转换为计费货币的汇率(如果适用)。 |
| invoice |
string |
如果交易未计费,则为其计费或“挂起”的发票名称。 |
| invoiceId |
string |
对交易进行计费的发票的完全限定 ID。 此字段仅适用于计费的事务。 |
| invoiceSectionDisplayName |
string |
发票科目的名称。 |
| invoiceSectionId |
string |
唯一标识发票科目的完全限定 ID。 |
| isThirdParty |
boolean |
事务是否为第三方。 |
| kind |
事务类型、计费或未计费。 |
|
| marketPrice |
产品的零售价格。 |
|
| partNumber |
string |
执行事务的产品的部件号。 该字段仅适用于企业协议发票。 |
| pricingCurrency |
string |
产品的定价货币的 ISO 4217 代码。 |
| productDescription |
string |
交易所针对的产品的说明。 |
| productFamily |
string |
交易所针对的产品系列。 |
| productType |
string |
发生事务的产品的类型。 |
| productTypeId |
string |
发生事务的产品类型的 ID。 |
| quantity |
integer (int32) |
在事务中购买的数量。 |
| reasonCode |
string |
事务有原因代码。 |
| refundTransactionDetails |
交易的退款详细信息。 |
|
| servicePeriodEndDate |
string (date-time) |
产品术语的结束日期,或使用结束月份的结束日期。 |
| servicePeriodStartDate |
string (date-time) |
购买产品的日期,或使用情况开始的月份的开始日期。 |
| specialTaxationType |
标识用于发票的税务计算类型。 该字段仅适用于具有特殊税务计算逻辑的发票。 |
|
| subTotal |
交易的税前收费金额。 |
|
| tax |
应用于交易的税额。 |
|
| transactionAmount |
与事务关联的费用。 |
|
| transactionType |
string |
事务的类型。 |
| unitOfMeasure |
string |
用于为产品计费的度量单位。 例如,计算服务按小时计费。 |
| unitType |
string |
给定产品的度量单位的说明。 |
| units |
number |
用于给定产品的单位数。 |