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
| Field | Description | Value Type | Operators |
|---|---|---|---|
id | Supplier invoice ID | String | eq, not_eq, lt, gt, lteq, gteq, in, not_in |
supplier_id | Supplier ID | String | eq, not_eq, lt, gt, lteq, gteq, in, not_in |
invoice_number | Supplier invoice number | String | eq, not_eq, in, not_in |
date | Invoice issue date (ISO 8601) | String | eq, not_eq, lt, gt, lteq, gteq, in, not_in |
category_id | Assigned purchase category | String | in |
external_reference | External reference from another system | String | eq, 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_infor multiple supplier IDs or invoice numbers. - Filtering by
invoice_numberis exact-match, not a text search. - To retrieve recently updated invoices, filter by
updated_at(if available), or use the Changelog API.
Updated 11 days ago
