# Filtering
For endpoints with List requests, the API supports filtering response based on predefined system filters
Filters are added to requests as a parameter filter[filter_name]=filter_value
You can use multiple filters in the same time as filter[filter_name]=filter_value&filter[filter_name]=filter_value
List of usable filters for each API endpoint is available in the endpoint details
Sample
- List orders without filters
GET URL/api/orders
API Response
{
"data": [
{
"id": "8f55cbc",
"reference": "00367",
"type": 1,
"source": 1,
"status": 4,
"business_date": "2019-12-10",
"total_price": 20,
"closed_at": "2019-12-10 14:02:05",
"created_at": "2019-12-10 14:02:18"
},
{
"id": "8f55cb48",
"reference": "00366",
"type": 2,
"source": 1,
"status": 4,
"business_date": "2019-12-10",
"total_price": 61,
"closed_at": "2019-12-10 14:00:40",
"created_at": "2019-12-10 14:00:55"
},
{
"id": "8f557ebd",
"reference": "00363",
"number": 4,
"type": 2,
"source": 1,
"status": 4,
"business_date": "2019-12-11",
"total_price": 46,
"closed_at": "2019-12-10 10:26:40",
"created_at": "2019-12-10 10:26:53"
}
]
}
- List orders filtered by
business_date
GET URL/api/orders?filter[business_date]=2019-12-10
API Response
{
"data": [
{
"id": "8f55cbc",
"reference": "00367",
"type": 1,
"source": 1,
"status": 4,
"business_date": "2019-12-10",
"total_price": 20,
"closed_at": "2019-12-10 14:02:05",
"created_at": "2019-12-10 14:02:18"
},
{
"id": "8f55cb48",
"reference": "00366",
"type": 2,
"source": 1,
"status": 4,
"business_date": "2019-12-10",
"total_price": 61,
"closed_at": "2019-12-10 14:00:40",
"created_at": "2019-12-10 14:00:55"
}
]
}
- List orders filtered by
business_dateandtype
GET URL/api/orders?filter[business_date]=2019-12-10&filter[type]=1
API Response
{
"data": [
{
"id": "8f55cbc",
"reference": "00367",
"type": 1,
"source": 1,
"status": 4,
"business_date": "2019-12-10",
"total_price": 20,
"closed_at": "2019-12-10 14:02:05",
"created_at": "2019-12-10 14:02:18"
}
]
}
← Includables Sorting →