Applies to: Partner Center | Partner Center operated by 21Vianet | Partner Center for Microsoft Cloud for US Government
You can use the InvoiceSummaries to retrieve an invoice summary that shows the balance and total charges of both recurring and one-time charges. The InvoiceSummaries resource contains an invoice summary for each currency type.
Prerequisites
Credentials as described in Partner Center authentication. This scenario supports authentication with App+User credentials only.
Use your IAggregatePartner.Invoices collection to call the Summaries property.
Call the Get() method.
To get the balance of an individual InvoiceSummary, access the BalanceAmount property for that member of the collection.
C#
// IAggregatePartner scopedPartnerOperations;// Get the invoice summaries collection.var invoiceSummaries = scopedPartnerOperations.Invoices.Summaries.Get();
// Display the balance on the first invoice summary in the collection.
Console.Out.WriteLine("Current Account Balance: {0:C}", invoiceSummaries[0].BalanceAmount);
For more information, see the following example code:
If successful, this method returns an InvoiceSummaries resource 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.
Microsoft Dynamics 365 Project Operations for resource/non-stocked based scenarios offers comprehensive capabilities that are tailored to fit the needs of project managers and Accounts receivable clerk/project accountants.