Reservation Transactions - List By Billing Profile

List of transactions for reserved instances on billing profile scope. 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}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions?$filter={$filter}&api-version=2024-08-01

URI Parameters

Name In Required Type Description
billingAccountId
path True

string

BillingAccount ID

billingProfileId
path True

string

Azure Billing Profile ID.

api-version
query True

string

Version of the API to be used with the client request. The current version is 2023-03-01.

$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 entire December 2020 month (i.e. will contain records for dates December 30 and 31)

Responses

Name Type Description
200 OK

ModernReservationTransactionsListResult

OK. The request has succeeded.

Other Status Codes

ErrorResponse

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

ReservationTransactionsByBillingProfileId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30/billingProfiles/Z76D-SGAF-BG7-TGB/providers/Microsoft.Consumption/reservationTransactions?$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30/billingProfiles/Z76D-SGAF-BG7-TGB/providers/Microsoft.Consumption/reservationTransactions",
      "name": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
      "type": "Microsoft.Consumption/reservationTransactions",
      "properties": {
        "eventDate": "2020-04-25T21:21:38Z",
        "reservationOrderId": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
        "description": "Reserved VM Instance, Standard_B1ls, US East, 3 Years",
        "eventType": "Purchase",
        "quantity": 1,
        "amount": 1.44,
        "currency": "USD",
        "reservationOrderName": "VM_RI_03-25-2020_14-18",
        "armSkuName": "Standard_B1ls",
        "billingFrequency": "Recurring",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30/billingProfiles/Z76D-SGAF-BG7-TGB",
        "billingProfileName": "IT Department*",
        "invoice": "T000456437",
        "invoiceId": "/providers/Microsoft.Billing/billingAccounts/fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30/billingProfiles/Z76D-SGAF-BG7-TGB/invoices/T000456437",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/fcebaabc-fced-4284-a83d-79f83dee183c:45796ba8-988f-45ad-bea9-7b71fc6c7513_2018-09-30/invoiceSections/QBTB-EYAK-PJA-TGB",
        "invoiceSectionName": "IT Department",
        "purchasingSubscriptionGuid": "d924ad15-4a3d-4047-971d-c8b1b300a97b",
        "purchasingSubscriptionName": "contoso",
        "region": "eastus",
        "term": "P3Y"
      }
    }
  ]
}

Definitions

Name Description
ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

  • 504 Gateway Timeout - Service timed out while processing the request. Reduce the date range in the request, if possible.

ModernReservationTransaction

Modern Reservation transaction resource.

ModernReservationTransactionsListResult

Result of listing reservation recommendations.

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

  • 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

  • 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

  • 504 Gateway Timeout - Service timed out while processing the request. Reduce the date range in the request, if possible.

Name Type Description
error

ErrorDetails

The details of the error.

ModernReservationTransaction

Modern Reservation transaction resource.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.amount

number

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.billingProfileId

string

Billing profile Id.

properties.billingProfileName

string

Billing profile name.

properties.currency

string

The ISO currency in which the transaction is charged, for example, USD.

properties.description

string

The description of the transaction.

properties.eventDate

string

The date of the transaction

properties.eventType

string

The type of the transaction (Purchase, Cancel or Refund).

properties.invoice

string

Invoice Number

properties.invoiceId

string

Invoice Id as on the invoice where the specific transaction appears.

properties.invoiceSectionId

string

Invoice Section Id

properties.invoiceSectionName

string

Invoice Section Name.

properties.purchasingSubscriptionGuid

string

The subscription guid that makes the transaction.

properties.purchasingSubscriptionName

string

The subscription name that makes the transaction.

properties.quantity

number

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.

tags

string[]

Resource tags.

type

string

Resource type.

ModernReservationTransactionsListResult

Result of listing reservation recommendations.

Name Type Description
nextLink

string

The link (url) to the next page of results.

value

ModernReservationTransaction[]

The list of reservation recommendations.