Invoices - Download Multiple Billing Profile Invoices

Gets a URL to download multiple invoice documents (invoice pdf, tax receipts, credit notes) as a zip file. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments?api-version=2020-05-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2020-05-01.

Request Body

Name Type Description
downloadUrls

string[]

An array of download urls for individual documents

Responses

Name Type Description
200 OK

DownloadUrl

OK. The request has succeeded.

202 Accepted

Accepted.

Headers

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

BillingProfileInvoiceDownload

Sample Request

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/downloadDocuments?api-version=2020-05-01

[
  "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01",
  "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01",
  "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?downloadToken={downloadToken}&useCache=True&api-version=2020-05-01"
]

Sample Response

Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationResults/invoiceDownload_{operationId}?api-version=2020-05-01
Retry-After: 10
{
  "url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r"
}

Definitions

Name Description
DownloadUrl

A secure URL that can be used to download a an entity until the URL expires.

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.

ErrorSubDetails

DownloadUrl

A secure URL that can be used to download a an entity until the URL expires.

Name Type Description
expiryTime

string

The time in UTC when the download URL will expire.

url

string

The URL to the PDF file.

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.