Compartilhar via


Usage Details - List

Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later.

Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify customers once a date for retirement has been determined.For Learn more,see Generate Cost Details Report - Create Operation

GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?$expand={$expand}&$filter={$filter}&$skiptoken={$skiptoken}&$top={$top}&api-version=2024-08-01&metric={metric}

URI Parameters

Name In Required Type Description
scope
path True

string

The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

api-version
query True

string

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

$expand
query

string

May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details.

$filter
query

string

May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. 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 is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type

$skiptoken
query

string

Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.

$top
query

integer

int32

May be used to limit the number of results to the most recent N usageDetails.

metric
query

metrictype

Allows to select different type of cost/usage records.

Responses

Name Type Description
200 OK

UsageDetailsListResult

OK. The request has succeeded.

204 No Content

No Content. The request has succeeded but returned no results.

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

BillingAccountUsageDetailsList-Legacy
BillingAccountUsageDetailsList-Modern
BillingAccountUsageDetailsListForBillingPeriod-Legacy
BillingProfileUsageDetailsList-Modern
CustomerUsageDetailsList-Modern
DepartmentUsageDetailsList-Legacy
DepartmentUsageDetailsListForBillingPeriod-Legacy
EnrollmentAccountUsageDetailsList-Legacy
EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy
InvoiceSectionUsageDetailsList-Modern
ManagementGroupUsageDetailsList-Legacy
ManagementGroupUsageDetailsListForBillingPeriod-Legacy
UsageDetailsExpand-Legacy
UsageDetailsList-Legacy
UsageDetailsListByMetricActualCost-Legacy
UsageDetailsListByMetricAmortizedCost-Legacy
UsageDetailsListByMetricUsage-Legacy
UsageDetailsListFilterByTag-Legacy
UsageDetailsListForBillingPeriod-Legacy

BillingAccountUsageDetailsList-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.7329,
        "effectivePrice": 0.000402776395232,
        "cost": 0.000295194820065,
        "unitPrice": 4.38,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

BillingAccountUsageDetailsList-Modern

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "modern",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "1234:56789",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
        "billingProfileId": "2468",
        "billingProfileName": "Account Name 1",
        "subscriptionGuid": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-10-30T00:00:00.0000000Z",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "quantity": 0.7329,
        "unitPrice": 4.38,
        "billingCurrencyCode": "USD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "invoiceSectionId": "98765",
        "invoiceSectionName": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "additionalInfo": "{  \"UsageType\": \"ComputeHR\",  \"ImageType\": \"Windows Client BYOL\",  \"ServiceType\": \"Standard_D1\",  \"VMName\": null,  \"VMProperties\": null,  \"VCPUs\": 1,  \"CPUs\": 0}",
        "costInBillingCurrency": 1.84763819095477,
        "costInPricingCurrency": 1.84763819095477,
        "exchangeRate": "1",
        "exchangeRateDate": "2019-09-30T00:00:00Z",
        "invoiceId": "",
        "previousInvoiceId": "",
        "pricingCurrencyCode": "USD",
        "product": "Virtual Machines D Series - D1 - US East",
        "productIdentifier": "DZH318Z0BQ4B00FV",
        "productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
        "productOrderName": "Azure plan",
        "publisherName": "Microsoft",
        "publisherType": "Microsoft",
        "resourceLocationNormalized": "US East",
        "serviceInfo1": "",
        "serviceInfo2": "Windows Client BYOL",
        "servicePeriodEndDate": "2019-12-01T00:00:00Z",
        "servicePeriodStartDate": "2019-09-01T00:00:00Z",
        "customerTenantId": "00000000-0000-0000-0000-000000000000",
        "customerName": "Modern Azure Customer 1",
        "partnerTenantId": "00000000-0000-0000-0000-000000000000",
        "partnerName": "Partner Name 1",
        "resellerMpnId": "",
        "resellerName": "Reseller Name 1",
        "publisherId": "",
        "reservationId": "",
        "reservationName": "",
        "frequency": "UsageBased",
        "term": "",
        "marketPrice": 0.077,
        "costInUSD": 1.84763819095477,
        "paygCostInBillingCurrency": 1.848,
        "paygCostInUSD": 1.848,
        "exchangeRatePricingToBilling": 0.077,
        "partnerEarnedCreditRate": 0.077,
        "partnerEarnedCreditApplied": "0",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

