Skip to main content
GET
List invoices

Complex Usage Example

Advanced Invoice Filtering with Full Context

This example demonstrates advanced filtering with multiple parameters, status filtering, company relationships, and pagination for retrieving invoices:
Filter and sort on a related (included) object by nesting into the relationship — the same relationships you pass to include.
  • To-one relations nest directly: { "issuer": { "name": { "_eq": "Acme" } } }, and sort by a dot-path: "orderBy": { "field": "issuer.name", "direction": "asc" }.
  • To-many relations must be quantified with _some, _every, or _none: { "items": { "_some": { "quantity": { "_gt": 1 } } } }. They are not directly sortable (a to-many sort needs an aggregate proxy).
  • Composite composite_* columns are virtual — filter and sort on their underlying source fields, not on the composite.
Workspace row-level security applies at every hop, so a related-object filter never widens your tenant scope. Full operator set, deep-nesting rules, and pagination notes: Filtering & sorting. This resource’s related objects (the ones you can include) and how to filter or sort on each: Replace field_name with any field of the related object. See its object-reference page for the full field list. Filter by a to-one relation (and sort by it):
Filter by a to-many relation (quantified — bare nesting is invalid):

Headers

Authorization
string
required

Bearer token for authentication

Query Parameters

issuer_id
string

Filter invoices where the specified company is the issuer.

receiver_id
string

Filter invoices where the specified company is the receiver.

status
enum<string>

Filter invoices by status.

Available options:
draft,
sent,
paid,
cancelled
date_from
string<date>

Filter invoices issued on or after this date (YYYY-MM-DD).

date_to
string<date>

Filter invoices issued on or before this date (YYYY-MM-DD).

page[limit]
integer
default:20

Number of invoices per page.

Required range: 1 <= x <= 100
page[cursor]
string

Cursor for pagination.

include
enum<string>

Include related resources in the response. Multiple relationships can be included by separating them with commas.

Available options:
company,
payment_means,
people,
document

Response

Invoices retrieved successfully

data
object[]
meta
object