Get invoice by ID

Applies To

  • Partner Center
  • Partner Center operated by 21Vianet
  • Partner Center for Microsoft Cloud Germany
  • Partner Center for Microsoft Cloud for US Government

Retrieves a given invoice using the invoice ID.


  • Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
  • A valid Invoice ID.


To get an invoice by ID, use your IPartner.Invoices collection and call the ById() method, then call the Get() or GetAsync() methods.

// IPartner scopedPartnerOperations;
// var selectedInvoiceId as string;

var invoice = scopedPartnerOperations.Invoices.ById(selectedInvoiceId).Get();

Sample: Console test app. Project: PartnerSDK.FeatureSample Class: GetInvoice.cs


Request syntax

Method Request URI
GET {baseURL}/v1/invoices/{invoice-id} HTTP/1.1

URI parameter

Use the following query parameter to get the invoice.

Name Type Required Description
invoice-id string Y The value is a invoice-id that allows the reseller to filter the results for a given invoice

Request headers

  • See Headers for more information.

Request body


Request example

GET<invoice-id> HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 8ac25aa5-9537-4b6d-b782-aa0c8e979e99
MS-CorrelationId: 57eb2ca7-755f-450f-9187-eae1e75a0114


If successful, this method returns an Invoice object in the response.

Response success and error codes

Each response comes with an HTTP status code that indicates success or failure and additional debugging information. Use a network trace tool to read this code, error type, and additional parameters. For the full list, see Error Codes.

Response example

HTTP/1.1 200 OK
Content-Length: 676
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 57eb2ca7-755f-450f-9187-eae1e75a0114
MS-RequestId: 8ac25aa5-9537-4b6d-b782-aa0c8e979e99
Date: Thu, 24 Mar 2016 05:22:14 GMT