BillingAccountUsageDetailsListForBillingPeriod-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

BillingProfileUsageDetailsList-Modern

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "modern",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "1234:56789",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
        "billingProfileId": "2468",
        "billingProfileName": "Account Name 1",
        "subscriptionGuid": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-10-30T00:00:00.0000000Z",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "quantity": 0.7329,
        "unitPrice": 4.38,
        "billingCurrencyCode": "USD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "invoiceSectionId": "98765",
        "invoiceSectionName": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "additionalInfo": "{  \"UsageType\": \"ComputeHR\",  \"ImageType\": \"Windows Client BYOL\",  \"ServiceType\": \"Standard_D1\",  \"VMName\": null,  \"VMProperties\": null,  \"VCPUs\": 1,  \"CPUs\": 0}",
        "costInBillingCurrency": 1.84763819095477,
        "costInPricingCurrency": 1.84763819095477,
        "exchangeRate": "1",
        "exchangeRateDate": "2019-09-30T00:00:00Z",
        "invoiceId": "",
        "previousInvoiceId": "",
        "pricingCurrencyCode": "USD",
        "product": "Virtual Machines D Series - D1 - US East",
        "productIdentifier": "DZH318Z0BQ4B00FV",
        "productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
        "productOrderName": "Azure plan",
        "publisherName": "Microsoft",
        "publisherType": "Microsoft",
        "resourceLocationNormalized": "US East",
        "serviceInfo1": "",
        "serviceInfo2": "Windows Client BYOL",
        "servicePeriodEndDate": "2019-12-01T00:00:00Z",
        "servicePeriodStartDate": "2019-09-01T00:00:00Z",
        "customerTenantId": "00000000-0000-0000-0000-000000000000",
        "customerName": "Modern Azure Customer 1",
        "partnerTenantId": "00000000-0000-0000-0000-000000000000",
        "partnerName": "Partner Name 1",
        "resellerMpnId": "",
        "resellerName": "Reseller Name 1",
        "publisherId": "",
        "reservationId": "",
        "reservationName": "",
        "frequency": "UsageBased",
        "term": "",
        "marketPrice": 0.077,
        "costInUSD": 1.84763819095477,
        "paygCostInBillingCurrency": 1.848,
        "paygCostInUSD": 1.848,
        "exchangeRatePricingToBilling": 0.077,
        "partnerEarnedCreditRate": 0.077,
        "partnerEarnedCreditApplied": "0",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

CustomerUsageDetailsList-Modern

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "modern",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "1234:56789",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
        "billingProfileId": "2468",
        "billingProfileName": "Account Name 1",
        "subscriptionGuid": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-10-30T00:00:00.0000000Z",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "quantity": 0.7329,
        "unitPrice": 4.38,
        "billingCurrencyCode": "USD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "invoiceSectionId": "98765",
        "invoiceSectionName": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "additionalInfo": "{  \"UsageType\": \"ComputeHR\",  \"ImageType\": \"Windows Client BYOL\",  \"ServiceType\": \"Standard_D1\",  \"VMName\": null,  \"VMProperties\": null,  \"VCPUs\": 1,  \"CPUs\": 0}",
        "costInBillingCurrency": 1.84763819095477,
        "costInPricingCurrency": 1.84763819095477,
        "exchangeRate": "1",
        "exchangeRateDate": "2019-09-30T00:00:00Z",
        "invoiceId": "",
        "previousInvoiceId": "",
        "pricingCurrencyCode": "USD",
        "product": "Virtual Machines D Series - D1 - US East",
        "productIdentifier": "DZH318Z0BQ4B00FV",
        "productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
        "productOrderName": "Azure plan",
        "publisherName": "Microsoft",
        "publisherType": "Microsoft",
        "resourceLocationNormalized": "US East",
        "serviceInfo1": "",
        "serviceInfo2": "Windows Client BYOL",
        "servicePeriodEndDate": "2019-12-01T00:00:00Z",
        "servicePeriodStartDate": "2019-09-01T00:00:00Z",
        "customerTenantId": "00000000-0000-0000-0000-000000000000",
        "customerName": "Modern Azure Customer 1",
        "partnerTenantId": "00000000-0000-0000-0000-000000000000",
        "partnerName": "Partner Name 1",
        "resellerMpnId": "",
        "resellerName": "Reseller Name 1",
        "publisherId": "",
        "reservationId": "",
        "reservationName": "",
        "frequency": "UsageBased",
        "term": "",
        "marketPrice": 0.077,
        "costInUSD": 1.84763819095477,
        "paygCostInBillingCurrency": 1.848,
        "paygCostInUSD": 1.848,
        "exchangeRatePricingToBilling": 0.077,
        "partnerEarnedCreditRate": 0.077,
        "partnerEarnedCreditApplied": "0",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

