Reporting API v1/v2 – consolidated invoices
Introduction
The Reporting API is a collection of endpoints that you can use to get data for reporting and billing purposes on the platform. The Reporting API covers such areas as:
- Invoices (including consolidated invoices)
- Orders
- Contracts
- Subscriptions
- Organizations
- Currencies
Both the v1 and v2 API endpoints include a field in their response related to consolidated invoices:
InvoiceConsolidationID
In this article:
- Consolidated invoices in Reporting API v1
- Consolidated invoices in Reporting API v2
- Example response
- Consolidated invoices endpoint
Consolidated invoices in Reporting API v1
The API v1 endpoints include the field InvoiceConsolidationId that retrieves the ID related to consolidated invoices.
The endpoints include:
GET /api/v1/reporting/invoices/invoice-headers/{requesterId}
GET /api/v1/reporting/invoices/invoice-headers/{requesterId}/preview
GET /api/v1/reporting/invoices/invoice-rows/{requesterId}
GET /api/v1/reporting/invoices/invoice-rows/{requesterId}/preview
Consolidated invoices in Reporting API v2
Similarly to v1, you can access v2 endpoints, which include the field InvoiceConsolidationId that retrieves the ID related to consolidated invoices.
GET /api/v2/reporting/requesters/{requesterId}/invoices/headers
GET /api/v2/reporting/requesters/{requesterId}/invoices/rows
GET /api/v2/reporting/requesters/{requesterId}/partners/{partnerId}/invoices/headers
GET /api/v2/reporting/requesters/{requesterId}/partners/{partnerId}/invoices/rows
Example response
Below, you can find an example response:
{
"InvoiceId": "12345",
"RequesterId": "abc-123",
"InvoiceConsolidationId": "de205d84-70b3-071a-adf2-ed6b5e545013",
"InvoiceDateUtc": "2025-02-15T00:00:00Z",
}
Consolidated invoices endpoint
A v2 endpoint allows you to retrieve records related to consolidated invoices:
GET https://{{environment}}:8449/api/v2/reporting/requesters/{{requesterId}}/invoice-consolidationsParameters
Below you can find the set of parameters that you can use with the endpoint.
| Parameter | Type | Optional? | Description |
| invoiceYear | int | Yes | You can use it together with with invoiceMonth to filter by a specific invoice period. If lastUpdatedDate is provided then invoiceYear is optional. |
| invoiceMonth | int | Yes | You can use it in combination with invoiceYear to filter by a specific invoice period. When lastUpdatedDate is provided, invoiceMonth is optional. |
|
InvoiceConsolidationId |
Guid | Yes |
It filters the result by a specific InvoiceConsolidationId. |
| invoiceType |
enum |
Yes | It filters the invoice consolidation by its type (it can be Incoming or Outgoing). |
| consumerId |
Guid |
Yes | It filters the result for a specific customer. |
| lastUpdatedDate | DateTime | Yes |
It filters records updated after the specified date. |
Summary
In this article, you have learned how to retrieve consolidated invoice details using both v1 and v2 versions of the Reporting API. The article presented how InvoiceConsolidationId field is returned by both endpoints. The new (v2) endpoint /api/v2/reporting/requesters/{requesterId}/invoice-consolidations can be used specifically to get the data related to such consolidated invoices. The optional parameters, for example, invoiceYear or invoiceType are helpful in filtering retrieved invoices in a more precise way.
Related Content
Was this article helpful?
Articles in this section
- Reporting API v1 - overview
- Reporting API v2 - overview
- Reporting API v1/v2 - requesting access
- Reporting API v1 - data model
- Reporting API v1 - how to map your invoice data
- Reporting API v1 - detailed invoice line items
- Reporting API v2 - Invoice Taxes
- Reporting API v1 - how to identify organizations in your sales channel
- Reporting API v1 - currencies within the invoices
- Reporting API v1 - preview invoices in status 'New'
Add comment
Please sign in to leave a comment.