Get invoice receipt statement
Retrieves an invoice receipt statement using invoice ID and the receipt ID.
Important
This feature is only applicable to Taiwan tax receipts.
Prerequisites
Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
A valid Invoice ID and a corresponding receipt ID.
C#
To get an invoice receipt statement by ID, starting with Partner Center SDK v1.12.0, use your IPartner.Invoices collection and call the ById() method using the invoice ID, then call the Receipts collection and call ById() then call the Documents() and Statement() methods to access the invoice receipt statement. Finally, call the Get() or GetAsync() methods.
// IPartner scopedPartnerOperations;
// string selectedInvoiceId;
var invoiceStatement = scopedPartnerOperations.Invoices.ById(selectedInvoiceId).Receipts.ById(selectedReceipt).Documents.Statement.Get();
Sample: Console test app. Project: PartnerSDK.FeatureSample Class: GetInvoiceReceiptStatement.cs
REST request
Request syntax
Method | Request URI |
---|---|
GET | {baseURL}/v1/invoices/{invoice-id}/receipts/{receipt-id}/documents/statement HTTP/1.1 |
URI parameter
Use the following query parameter to get the invoice receipt statement.
Name | Type | Required | Description |
---|---|---|---|
invoice-id | string | Yes | The value is an invoice-id that allows the reseller to filter the results for a given invoice. |
receipt-id | string | Yes | The value is a receipt-id that allows the reseller to filter the receipts for a given invoice. |
Request headers
For more information, see Partner Center REST headers.
Request body
None
Request example
GET https://api.partnercenter.microsoft.com/v1/invoices/<invoice-id>/receipts/<receipt-id>/documents/statement HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: 8ac25aa5-9537-4b6d-b782-aa0c8e979e99
MS-CorrelationId: aaaa0000-bb11-2222-33cc-444444dddddd
REST response
If successful, this method returns a pdf stream in the response body.
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: 195556
Content-Type: application/pdf
MS-CorrelationId: bbbb1111-cc22-3333-44dd-555555eeeeee
MS-RequestId: cc1ba6db-ab26-404a-9196-712b6395f518
Date: Tue, 05 Feb 2019 04:08:23 GMT
{
_content {System.Net.Http.ByteArrayContent} System.Net.Http.HttpContent {System.Net.Http.ByteArrayContent}
_content {byte[195556]} byte[]
_headers {Content-Type: application/pdf Content-Disposition: attachment; filename=E-Tax-8602768.pdf}
}