DepartmentUsageDetailsList-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.7329,
        "effectivePrice": 0.000402776395232,
        "cost": 0.000295194820065,
        "unitPrice": 4.38,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

DepartmentUsageDetailsListForBillingPeriod-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

EnrollmentAccountUsageDetailsList-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.7329,
        "effectivePrice": 0.000402776395232,
        "cost": 0.000295194820065,
        "unitPrice": 4.38,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

InvoiceSectionUsageDetailsList-Modern

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "modern",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "1234:56789",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
        "billingProfileId": "2468",
        "billingProfileName": "Account Name 1",
        "subscriptionGuid": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-10-30T00:00:00.0000000Z",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "quantity": 0.7329,
        "unitPrice": 4.38,
        "billingCurrencyCode": "USD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "invoiceSectionId": "98765",
        "invoiceSectionName": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "additionalInfo": "{  \"UsageType\": \"ComputeHR\",  \"ImageType\": \"Windows Client BYOL\",  \"ServiceType\": \"Standard_D1\",  \"VMName\": null,  \"VMProperties\": null,  \"VCPUs\": 1,  \"CPUs\": 0}",
        "costInBillingCurrency": 1.84763819095477,
        "costInPricingCurrency": 1.84763819095477,
        "exchangeRate": "1",
        "exchangeRateDate": "2019-09-30T00:00:00Z",
        "invoiceId": "",
        "previousInvoiceId": "",
        "pricingCurrencyCode": "USD",
        "product": "Virtual Machines D Series - D1 - US East",
        "productIdentifier": "DZH318Z0BQ4B00FV",
        "productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
        "productOrderName": "Azure plan",
        "publisherName": "Microsoft",
        "publisherType": "Microsoft",
        "resourceLocationNormalized": "US East",
        "serviceInfo1": "",
        "serviceInfo2": "Windows Client BYOL",
        "servicePeriodEndDate": "2019-12-01T00:00:00Z",
        "servicePeriodStartDate": "2019-09-01T00:00:00Z",
        "customerTenantId": "00000000-0000-0000-0000-000000000000",
        "customerName": "Modern Azure Customer 1",
        "partnerTenantId": "00000000-0000-0000-0000-000000000000",
        "partnerName": "Partner Name 1",
        "resellerMpnId": "",
        "resellerName": "Reseller Name 1",
        "publisherId": "",
        "reservationId": "",
        "reservationName": "",
        "frequency": "UsageBased",
        "term": "",
        "marketPrice": 0.077,
        "costInUSD": 1.84763819095477,
        "paygCostInBillingCurrency": 1.848,
        "paygCostInUSD": 1.848,
        "exchangeRatePricingToBilling": 0.077,
        "partnerEarnedCreditRate": 0.077,
        "partnerEarnedCreditApplied": "0",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

