Share via


Credits - Get

The credit summary by billingAccountId and billingProfileId.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary?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.

Responses

Name Type Description
200 OK

CreditSummary

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

CreditSummaryByBillingProfile

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/credits/balanceSummary?api-version=2024-08-01

Sample response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/credits/balanceSummary1",
  "name": "balanceSummary1",
  "type": "Microsoft.Consumption/credits/balanceSummary",
  "properties": {
    "creditCurrency": "USD",
    "billingCurrency": "USD",
    "balanceSummary": {
      "estimatedBalance": {
        "currency": "USD",
        "value": 600
      },
      "currentBalance": {
        "currency": "USD",
        "value": 100
      }
    },
    "pendingCreditAdjustments": {
      "currency": "USD",
      "value": 500
    },
    "expiredCredit": {
      "currency": "USD",
      "value": 0
    },
    "pendingEligibleCharges": {
      "currency": "USD",
      "value": 0
    },
    "reseller": {
      "resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller1",
      "resellerDescription": "Reseller information."
    },
    "isEstimatedBalance": false
  }
}

Definitions

Name Description
amount

The amount plus currency .

AmountWithExchangeRate

The amount with exchange rate.

CreditBalanceSummary

Summary of credit balances.

CreditSummary

A credit summary resource.

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.

Reseller

The reseller properties.

amount

The amount plus currency .

Name Type Description
currency

string

Amount currency.

value

number (decimal)

Amount.

AmountWithExchangeRate

The amount with exchange rate.

Name Type Description
currency

string

Amount currency.

exchangeRate

number (decimal)

The exchange rate.

exchangeRateMonth

integer (int32)

The exchange rate month.

value

number (decimal)

Amount.

CreditBalanceSummary

Summary of credit balances.

Name Type Description
currentBalance

amount

Current balance.

estimatedBalance

amount

Estimated balance.

estimatedBalanceInBillingCurrency

AmountWithExchangeRate

Estimated balance in billing currency.

CreditSummary

A credit summary resource.

Name Type Description
eTag

string

eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.

id

string

Resource Id.

name

string

Resource name.

properties.balanceSummary

CreditBalanceSummary

Summary of balances associated with this credit summary.

properties.billingCurrency

string

The billing currency.

properties.creditCurrency

string

The credit currency.

properties.eTag

string

The eTag for the resource.

properties.expiredCredit

amount

Expired credit.

properties.isEstimatedBalance

boolean

If true, the listed details are based on an estimation and it will be subjected to change.

properties.pendingCreditAdjustments

amount

Pending credit adjustments.

properties.pendingEligibleCharges

amount

Pending eligible charges.

properties.reseller

Reseller

Credit's reseller.

type

string

Resource type.

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.

Reseller

The reseller properties.

Name Type Description
resellerDescription

string

The reseller property description.

resellerId

string

The reseller property ID.