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=2023-05-01

URI Parameters

Name In Required Type Description
billingAccountId
path True

string

BillingAccount ID

api-version
query True

string

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

Responses

Name Type Description
200 OK

Balance

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

Balances

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/balances?api-version=2023-05-01

Sample Response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1",
  "name": "balanceId1",
  "type": "Microsoft.Consumption/balances",
  "properties": {
    "currency": "USD  ",
    "beginningBalance": 3396469.19,
    "endingBalance": 2922371.02,
    "newPurchases": 0,
    "adjustments": 0,
    "utilized": 474098.17,
    "serviceOverage": 0,
    "chargesBilledSeparately": 0,
    "totalOverage": 0,
    "totalUsage": 474098.17,
    "azureMarketplaceServiceCharges": 609.82,
    "billingFrequency": "Month",
    "priceHidden": false,
    "overageRefund": 2012.61,
    "newPurchasesDetails": [
      {
        "name": "Promo Purchase",
        "value": 1
      }
    ],
    "adjustmentDetails": [
      {
        "name": "Promo Credit",
        "value": 1.1
      },
      {
        "name": "SIE Credit",
        "value": 1
      }
    ]
  }
}

Definitions

Name Description
AdjustmentDetails

List of Adjustments (Promo credit, SIE credit etc.).

Balance

A balance resource.

BillingFrequency

The billing frequency.

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.

NewPurchasesDetails

List of new purchases.

AdjustmentDetails

List of Adjustments (Promo credit, SIE credit etc.).

Name Type Description
name

string

the name of new adjustment.

value

number

the value of new adjustment.

Balance

A balance resource.

Name Type Description
etag

string

The etag for the resource.

id

string

The full qualified ARM ID of an event.

name

string

The ID that uniquely identifies an event.

properties.adjustmentDetails

AdjustmentDetails[]

List of Adjustments (Promo credit, SIE credit etc.).

properties.adjustments

number

Total adjustment amount.

properties.azureMarketplaceServiceCharges

number

Total charges for Azure Marketplace.

properties.beginningBalance

number

The beginning balance for the billing period.

properties.billingFrequency

BillingFrequency

The billing frequency.

properties.chargesBilledSeparately

number

Charges Billed separately.

properties.currency

string

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

properties.endingBalance

number

The ending balance for the billing period (for open periods this will be updated daily).

properties.newPurchases

number

Total new purchase amount.

properties.newPurchasesDetails

NewPurchasesDetails[]

List of new purchases.

properties.overageRefund

number

Overage Refunds

properties.priceHidden

boolean

Price is hidden or not.

properties.serviceOverage

number

Overage for Azure services.

properties.totalOverage

number

serviceOverage + chargesBilledSeparately.

properties.totalUsage

number

Azure service commitment + total Overage.

properties.utilized

number

Total Commitment usage.

tags

object

Resource tags.

type

string

Resource type.

BillingFrequency

The billing frequency.

Name Type Description
Month

string

Quarter

string

Year

string

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.

Name Type Description
error

ErrorDetails

The details of the error.

NewPurchasesDetails

List of new purchases.

Name Type Description
name

string

the name of new purchase.

value

number

the value of new purchase.