ManagementGroupUsageDetailsList-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    },
    {
      "id": "/scope/providers/Microsoft.Billing/billingPeriods/20180801/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
      "name": "usageDetails_Id2",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 2",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 2",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 2",
        "partNumber": "Part Number 2",
        "meterId": "11111111-1111-1111-1111-111111111111",
        "meterDetails": null,
        "quantity": 0.7329,
        "effectivePrice": 0.000402776395232,
        "cost": 0.000295194820065,
        "unitPrice": 4.38,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
        "resourceName": "Resource Name 2",
        "invoiceSection": "Invoice Section 2",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 2",
        "offerId": "Offer Id 2",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

ManagementGroupUsageDetailsListForBillingPeriod-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    },
    {
      "id": "/scope/providers/Microsoft.Billing/billingPeriods/billingPeriodName/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
      "name": "usageDetails_Id2",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 2",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 2",
        "accountName": "Account Name 2",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 2",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 2",
        "partNumber": "Part Number 2",
        "meterId": "11111111-1111-1111-1111-111111111111",
        "meterDetails": null,
        "quantity": 0.4759,
        "effectivePrice": 0.073488920944598,
        "cost": 0.000821821271948,
        "unitPrice": 5.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
        "resourceName": "Resource Name 2",
        "invoiceSection": "Invoice Section 2",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 2",
        "offerId": "Offer Id 2",
        "isAzureCreditEligible": false,
        "chargeType": "UnusedReservation",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsExpand-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?$expand=meterDetails,additionalInfo&$filter=tags eq 'dev:tools'&$top=1&api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": {
          "meterName": "Data Transfer Out (GB)",
          "meterCategory": "Networking",
          "meterSubCategory": "ExpressRoute",
          "unitOfMeasure": "GB",
          "serviceFamily": "Compute"
        },
        "quantity": 0.8234,
        "effectivePrice": 0.010464556322455,
        "cost": 0.000342194841184,
        "unitPrice": 3.54,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "frequency": "UsageBased",
        "additionalInfo": "{\"MyType\":\"\",\"ServiceType\":\"\",\"VMName\":\"\",\"UsageType\":\"MyUsage\"}",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsList-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Customer Name 1",
        "billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Customer Name 1",
        "accountName": "AccountName",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "SubscriptionName 1",
        "date": "2019-04-09T00:00:00.0000000Z",
        "product": "Product1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 3.6E-05,
        "effectivePrice": 0.054693034210767,
        "cost": 1.980949998E-06,
        "unitPrice": 5.47,
        "billingCurrency": "CAD",
        "resourceLocation": "uswest",
        "consumedService": "Microsoft.ClassicStorage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
        "resourceName": "ResourceName1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "BAS",
        "resourceGroup": "Resource-Group-westus",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "frequency": "UsageBased",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsListByMetricActualCost-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=actualcost

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Customer Name 1",
        "billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Customer Name 1",
        "accountName": "AccountName",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "SubscriptionName 1",
        "date": "2019-04-09T00:00:00.0000000Z",
        "product": "Product1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 3.6E-05,
        "effectivePrice": 0.054693055510767,
        "cost": 1.968949998E-06,
        "unitPrice": 5.47,
        "billingCurrency": "CAD",
        "resourceLocation": "uswest",
        "consumedService": "Microsoft.ClassicStorage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
        "resourceName": "ResourceName1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "BAS",
        "resourceGroup": "Resource-Group-westus",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsListByMetricAmortizedCost-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=amortizedcost

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Customer Name 1",
        "billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Customer Name 1",
        "accountName": "AccountName",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "SubscriptionName 1",
        "date": "2019-04-09T00:00:00.0000000Z",
        "product": "Product1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 3.6E-05,
        "effectivePrice": 0.054693055510767,
        "cost": 1.968949998E-06,
        "unitPrice": 5.47,
        "billingCurrency": "CAD",
        "resourceLocation": "uswest",
        "consumedService": "Microsoft.ClassicStorage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
        "resourceName": "ResourceName1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "BAS",
        "resourceGroup": "Resource-Group-westus",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "frequency": "UsageBased",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsListByMetricUsage-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=usage

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Customer Name 1",
        "billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Customer Name 1",
        "accountName": "AccountName",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "SubscriptionName 1",
        "date": "2019-04-09T00:00:00.0000000Z",
        "product": "Product1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 3.6E-05,
        "effectivePrice": 0.054693055510767,
        "cost": 1.968949998E-06,
        "unitPrice": 5.47,
        "billingCurrency": "CAD",
        "resourceLocation": "uswest",
        "consumedService": "Microsoft.ClassicStorage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
        "resourceName": "ResourceName1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "BAS",
        "resourceGroup": "Resource-Group-westus",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsListFilterByTag-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?$filter=tags eq 'dev:tools'&api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

