Invoices - Get By Id
Gets an invoice by ID. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}?api-version=2020-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
invoice
|
path | True |
string |
The ID that uniquely identifies an invoice. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. The current version is 2020-05-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
Invoice
Sample request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/invoices/{invoiceName}?api-version=2020-05-01
Sample response
{
"id": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}",
"name": "{invoiceName}",
"type": "Microsoft.Billing/billingAccounts/invoices",
"properties": {
"dueDate": "2018-01-16T17:32:28Z",
"invoiceDate": "2018-01-01T17:32:28Z",
"status": "Due",
"amountDue": {
"currency": "USD",
"value": 16.53
},
"billedAmount": {
"currency": "USD",
"value": 33.99
},
"azurePrepaymentApplied": {
"currency": "USD",
"value": 15.46
},
"creditAmount": {
"currency": "USD",
"value": 2
},
"freeAzureCreditApplied": {
"currency": "USD",
"value": 0
},
"subTotal": {
"currency": "USD",
"value": 33.99
},
"taxAmount": {
"currency": "USD",
"value": 0
},
"totalAmount": {
"currency": "USD",
"value": 16.53
},
"invoicePeriodStartDate": "2018-01-01T17:32:28Z",
"invoicePeriodEndDate": "2018-01-15T17:32:28Z",
"isMonthlyInvoice": false,
"billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
"billingProfileDisplayName": "Contoso Operations Billing",
"purchaseOrderNumber": "123456",
"documents": [
{
"kind": "Invoice",
"url": "https://microsoft.com/invoice.pdf",
"source": "DRS"
},
{
"kind": "TaxReceipt",
"url": "https://microsoft.com/taxDoc.pdf",
"source": "DRS"
}
],
"payments": [
{
"date": "2018-01-14T17:32:28Z",
"paymentType": "credited",
"amount": {
"currency": "USD",
"value": 2
},
"paymentMethodFamily": "CreditCard",
"paymentMethodType": "visa"
}
]
}
}
Definitions
Name | Description |
---|---|
Amount |
The amount. |
Document |
The properties of a document. |
Document |
The source of the document. ENF for Brazil and DRS for rest of the world. |
Document |
The type of the document. |
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. |
Error |
|
Invoice |
An invoice. |
Invoice |
The type of the document. |
Invoice |
The current status of the invoice. |
Invoice |
Invoice type. |
Payment |
The family of payment method. |
Payment |
The properties of a payment. |
Rebill |
The rebill details of an invoice. |
Amount
The amount.
Name | Type | Description |
---|---|---|
currency |
string |
The currency for the amount value. |
value |
number |
Amount value. |
Document
The properties of a document.
Name | Type | Description |
---|---|---|
kind |
The type of the document. |
|
source |
The source of the document. ENF for Brazil and DRS for rest of the world. |
|
url |
string |
Document URL. |
DocumentSource
The source of the document. ENF for Brazil and DRS for rest of the world.
Name | Type | Description |
---|---|---|
DRS |
string |
|
ENF |
string |
DocumentType
The type of the document.
Name | Type | Description |
---|---|---|
CreditNote |
string |
|
Invoice |
string |
|
TaxReceipt |
string |
|
VoidNote |
string |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
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 |
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. |
Invoice
An invoice.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
name |
string |
Resource name. |
properties.amountDue |
The amount due as of now. |
|
properties.azurePrepaymentApplied |
The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
properties.billedAmount |
The total charges for the invoice billing period. |
|
properties.billedDocumentId |
string |
The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable to the void invoices only. |
properties.billingProfileDisplayName |
string |
The name of the billing profile for which the invoice is generated. |
properties.billingProfileId |
string |
The ID of the billing profile for which the invoice is generated. |
properties.creditAmount |
The total refund for returns and cancellations during the invoice billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
properties.creditForDocumentId |
string |
The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to the credit notes only. |
properties.documentType |
The type of the document. |
|
properties.documents |
Document[] |
List of documents available to download such as invoice and tax receipt. |
properties.dueDate |
string |
The due date for the invoice. |
properties.freeAzureCreditApplied |
The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
properties.invoiceDate |
string |
The date when the invoice was generated. |
properties.invoicePeriodEndDate |
string |
The end date of the billing period for which the invoice is generated. |
properties.invoicePeriodStartDate |
string |
The start date of the billing period for which the invoice is generated. |
properties.invoiceType |
Invoice type. |
|
properties.isMonthlyInvoice |
boolean |
Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
properties.payments |
List of payments. |
|
properties.purchaseOrderNumber |
string |
An optional purchase order number for the invoice. |
properties.rebillDetails |
<string,
Rebill |
Rebill details for an invoice. |
properties.status |
The current status of the invoice. |
|
properties.subTotal |
The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
properties.subscriptionId |
string |
The ID of the subscription for which the invoice is generated. |
properties.taxAmount |
The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
properties.totalAmount |
The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
|
type |
string |
Resource type. |
InvoiceDocumentType
The type of the document.
Name | Type | Description |
---|---|---|
CreditNote |
string |
|
Invoice |
string |
InvoiceStatus
The current status of the invoice.
Name | Type | Description |
---|---|---|
Due |
string |
|
OverDue |
string |
|
Paid |
string |
|
Void |
string |
InvoiceType
Invoice type.
Name | Type | Description |
---|---|---|
AzureMarketplace |
string |
|
AzureService |
string |
|
AzureSupport |
string |
PaymentMethodFamily
The family of payment method.
Name | Type | Description |
---|---|---|
CheckWire |
string |
|
CreditCard |
string |
|
Credits |
string |
|
None |
string |
PaymentProperties
The properties of a payment.
Name | Type | Description |
---|---|---|
amount |
The paid amount. |
|
date |
string |
The date when the payment was made. |
paymentMethodFamily |
The family of payment method. |
|
paymentMethodType |
string |
The type of payment method. |
paymentType |
string |
The type of payment. |
RebillDetails
The rebill details of an invoice.
Name | Type | Description |
---|---|---|
creditNoteDocumentId |
string |
The ID of credit note. |
invoiceDocumentId |
string |
The ID of invoice. |
rebillDetails |
<string,
Rebill |
Rebill details for an invoice. |