Get invoice details with lines
Use this workflow to retrieve invoice details, including invoice lines.
This is typically used when an external system needs to display the detailed content of an invoice, such as invoice lines, amounts, taxes, periods, products, or other billing details.
Endpoint
Code
or:
Code
When to use
Use this workflow when an external system needs more detailed invoice information than the invoice list provides.
Typical use cases include:
- displaying invoice details in a customer portal
- showing invoice lines in a CRM or customer support system
- explaining how the invoice amount was calculated
- showing product, fee, consumption, or correction lines
- synchronizing invoice details to an external system
Before you begin
First retrieve the customer's invoices.
Code
Use the token property from the invoice response to construct the invoice details request.
Depending on the available invoice data, retrieve details either by ERP id or invoice number.
Request parameters
| Parameter | Description |
|---|---|
erpId | ERP identifier for the invoice. |
invoiceNumber | Invoice number from the invoice response. |
token | Token from the invoice response. |
Use either erpid or number together with token.
Example invoice reference
An invoice returned from the invoice list may include values similar to this:
Code
Example requests
Retrieve invoice details by ERP id:
Code
Retrieve invoice details by invoice number:
Code
Response
A successful request returns invoice details, including invoice lines.
The exact response structure may depend on ERP system and tenant configuration.
Example structure:
Code
Response fields
Common invoice detail fields may include:
| Field | Description |
|---|---|
invoiceNumber | Invoice number. |
invoiceDate | Date when the invoice was issued. |
dueDate | Invoice due date. |
amount | Total invoice amount. |
restAmount | Remaining unpaid amount. |
lines | Invoice lines included in the invoice. |
Common invoice line fields may include:
| Field | Description |
|---|---|
description | Description of the invoice line. |
fromDate | Start date for the invoiced period, where applicable. |
toDate | End date for the invoiced period, where applicable. |
quantity | Quantity used for the invoice line. |
unit | Unit for the quantity, such as kWh or another unit. |
unitPrice | Unit price for the invoice line, where applicable. |
amount | Amount for the invoice line. |
vatAmount | VAT amount for the invoice line, where applicable. |
Notes
Invoice details are retrieved from the ERP system.
The response structure may vary depending on ERP system, tenant configuration, and invoice type.
Use the token property from the invoice response when retrieving invoice details.
Use erpid when the ERP id is available. Use number when retrieving by invoice number.
For invoice PDF retrieval, use the invoice PDF endpoint instead.
Related endpoints
Code