UsageDetailsListForBillingPeriod-Legacy

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
      "name": "usageDetails_Id1",
      "type": "Microsoft.Consumption/usageDetails",
      "kind": "legacy",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "billingAccountId": "xxxxxxxx",
        "billingAccountName": "Account Name 1",
        "billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
        "billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
        "billingProfileId": "xxxxxxxx",
        "billingProfileName": "Account Name 1",
        "accountName": "Account Name 1",
        "subscriptionId": "00000000-0000-0000-0000-000000000000",
        "subscriptionName": "Subscription Name 1",
        "date": "2019-03-30T00:00:00.0000000Z",
        "product": "Product Name 1",
        "partNumber": "Part Number 1",
        "meterId": "00000000-0000-0000-0000-000000000000",
        "meterDetails": null,
        "quantity": 0.8234,
        "effectivePrice": 0.010534556373432,
        "cost": 0.000342194841184,
        "unitPrice": 3.74,
        "billingCurrency": "CAD",
        "resourceLocation": "USEast",
        "consumedService": "Microsoft.Storage",
        "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
        "resourceName": "Resource Name 1",
        "invoiceSection": "Invoice Section 1",
        "costCenter": "DEV",
        "resourceGroup": "Resource Group 1",
        "offerId": "Offer Id 1",
        "isAzureCreditEligible": false,
        "chargeType": "Usage",
        "benefitId": "00000000-0000-0000-0000-000000000000",
        "benefitName": "Reservation_purchase_03-09-2018_10-59"
      }
    }
  ]
}

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.

LegacyUsageDetail

Legacy usage detail.

MeterDetailsResponse

The properties of the meter detail.

metrictype

Allows to select different type of cost/usage records.

ModernUsageDetail

Modern usage detail.

pricingModelType

Identifier that indicates how the meter is priced.

UsageDetailsListResult

Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.

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.

LegacyUsageDetail

Legacy usage detail.

Name Type Description
etag

string

The etag for the resource.

id

string

The full qualified ARM ID of an event.

kind string:

legacy

Specifies the kind of usage details.

name

string

The ID that uniquely identifies an event.

properties.accountName

string

Account Name.

properties.accountOwnerId

string

Account Owner Id.

properties.additionalInfo

string

Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied.

properties.benefitId

string

Unique identifier for the applicable benefit.

properties.benefitName

string

Name of the applicable benefit.

properties.billingAccountId

string

Billing Account identifier.

properties.billingAccountName

string

Billing Account Name.

properties.billingCurrency

string

Billing Currency.

properties.billingPeriodEndDate

string

The billing period end date.

properties.billingPeriodStartDate

string

The billing period start date.

properties.billingProfileId

string

Billing Profile identifier.

properties.billingProfileName

string

Billing Profile Name.

properties.chargeType

string

Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.

properties.consumedService

string

Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage.

properties.cost

number

The amount of cost before tax.

properties.costCenter

string

The cost center of this department if it is a department and a cost center is provided.

properties.date

string

Date for the usage record.

properties.effectivePrice

number

Effective Price that's charged for the usage.

properties.frequency

string

Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used.

properties.invoiceSection

string

Invoice Section Name.

properties.isAzureCreditEligible

boolean

Is Azure Credit Eligible.

properties.meterDetails

MeterDetailsResponse

The details about the meter. By default this is not populated, unless it's specified in $expand.

