Transactions - List By Billing Account
Lists the billed and unbilled transactions by billing account name for given start and end date. Transactions include purchases, refunds and Azure usage charges. Unbilled transactions are listed under pending invoice ID and do not include tax. Tax is added to the amount once an invoice is generated.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions?api-version=2019-10-01-preview&periodStartDate={periodStartDate}&periodEndDate={periodEndDate}
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions?api-version=2019-10-01-preview&periodStartDate={periodStartDate}&periodEndDate={periodEndDate}&$filter={$filter}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string |
The ID that uniquely identifies a billing account. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. The current version is 2019-10-01-preview. |
period
|
query | True |
string |
The end date to fetch the transactions. The date should be specified in MM-DD-YYYY format. |
period
|
query | True |
string |
The start date to fetch the transactions. The date should be specified in MM-DD-YYYY format. |
$filter
|
query |
string |
May be used to filter by transaction type. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value are separated by a colon (:). |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Reservation |
Transactions |
ReservationTransactionsListByBillingAccount
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions?api-version=2019-10-01-preview&periodStartDate=2018-04-01&periodEndDate=2018-05-30&$filter=properties/kind eq 'Reservation'
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/41000000-0000-0000-0000-000000000000",
"name": "41000000-0000-0000-0000-000000000000",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
"properties": {
"kind": "reservation",
"date": "2018-04-23T00:00:00Z",
"invoice": "2344233",
"orderName": "Contoso Reserved",
"orderId": "6d8e7ed9-d3be-48b0-8c7a-e19246a6d30c",
"productDescription": "Standard D1, US West 3",
"transactionType": "Cancel",
"transactionAmount": {
"currency": "USD",
"value": 5000
},
"quantity": 4,
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
"billingProfileDisplayName": "Contoso operations billing",
"subscriptionId": "7800000000-0000-0000-0000-0000000000009456",
"subscriptionName": "Contoso operations billing"
}
},
{
"id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/21000000-0000-0000-0000-000000000000",
"name": "21000000-0000-0000-0000-000000000000",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
"properties": {
"kind": "reservation",
"date": "2018-05-05T00:00:00Z",
"invoice": "Pending",
"orderName": "Test Reserved",
"orderId": "1c24006f-8350-4315-ad8f-6d11180448f9",
"productDescription": "Standard D1, US West 3",
"transactionType": "Purchase",
"transactionAmount": {
"currency": "USD",
"value": 6000
},
"quantity": 5,
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
"billingProfileDisplayName": "Contoso operations billing",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Contoso operations billing"
}
}
]
}
TransactionsListByBillingAccount
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/transactions?api-version=2019-10-01-preview&periodStartDate=2018-04-01&periodEndDate=2018-05-30
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/41000000-0000-0000-0000-000000000000",
"name": "41000000-0000-0000-0000-000000000000",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
"properties": {
"kind": "all",
"date": "2018-05-01T00:00:00Z",
"invoice": "2344233",
"productFamily": "Storage",
"productTypeId": "A12345",
"productType": "Dev Support",
"productDescription": "Standard D1, US West 3",
"transactionType": "Purchase",
"transactionAmount": {
"currency": "USD",
"value": 5000
},
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
"billingProfileDisplayName": "Contoso operations billing",
"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}/BillingProfiles/11000000-0000-0000-0000-000000000000/transactions/51000000-0000-0000-0000-000000000000",
"name": "51000000-0000-0000-0000-000000000000",
"type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
"properties": {
"kind": "all",
"date": "2018-04-01T00:00:00Z",
"invoice": "pending",
"productFamily": "Storage",
"productTypeId": "A12345",
"productType": "Azure subscription",
"productDescription": "Send grid Gold",
"transactionType": "Usage Charge",
"transactionAmount": {
"currency": "USD",
"value": 50
},
"invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000/invoiceSections/22000000-0000-0000-0000-000000000000",
"invoiceSectionDisplayName": "Contoso operations invoiceSection",
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/11000000-0000-0000-0000-000000000000",
"billingProfileDisplayName": "Contoso operations billing",
"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"
}
}
]
}
Definitions
Name | Description |
---|---|
Amount |
The amount. |
Error |
The details of the error. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. |
Error |
|
Reservation |
The type of transaction. |
Transaction |
A transaction. |
Transaction |
The list of transactions. |
Transaction |
The kind of transaction. Options are all or reservation. |
Amount
The amount.
Name | Type | Description |
---|---|---|
currency |
string |
The currency for the amount value. |
value |
number |
Amount value. |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
The sub details of the error. |
|
message |
string |
Error message indicating why the operation failed. |
target |
string |
The target of the particular error. |
ErrorResponse
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
Name | Type | Description |
---|---|---|
error |
The details of the error. |
ErrorSubDetails
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
target |
string |
The target of the particular error. |
ReservationType
The type of transaction.
Name | Type | Description |
---|---|---|
Purchase |
string |
|
Usage Charge |
string |
Transaction
A transaction.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
name |
string |
Resource name. |
properties.azureCreditApplied |
The amount of any Azure credits automatically applied to this transaction. |
|
properties.billingCurrency |
string |
The ISO 4217 code for the currency in which this transaction is billed. |
properties.billingProfileDisplayName |
string |
The name of the billing profile which will be billed for the transaction. |
properties.billingProfileId |
string |
The ID of the billing profile which will be billed for the transaction. |
properties.customerDisplayName |
string |
The name of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account. |
properties.customerId |
string |
The ID of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account. |
properties.date |
string |
The date of transaction. |
properties.discount |
number |
The percentage discount, if any, applied to this transaction. |
properties.effectivePrice |
The price of the product after applying any discounts. |
|
properties.exchangeRate |
number |
The exchange rate used to convert charged amount to billing currency, if applicable. |
properties.invoice |
string |
Invoice on which the transaction was billed or 'pending' if the transaction is not billed. |
properties.invoiceSectionDisplayName |
string |
The name of the invoice section which will be billed for the transaction. |
properties.invoiceSectionId |
string |
The ID of the invoice section which will be billed for the transaction. |
properties.kind |
The kind of transaction. Options are all or reservation. |
|
properties.marketPrice |
The retail price of the product. |
|
properties.orderId |
string |
The order ID of the reservation. The field is only applicable for transaction of kind reservation. |
properties.orderName |
string |
The name of the reservation order. The field is only applicable for transactions of kind reservation. |
properties.pricingCurrency |
string |
The ISO 4217 code for the currency in which the product is priced. |
properties.productDescription |
string |
The description of the product for which the transaction took place. |
properties.productFamily |
string |
The family of the product for which the transaction took place. |
properties.productType |
string |
The type of the product for which the transaction took place. |
properties.productTypeId |
string |
The ID of the product type for which the transaction took place. |
properties.quantity |
integer |
The quantity purchased in the transaction. |
properties.servicePeriodEndDate |
string |
The end date of the product term, or the end date of the month in which usage ended. |
properties.servicePeriodStartDate |
string |
The date of the purchase of the product, or the start date of the month in which usage started. |
properties.subTotal |
The pre-tax charged amount for the transaction. |
|
properties.subscriptionId |
string |
The ID of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation. |
properties.subscriptionName |
string |
The name of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation. |
properties.tax |
The tax amount applied to the transaction. |
|
properties.transactionAmount |
The charge associated with the transaction. |
|
properties.transactionType |
The type of transaction. |
|
properties.unitOfMeasure |
string |
The unit of measure used to bill for the product. For example, compute services are billed per hour. |
properties.unitType |
string |
The description for the unit of measure for a given product. |
properties.units |
number |
The number of units used for a given product. |
type |
string |
Resource type. |
TransactionListResult
The list of transactions.
Name | Type | Description |
---|---|---|
nextLink |
string |
The link (url) to the next page of results. |
value |
The list of transactions. |
TransactionTypeKind
The kind of transaction. Options are all or reservation.
Name | Type | Description |
---|---|---|
all |
string |
|
reservation |
string |