Retrieves invoice line items for a specified billing period. The API returns detailed invoice records including subscription information, customer details, pricing, taxes, discounts, billing metadata, and ownership hierarchy information.
Endpoint
POST {{apiUrl}}/api/invoices/Download/v3/BillingPeriods/{{billingperiodid}}
Endpoint Parameters
| Parameter | Required | Description |
|---|---|---|
{{apiUrl}} | Yes | C3 Portal API URL. |
{{billingperiodid}} | No | Billing period identifier. Specify a value to retrieve invoice details for a particular billing period. Omit this parameter to retrieve details for the current billing period. |
Request Headers
| Header | Value |
|---|---|
| Authorization | Bearer <access_token> |
| Content-Type | application/json |
Request Body
Payload | Description |
{ "TenantId":"<tenantids-as-comma-separated-values>" } | The body for this request is optional. If the body is left blank, the API would return the invoice line items for all the active customers. |
Successful Response
A successful request returns invoice line items for the specified billing period.
Sample Response
{
"OperationType": null,
"Status": "Success",
"RequestCorrelationID": "fb56cfb8-5a3a-4368-af9a-80aa81f1ebdb",
"ErrorMessage": null,
"ErrorDetail": null,
"Data": [
{
"CustomerBillingType": null,
"ERPCustomerID": null,
"CRMOpportunityID": null,
"CouponDiscountPercentage": null,
"ProviderOfferId": "US:CFQ7TTC0LH34:0001:P3Y:Annual",
"SubscriptionStartDate": "2026-09-15T00:00:00",
"SubscriptionEndDate": "2029-08-31T00:00:00",
"ProviderCategory": "commercial",
"Category": "OnlineServicesNCE",
"ProductSKUId": "2880026b-2b0c-4251-8656-5d41ff11e3aa",
"UniqueProviderOfferId": "US:CFQ7TTC0LH34:0001:P3Y:Annual:commercial",
"UnitPriceOfProduct": 719.04000000,
"ReservationOrderId": null,
"InvoiceEntity": "Customer",
"ResellerName": null,
"ProviderInvoiceNumber": null,
"MSUnitListPriceToDistributor": null,
"MSEffectiveUnitListPriceToDistributor": null,
"MSEffectiveCostToDistributor": null,
"MSUnitRetailPrice": null,
"MSEffectiveUnitRetailPriceForCustomer": null,
"MSEffectiveRetailTotalForCustomer": null,
"DistributorTotalMargin": null,
"ResellerTotalMargin": null,
"CustomerC3Id": "C0486975-C579-400D-88DC-BA2CBDB596A6",
"CustomerSourceSystemReferenceId": null,
"ResellerC3Id": null,
"ResellerSourceSystemReferenceId": null,
"ProductTags": null,
"TenantID": "9f7f543a-93fd-4fae-b31c-8baf37da008b",
"SubscriptionID": "79b2a45a-9809-4687-ceca-1fb31b5e8a1a",
"CurrencyCode": "USD",
"AlternateId": null,
"ItemCode": "",
"CustomerName": "Contoso Ltd",
"InvoiceNumber": "Invoice_Contoso_20261001_USD_NCEUpfrontInvoice",
"InvoiceGeneratedDate": "2026-09-15T00:00:00",
"InvoiceDueDate": "2026-10-28T00:00:00",
"SubscriptionName": "Dynamics 365 Business Central Essentials",
"ChargeStartDate": "2026-09-15T00:00:00",
"ChargeEndDate": "2029-08-31T00:00:00",
"LineItemType": "NCE line item charges New",
"Quantity": 3.00000000,
"UnitPrice": 2129.58000000,
"InvoiceLineAmount": 6388.74000000,
"DiscountAmount": 1916.64000000,
"TaxAmount": 89.44000000,
"PreTaxAmount": 4472.10000000,
"PostTaxAmount": 4561.54000000,
"TaxPercentage": 2.00000000,
"SubscriptionType": "OnlineServicesNCE",
"OfferCode": "MS-CSPLicense",
"TaxCode": null,
"OfferID": "US:CFQ7TTC0LH34:0001",
"InternalBillingID": null,
"CostOnPartner": 4179.51000000,
"PONumber": null,
"Notes": null,
"OwnerEntity": "Department",
"OwnerName": "Finance",
"ConversionRate": 1.00000000,
"InvoiceNumberFromExternalService": null
}
]
}Response Properties
| Property | Description |
|---|---|
| OperationType | Reserved for internal use. Can be ignored. |
| Status | Indicates the result of the request. Possible values: Success, Error. |
| RequestCorrelationID | Unique identifier generated by C3 for request tracking and troubleshooting. |
| ErrorMessage | Contains the error message if request processing fails. |
| ErrorDetail | Contains additional error information. |
| Data | Collection of invoice line item records. |
Invoice Line Item Attributes
| Attribute | Description |
|---|---|
| CustomerBillingType | Custom billing type configured for the customer. |
| ERPCustomerID | ERP customer identifier configured for the customer. |
| CRMOpportunityID | CRM opportunity identifier configured for the customer. |
| CouponDiscountPercentage | Discount percentage applied through a coupon. |
| ProviderOfferId | Provider offer identifier in the format Market:Product:SKU:Term:BillingPlan. |
| SubscriptionStartDate | Subscription start date. |
| SubscriptionEndDate | Subscription end date. |
| ProviderCategory | Provider category of the offer, such as commercial. Returns null for custom products. |
| Category | Category of the offer, such as OnlineServicesNCE, AzurePlan, Azure, PerpetualSoftware, Custom, or Bundles. |
| ProductSKUId | Unique Microsoft product SKU identifier. |
| UniqueProviderOfferId | Unique combination of ProviderOfferId and ProviderCategory. |
| UnitPriceOfProduct | Published unit price of the product. |
| ReservationOrderId | Azure Reservation or Savings Plan order identifier. |
| InvoiceEntity | Entity receiving the invoice. Possible values include Customer and Reseller. |
| ResellerName | Name of the reseller when applicable. |
| ProviderInvoiceNumber | Invoice number provided by Microsoft. |
| CustomerC3Id | Unique identifier of the customer in C3. |
| CustomerSourceSystemReferenceId | Customer reference identifier from the source system, supplied when the customer was onboarded through the API. |
| ResellerC3Id | Unique identifier of the reseller in C3. Populated for customers managed through a reseller. |
| ResellerSourceSystemReferenceId | Reseller reference identifier from the source system, supplied when the reseller was onboarded through the API. |
| ProductTags | Tags configured for the product in C3. |
| TenantID | Microsoft tenant identifier. |
| SubscriptionID | Subscription identifier. |
| CurrencyCode | Currency used for invoicing. |
| AlternateId | Alternative order identifier provided by Microsoft. |
| ItemCode | Partner-defined product identifier. |
| CustomerName | Name of the customer. |
| InvoiceNumber | Unique invoice number. |
| InvoiceGeneratedDate | Date on which the invoice was generated. |
| InvoiceDueDate | Invoice payment due date. |
| SubscriptionName | Name of the subscription. |
| ChargeStartDate | Start date of the billed period. |
| ChargeEndDate | End date of the billed period. |
| LineItemType | Type of charge associated with the invoice line item, for example NCE line item charges New or PurchaseFee. |
| Quantity | Quantity billed. |
| UnitPrice | Price per unit. |
| InvoiceLineAmount | Total amount for the line item before discounts and taxes (Quantity × UnitPrice). |
| DiscountAmount | Discount amount applied. Returns null if no discount is applicable. |
| PreTaxAmount | Amount after discount and before tax. |
| TaxAmount | Tax amount applied. |
| PostTaxAmount | Total amount including taxes. |
| TaxPercentage | Applied tax percentage. |
| SubscriptionType | Subscription category such as OnlineServices, AzurePlan, Azure, Bundles, or Custom. |
| OfferCode | Internal offer classification code. |
| TaxCode | Tax rule applied. |
| OfferID | Offer identifier associated with the subscription. |
| InternalBillingID | Internal billing reference configured for the customer. |
| CostOnPartner | Cost charged to the partner. |
| PONumber | Purchase order number. |
| Notes | Custom invoice notes configured for the customer. |
| OwnerEntity | Owner of the invoice line item. Possible values: Customer, Site, Department. |
| OwnerName | Name of the owning entity. |
| ConversionRate | Currency conversion rate applied. |
| InvoiceNumberFromExternalService | Invoice number from external systems such as Xero or QuickBooks. |
Error Response
The API validates the supplied billing period identifier and tenant identifiers before processing the request. If validation fails, an error response is returned.
Sample Error Response
{
"OperationType": null,
"Status": "Error",
"RequestCorrelationID": "74b25ac2-aa76-456b-b5b4-3106a489fc89",
"ErrorMessage": "ERROR_DESC_BAD_INPUT",
"ErrorDetail": null,
"Data": [
{
"Atribute": "BillingPeriodId",
"AtributeKey": "BILLING_PERIOD_ID",
"Message": "Invalid Billing Period. Should be one of the 9 most recent billing periods",
"DefaultMessage": "INVALID_BILLING_PERIOD_ID",
"Value": "4"
}
]
}Validation Error Properties
| Property | Description |
|---|---|
| Attribute | Name of the invalid input parameter. |
| AttributeKey | Internal validation key. |
| Message | Human-readable validation error message. |
| DefaultMessage | Validation failure code. |
| Value | Invalid value supplied in the request. |