properties.meterId

string

The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName.

properties.offerId

string

Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P.

properties.partNumber

string

Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.

properties.payGPrice

number

Retail price for the resource.

properties.planName

string

Plan Name.

properties.pricingModel

pricingModelType

Identifier that indicates how the meter is priced.

properties.product

string

Product name for the consumed service or purchase. Not available for Marketplace.

properties.productOrderId

string

Product Order Id. For reservations this is the Reservation Order ID.

properties.productOrderName

string

Product Order Name. For reservations this is the SKU that was purchased.

properties.publisherName

string

Publisher Name.

properties.publisherType

string

Publisher Type.

properties.quantity

number

The usage quantity.

properties.reservationId

string

ARM resource id of the reservation. Only applies to records relevant to reservations.

properties.reservationName

string

User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations.

properties.resourceGroup

string

Resource Group Name.

properties.resourceId

string

Unique identifier of the Azure Resource Manager usage detail resource.

properties.resourceLocation

string

Resource Location.

properties.resourceName

string

Resource Name.

properties.serviceInfo1

string

Service-specific metadata.

properties.serviceInfo2

string

Legacy field with optional service-specific metadata.

properties.subscriptionId

string

Subscription guid.

properties.subscriptionName

string

Subscription name.

properties.term

string

Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3 year reservation.

properties.unitPrice

number

Unit Price is the price applicable to you. (your EA or other contract price).

tags

object

Resource tags.

type

string

Resource type.

MeterDetailsResponse

The properties of the meter detail.

Name Type Description
meterCategory

string

The category of the meter, for example, 'Cloud services', 'Networking', etc..

meterName

string

The name of the meter, within the given meter category

meterSubCategory

string

The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..

serviceFamily

string

The service family.

unitOfMeasure

string

The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.

metrictype

Allows to select different type of cost/usage records.

Name Type Description
actualcost

string

Actual cost data.

amortizedcost

string

Amortized cost data.

usage

string

Usage data.

ModernUsageDetail

Modern usage detail.

Name Type Description
etag

string

The etag for the resource.

id

string

The full qualified ARM ID of an event.

kind string:

modern

Specifies the kind of usage details.

name

string

The ID that uniquely identifies an event.

properties.additionalInfo

string

Additional details of this usage item. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied.

properties.benefitId

string

Unique identifier for the applicable benefit.

properties.benefitName

string

Name of the applicable benefit.

properties.billingAccountId

string

Billing Account identifier.

properties.billingAccountName

string

Name of the Billing Account.

properties.billingCurrencyCode

string

The currency defining the billed cost.

properties.billingPeriodEndDate

string

Billing Period End Date as in the invoice.

properties.billingPeriodStartDate

string

Billing Period Start Date as in the invoice.

properties.billingProfileId

string

Identifier for the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc.

properties.billingProfileName

string

Name of the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc.

properties.chargeType

string

Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.

properties.consumedService

string

Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage.

properties.costAllocationRuleName

string

Name for Cost Allocation Rule.

properties.costCenter

string

The cost center of this department if it is a department and a cost center is provided.

properties.costInBillingCurrency

number

ExtendedCost or blended cost before tax in billed currency.

properties.costInPricingCurrency

number

ExtendedCost or blended cost before tax in pricing currency to correlate with prices.

properties.costInUSD

number

Estimated extendedCost or blended cost before tax in USD.

properties.customerName

string

Name of the customer's AAD tenant.

properties.customerTenantId

string

Identifier of the customer's AAD tenant.

properties.date

string

Date for the usage record.

properties.effectivePrice

number

Effective Price that's charged for the usage.

properties.exchangeRate

string

Exchange rate used in conversion from pricing currency to billing currency.

properties.exchangeRateDate

string

Date on which exchange rate used in conversion from pricing currency to billing currency.

properties.exchangeRatePricingToBilling

number

Exchange Rate from pricing currency to billing currency.

properties.frequency

string

Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used.

properties.instanceName

string

Instance Name.

properties.invoiceId

