Share via


Price Sheet - Download By Billing Account Period

Generates the pricesheet for the provided billing period asynchronously based on the enrollment id

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download?api-version=2024-08-01

URI Parameters

Name In Required Type Description
billingAccountId
path True

string

BillingAccount ID

billingPeriodName
path True

string

pattern: ^[0-9]*$

Billing Period Name.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

OperationStatus

Request processing completed.

202 Accepted

Accepted

Headers

  • Location: string
  • Retry-After: integer
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

EAPriceSheetForBillingPeriod

Sample request

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/0000000/billingPeriods/202305/providers/Microsoft.Consumption/pricesheets/download?api-version=2024-08-01

Sample response

Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/0000000/providers/Microsoft.Consumption/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-03-01
Retry-After: 10
{
  "status": "Completed",
  "properties": {
    "downloadUrl": "https://xxxxxx.blob.core.windows.net/armpricesheetreportdownloadcontainer/20230510/00000000-0000-0000-0000-000000000000",
    "validTill": "2023-05-11T05:12:50.4266333Z"
  }
}

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.

OperationStatus

The status of the long running operation.

OperationStatusType

The status of the long running operation.

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.

OperationStatus

The status of the long running operation.

Name Type Description
properties.downloadUrl

string

The link (url) to download the pricesheet.

properties.validTill

string (date-time)

Download link validity.

status

OperationStatusType

The status of the long running operation.

OperationStatusType

The status of the long running operation.

Value Description
Running
Completed
Failed