Filter Supplier Invoices

Use filters to retrieve only the supplier invoices that match your criteria (supplier, date range, invoice number, category, external reference, etc.).

Filtering helps reduce dataset size, improve performance, and focus your integration on relevant invoices.

This guide shows how to use the filters[] parameter on the /supplier_invoices endpoint and lists all supported fields and operators.

📘

Reminder: Filters use a JSON array passed as the filters query parameter. See Filter API Data for the general filtering syntax.

How Filtering Works

Filtering supplier invoices uses the API’s standard filters[] format.

Example filter array:

[
  { "field": "supplier_id", "operator": "eq", "value": "sup_123" },
  { "field": "date", "operator": "gteq", "value": "2024-01-01" }
]

Example request:

GET /supplier_invoices?filters=[{"field":"supplier_id","operator":"eq","value":"sup_123"}]

You can combine as many filters as needed.

Common Use Cases

Developers typically use filters to:

  • Retrieve invoices for a specific supplier
  • Pull invoices issued within a given period
  • Match supplier invoices by invoice number or external reference
  • Filter by category (purchases, expenses, subcontracting, etc.)
  • Build BI dashboards or automated reconciliation workflows

Examples

Filter by supplier ID

GET /supplier_invoices?filters=[
  {"field":"supplier_id","operator":"eq","value":"sup_987"}
  ]

Filter by date range

GET /supplier_invoices?filters=[
  {"field":"date","operator":"gteq","value":"2024-01-01"},
  {"field":"date","operator":"lteq","value":"2024-03-31"}
]

Filter by invoice number

GET /supplier_invoices?filters=[
  {"field":"invoice_number","operator":"eq","value":"F-2024-0091"}
]

Filter by external reference

GET /supplier_invoices?filters=[
  {"field":"external_reference","operator":"eq","value":"ERP-INV-4452"}
]

Available Fields and Operators

FieldDescriptionValue TypeOperators
idSupplier invoice IDStringeq, not_eq, lt, gt, lteq, gteq, in, not_in
supplier_idSupplier IDStringeq, not_eq, lt, gt, lteq, gteq, in, not_in
invoice_numberSupplier invoice numberStringeq, not_eq, in, not_in
dateInvoice issue date (ISO 8601)Stringeq, not_eq, lt, gt, lteq, gteq, in, not_in
category_idAssigned purchase categoryStringin
external_referenceExternal reference from another systemStringeq, not_eq, in, not_in
💡

Tip: Use ISO 8601 format (YYYY-MM-DD) for date filters.

Tips & Troubleshooting

  • URL-encode the filter array to avoid 400 errors.
  • Combine filters with pagination when retrieving large datasets (using the pagination mechanism supported by the endpoint).
  • Use in / not_in for multiple supplier IDs or invoice numbers.
  • Filtering by invoice_number is exact-match, not a text search.
  • To retrieve recently updated invoices, filter by updated_at (if available), or use the Changelog API.