string

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

properties.invoiceSectionId

string

Identifier of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners.

properties.invoiceSectionName

string

Name of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners.

properties.isAzureCreditEligible

boolean

Determines if the cost is eligible to be paid for using Azure credits.

properties.marketPrice

number

Market Price that's charged for the usage.

properties.meterCategory

string

Identifies the top-level service for the usage.

properties.meterId

string

The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName.

properties.meterName

string

Identifies the name of the meter against which consumption is measured.

properties.meterRegion

string

Identifies the location of the datacenter for certain services that are priced based on datacenter location.

properties.meterSubCategory

string

Defines the type or sub-category of Azure service that can affect the rate.

properties.partnerEarnedCreditApplied

string

Flag to indicate if partner earned credit has been applied or not.

properties.partnerEarnedCreditRate

number

Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access.

properties.partnerName

string

Name of the partner' AAD tenant.

properties.partnerTenantId

string

Identifier for the partner's AAD tenant.

properties.payGPrice

number

Retail price for the resource.

properties.paygCostInBillingCurrency

number

The amount of PayG cost before tax in billing currency.

properties.paygCostInUSD

number

The amount of PayG cost before tax in US Dollar currency.

properties.previousInvoiceId

string

Reference to an original invoice there is a refund (negative cost). This is populated only when there is a refund.

properties.pricingCurrencyCode

string

Pricing Billing Currency.

properties.pricingModel

pricingModelType

Identifier that indicates how the meter is priced

properties.product

string

Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available for Marketplace.

properties.productIdentifier

string

Identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of productId and SkuId in partner center.

properties.productOrderId

string

The identifier for the asset or Azure plan name that the subscription belongs to. For example: Azure Plan. For reservations this is the Reservation Order ID.

properties.productOrderName

string

Product Order Name. For reservations this is the SKU that was purchased.

properties.provider

string

Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c

properties.publisherId

string

Publisher Id.

properties.publisherName

string

Name of the publisher of the service including Microsoft or Third Party publishers.

properties.publisherType

string

Type of publisher that identifies if the publisher is first party, third party reseller or third party agency.

properties.quantity

number

Measure the quantity purchased or consumed.The amount of the meter used during the billing period.

properties.resellerMpnId

string

MPNId for the reseller associated with the subscription.

properties.resellerName

string

Reseller Name.

properties.reservationId

string

ARM resource id of the reservation. Only applies to records relevant to reservations.

properties.reservationName

string

User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations.

properties.resourceGroup

string

Name of the Azure resource group used for cohesive lifecycle management of resources.

properties.resourceLocation

string

Name of the resource location.

properties.resourceLocationNormalized

string

Resource Location Normalized.

properties.serviceFamily

string

List the service family for the product purchased or charged (Example: Storage ; Compute).

properties.serviceInfo1

string

Service-specific metadata.

properties.serviceInfo2

string

Legacy field with optional service-specific metadata.

properties.servicePeriodEndDate

string

End date for the period when the service usage was rated for charges. The prices for Azure services are determined based on the rating period.

properties.servicePeriodStartDate

string

Start date for the rating period when the service usage was rated for charges. The prices for Azure services are determined for the rating period.

properties.subscriptionGuid

string

Unique Microsoft generated identifier for the Azure Subscription.

properties.subscriptionName

string

Name of the Azure Subscription.

properties.term

string

Term (in months). Displays the term for the validity of the offer. For example. In case of reserved instances it displays 12 months for yearly term of reserved instance. For one time purchases or recurring purchases, the terms displays 1 month; This is not applicable for Azure consumption.

properties.unitOfMeasure

string

Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s.

properties.unitPrice

number

Unit Price is the price applicable to you. (your EA or other contract price).

tags

object

Resource tags.

type

string

Resource type.

pricingModelType

Identifier that indicates how the meter is priced.

Name Type Description
On Demand

string

Reservation

string

Spot

string

UsageDetailsListResult

Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.

Name Type Description
nextLink

string

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

value UsageDetail[]:

The list of usage details.