Lots - List By Billing Profile
Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots?api-version=2024-08-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string |
BillingAccount ID |
billing
|
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 |
OK. The request has succeeded. |
|
Other Status Codes |
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
LotsListByBillingProfile
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/lots?api-version=2024-08-01
Sample response
{
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/lots/lot1",
"name": "lot1",
"type": "Microsoft.Consumption/lots",
"properties": {
"creditCurrency": "USD",
"billingCurrency": "USD",
"originalAmount": {
"currency": "USD",
"value": 5000
},
"originalAmountInBillingCurrency": {
"exchangeRate": 5000,
"exchangeRateMonth": 1
},
"closedBalance": {
"currency": "USD",
"value": 60.9
},
"closedBalanceInBillingCurrency": {
"exchangeRate": 5000,
"exchangeRateMonth": 1
},
"reseller": {
"resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller1",
"resellerDescription": "Reseller information."
},
"source": "PurchasedCredit",
"startDate": "2024-08-01T00:00:00Z",
"expirationDate": "2024-08-01T00:00:00Z",
"poNumber": "3524",
"isEstimatedBalance": false
}
},
{
"id": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/lots/lot2",
"name": "lot2",
"type": "Microsoft.Consumption/lots",
"properties": {
"creditCurrency": "USD",
"billingCurrency": "USD",
"originalAmount": {
"currency": "USD",
"value": 6000
},
"originalAmountInBillingCurrency": {
"exchangeRate": 5000,
"exchangeRateMonth": 1
},
"closedBalance": {
"currency": "USD",
"value": 80.9
},
"closedBalanceInBillingCurrency": {
"exchangeRate": 5000,
"exchangeRateMonth": 1
},
"reseller": {
"resellerId": "/providers/Microsoft.Billing/billingAccounts/1234:5678/billingProfiles/2468/providers/Microsoft.Consumption/reseller/reseller2",
"resellerDescription": "Reseller information."
},
"source": "PurchasedCredit",
"startDate": "2024-08-01T00:00:00Z",
"expirationDate": "2023-05-31T00:00:00Z",
"poNumber": "31224",
"isEstimatedBalance": false
}
}
]
}
Definitions
Name | Description |
---|---|
amount |
The amount plus currency . |
Amount |
The amount with exchange rate. |
Error |
The details of the error. |
Error |
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:
|
Lots |
Result of listing lot summary. |
Lot |
The source of the lot. |
Lot |
A lot summary resource. |
Organization |
The organization type of the lot. |
Reseller |
The reseller properties. |
Status |
The status of the lot. |
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. |
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 |
The details of the error. |
Lots
Result of listing lot summary.
Name | Type | Description |
---|---|---|
nextLink |
string |
The link (url) to the next page of results. |
value |
The list of lot summary. |
LotSource
The source of the lot.
Value | Description |
---|---|
PurchasedCredit | |
PromotionalCredit | |
ConsumptionCommitment |
LotSummary
A lot 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.OrganizationType |
The organization type of the lot. |
|
properties.billingCurrency |
string |
The billing currency of the lot. |
properties.closedBalance |
The balance as of the last invoice. |
|
properties.closedBalanceInBillingCurrency |
The balance as of the last invoice in billing currency. |
|
properties.creditCurrency |
string |
The currency of the lot. |
properties.eTag |
string |
The eTag for the resource. |
properties.expirationDate |
string (date-time) |
The expiration date of a lot. |
properties.isEstimatedBalance |
boolean |
If true, the listed details are based on an estimation and it will be subjected to change. |
properties.originalAmount |
The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment |
|
properties.originalAmountInBillingCurrency |
The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment |
|
properties.poNumber |
string |
The po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots. |
properties.purchasedDate |
string (date-time) |
The date when the lot was added. |
properties.reseller |
The reseller of the lot. |
|
properties.source |
The source of the lot. |
|
properties.startDate |
string (date-time) |
The date when the lot became effective. |
properties.status |
The status of the lot. |
|
properties.usedAmount |
Amount consumed from the commitment. |
|
type |
string |
Resource type. |
OrganizationType
The organization type of the lot.
Value | Description |
---|---|
Primary |
Primary organization type for Multi-Entity consumption commitment. |
Contributor |
Contributor organization type for Multi-Entity consumption commitment. |
Reseller
The reseller properties.
Name | Type | Description |
---|---|---|
resellerDescription |
string |
The reseller property description. |
resellerId |
string |
The reseller property ID. |
Status
The status of the lot.
Value | Description |
---|---|
None | |
Active | |
Inactive | |
Expired | |
Complete | |
Canceled |