lineItems field is empty for some invoices

User is retrieving invoices using the Invoice API, but some of the invoices always have the lineItems field empty even though the invoice has line items in Core.

This happens in case of batch invoicing. The lineItems field is only applicable for manual invoices and it represents the service and expense items entered on the manual invoices. These items are part of the invoice model. However, for invoices created via batch processing, the line items displayed in Core are actual time and expense entries that are linked to the invoices and they are not part of the invoice model. To be able to retrieve the line items displayed on a batch invoice in Core, you need to use the Time Entry List and Expense Entry List endpoints, and filter those lists by the invoiceId of the invoice using the where parameter. Check out API Documentation for details.

Was this article helpful?
0 out of 0 found this helpful