Reporting API – 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:

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

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-consolidations

 

Parameters

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.

 

Example request

An example API request that uses the consolidated invoices endpoint can look like this:

GET /api/v1/services/1234/invoice-consolidations/de705d55-75d4-231b-adb2-eb6b6a546023

 

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.

Was this article helpful?

0 out of 0 found this helpful

Add comment

Please sign in to leave a comment.