Balances - Get By Billing Account
Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances?api-version=2024-08-01
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. |
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
Balances
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/balances?api-version=2024-08-01
Sample response
{
"name": "balanceId1",
"type": "Microsoft.Consumption/balances",
"id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1",
"properties": {
"adjustmentDetails": [
{
"name": "Promo Credit",
"value": 1.1
},
{
"name": "SIE Credit",
"value": 1
}
],
"adjustments": 0,
"azureMarketplaceServiceCharges": 609.82,
"beginningBalance": 3396469.19,
"billingFrequency": "Month",
"chargesBilledSeparately": 0,
"currency": "USD ",
"endingBalance": 2922371.02,
"newPurchases": 0,
"newPurchasesDetails": [
{
"name": "Promo Purchase",
"value": 1
}
],
"overageRefund": 2012.61,
"priceHidden": false,
"serviceOverage": 0,
"totalOverage": 0,
"totalUsage": 474098.17,
"utilized": 474098.17
}
}
Definitions
| Name | Description |
|---|---|
| Balance |
A balance resource. |
|
Balance |
|
|
Balance |
|
|
Billing |
The billing frequency. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
system |
Metadata pertaining to creation and last modification of the resource. |
Balance
A balance resource.
| Name | Type | Description |
|---|---|---|
| etag |
string |
The etag for the resource. |
| 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.adjustmentDetails |
List of Adjustments (Promo credit, SIE credit etc.). |
|
| properties.adjustments |
number (decimal) |
Total adjustment amount. |
| properties.azureMarketplaceServiceCharges |
number (decimal) |
Total charges for Azure Marketplace. |
| properties.beginningBalance |
number (decimal) |
The beginning balance for the billing period. |
| properties.billingFrequency |
The billing frequency. |
|
| properties.chargesBilledSeparately |
number (decimal) |
Charges Billed separately. |
| properties.currency |
string |
The ISO currency in which the meter is charged, for example, USD. |
| properties.endingBalance |
number (decimal) |
The ending balance for the billing period (for open periods this will be updated daily). |
| properties.newPurchases |
number (decimal) |
Total new purchase amount. |
| properties.newPurchasesDetails |
List of new purchases. |
|
| properties.overageRefund |
number (decimal) |
Overage Refunds |
| properties.priceHidden |
boolean |
Price is hidden or not. |
| properties.serviceOverage |
number (decimal) |
Overage for Azure services. |
| properties.totalOverage |
number (decimal) |
serviceOverage + chargesBilledSeparately. |
| properties.totalUsage |
number (decimal) |
Azure service commitment + total Overage. |
| properties.utilized |
number (decimal) |
Total Commitment usage. |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
BalancePropertiesAdjustmentDetailsItem
| Name | Type | Description |
|---|---|---|
| name |
string |
the name of new adjustment. |
| value |
number (decimal) |
the value of new adjustment. |
BalancePropertiesNewPurchasesDetailsItem
| Name | Type | Description |
|---|---|---|
| name |
string |
the name of new purchase. |
| value |
number (decimal) |
the value of new purchase. |
BillingFrequency
The billing frequency.
| Value | Description |
|---|---|
| Month | |
| Quarter | |
| Year |
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. |
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. |