Invoices - Get

Gets an invoice by billing account name and 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/{billingAccountName}/invoices/{invoiceName}?api-version=2020-05-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

invoiceName
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

Invoice

OK. The request has succeeded.

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

CreditNote
Invoice
InvoiceWithRebillDetails
VoidInvoice

CreditNote

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/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": "Paid",
    "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",
    "documentType": "CreditNote",
    "creditForDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001",
    "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"
      }
    ]
  }
}

Invoice

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/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",
    "documentType": "Invoice",
    "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"
      }
    ]
  }
}

InvoiceWithRebillDetails

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/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",
    "documentType": "Invoice",
    "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"
      }
    ],
    "rebillDetails": {
      "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote2",
      "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002",
      "rebillDetails": {
        "creditNoteDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/CreditNote1",
        "invoiceDocumentId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000001",
        "rebillDetails": null
      }
    }
  }
}

VoidInvoice

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/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": "Void",
    "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",
    "documentType": "Invoice",
    "billedDocumentId": "providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/I000002",
    "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.

DocumentSource

The source of the document. ENF for Brazil and DRS for rest of the world.

DocumentType

The type of the document.

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
Invoice

An invoice.

InvoiceDocumentType

The type of the document.

InvoiceStatus

The current status of the invoice.

InvoiceType

Invoice type.

PaymentMethodFamily

The family of payment method.

PaymentProperties

The properties of a payment.

RebillDetails

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

DocumentType

The type of the document.

source

DocumentSource

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

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.

Invoice

An invoice.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.amountDue

Amount

The amount due as of now.

properties.azurePrepaymentApplied

Amount

The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

properties.billedAmount

Amount

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

Amount

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

InvoiceDocumentType

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

Amount

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

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

PaymentProperties[]

List of payments.

properties.purchaseOrderNumber

string

An optional purchase order number for the invoice.

properties.rebillDetails

<string,  RebillDetails>

Rebill details for an invoice.

properties.status

InvoiceStatus

The current status of the invoice.

properties.subTotal

Amount

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

Amount

The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

properties.totalAmount

Amount

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

Amount

The paid amount.

date

string

The date when the payment was made.

paymentMethodFamily

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,  RebillDetails>

Rebill details for an invoice.