Invoices - Download By Billing Account
Gets a URL to download an invoice document. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement, Microsoft Customer Agreement or Enterprise Agreement.
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?api-version=2024-04-01
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download?api-version=2024-04-01&documentName={documentName}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
billing
|
path | True |
string pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$ |
The ID that uniquely identifies a billing account. |
|
invoice
|
path | True |
string pattern: ^(H[0-9]-[A-Z0-9]+)$|^(?:([GHT]|HT){1}[A-Z0-9]{9})$|^(?:[D]{1}[A-Z0-9]{9})$|^(?:E{1}[B-Z0-9]{1}[A-Z0-9]{8})$|^(?:EA[A-Z0-9]{8})$ |
The ID that uniquely identifies an invoice. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
document
|
query |
string |
The ID that uniquely identifies an invoice document. This ID may be an identifier for an invoice PDF, a credit note, or a tax receipt. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| 202 Accepted |
Resource operation accepted. Headers
|
|
| Other Status Codes |
An unexpected error response. |
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
InvoicesDownloadByBillingAccount
Sample request
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789/download?api-version=2024-04-01&documentName=12345678
Sample response
{
"expiryTime": "2023-02-16T17:32:28Z",
"url": "https://myaccount.blob.core.windows.net/invoices/1383724.pdf?sv=2019-02-02&sr=b&sp=r"
}
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/operationResults/invoiceDownload_11111111-1111-1111-1111-111111111111?api-version=2024-04-01
Retry-After: 10
Definitions
| Name | Description |
|---|---|
|
Document |
A secure URL that can be used to download a an entity until the URL expires. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
DocumentDownloadResult
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 or .zip file. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |