Reservation Transactions - List
List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01&$filter={$filter}&useMarkupIfPartner={useMarkupIfPartner}&previewMarkupPercentage={previewMarkupPercentage}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
billing
|
path | True |
string |
BillingAccount ID |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
$filter
|
query |
string |
Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31) |
|
|
preview
|
query |
number (decimal) |
Preview markup percentage to be applied. |
|
|
use
|
query |
boolean |
Applies mark up to the transactions if the caller is a partner. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
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
ReservationTransactionsByEnrollmentNumber
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01&$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&useMarkupIfPartner=True&previewMarkupPercentage=15.5
Sample response
{
"value": [
{
"name": "201909091919",
"type": "Microsoft.Consumption/reservationTransactions",
"id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
"properties": {
"description": "Standard_DS1_v2 westus 1 Year",
"accountName": "Microsoft Infrastructure",
"accountOwnerEmail": "admin@microsoft.com",
"amount": -21,
"armSkuName": "Standard_DS1_v2",
"billingFrequency": "recurring",
"billingMonth": 20190901,
"costCenter": "",
"currency": "USD",
"currentEnrollment": "123456",
"departmentName": "Unassigned",
"eventDate": "2019-09-09T19:19:04Z",
"eventType": "Refund",
"monetaryCommitment": 523123.9,
"overage": 23234.49,
"purchasingEnrollment": "123456",
"purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
"purchasingSubscriptionName": "Infrastructure Subscription",
"quantity": 1,
"region": "westus",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservationOrderName": "Transaction-DS1_v2",
"term": "P1Y"
},
"tags": []
},
{
"name": "201909091919",
"type": "Microsoft.Consumption/reservationTransactions",
"id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
"properties": {
"description": "Standard_DS1_v2 westus 1 Year",
"accountName": "Microsoft Infrastructure",
"accountOwnerEmail": "admin@microsoft.com",
"amount": 21,
"armSkuName": "Standard_DS1_v2",
"billingFrequency": "recurring",
"billingMonth": 20190901,
"costCenter": "",
"currency": "USD",
"currentEnrollment": "123456",
"departmentName": "Unassigned",
"eventDate": "2019-09-09T19:19:04Z",
"eventType": "Purchase",
"monetaryCommitment": 523123.9,
"overage": 23234.49,
"purchasingEnrollment": "123456",
"purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
"purchasingSubscriptionName": "Infrastructure Subscription",
"quantity": 1,
"region": "westus",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
"reservationOrderName": "Transaction-DS1_v2",
"term": "P1Y"
},
"tags": []
}
]
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Reservation |
Reservation transaction resource. |
|
Reservation |
Result of listing reservation recommendations. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ReservationTransaction
Reservation transaction resource.
| Name | Type | Description |
|---|---|---|
| id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
The name of the resource |
| properties.accountName |
string |
The name of the account that makes the transaction. |
| properties.accountOwnerEmail |
string |
The email of the account owner that makes the transaction. |
| properties.amount |
number (decimal) |
The charge of the transaction. |
| properties.armSkuName |
string |
This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
| properties.billingFrequency |
string |
The billing frequency, which can be either one-time or recurring. |
| properties.billingMonth |
integer (int32) |
The billing month(yyyyMMdd), on which the event initiated. |
| properties.costCenter |
string |
The cost center of this department if it is a department and a cost center is provided. |
| properties.currency |
string |
The ISO currency in which the transaction is charged, for example, USD. |
| properties.currentEnrollment |
string |
The current enrollment. |
| properties.departmentName |
string |
The department name. |
| properties.description |
string |
The description of the transaction. |
| properties.eventDate |
string (date-time) |
The date of the transaction |
| properties.eventType |
string |
The type of the transaction (Purchase, Cancel or Refund). |
| properties.monetaryCommitment |
number (decimal) |
The monetary commitment amount at the enrollment scope. |
| properties.overage |
number (decimal) |
The overage amount at the enrollment scope. |
| properties.purchasingEnrollment |
string |
The purchasing enrollment. |
| properties.purchasingSubscriptionGuid |
string (uuid) |
The subscription guid that makes the transaction. |
| properties.purchasingSubscriptionName |
string |
The subscription name that makes the transaction. |
| properties.quantity |
number (decimal) |
The quantity of the transaction. |
| properties.region |
string |
The region of the transaction. |
| properties.reservationOrderId |
string |
The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations. |
| properties.reservationOrderName |
string |
The name of the reservation order. |
| properties.term |
string |
This is the term of the transaction. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
string[] |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ReservationTransactionsListResult
Result of listing reservation recommendations.
| Name | Type | Description |
|---|---|---|
| nextLink |
string |
The link (url) to the next page of results. |
| value |
The list of reservation recommendations. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |