Filter Parameter
The filter parameter is used to control which records in a collection will be included in the response. Filters can only be applied to the collection of the endpoint, and not to any related collections.
Example
https://api.eventtemple.com/v2/events?filter[name][matches]=Breakfast
https://api.eventtemple.com/v2/events?filter[booking_id][eq]=1
Below is a list of all the predicates that can be used with filters, but please note that not all collections support filtering, and not all predicates are supported on all endpoints that do support filters.
Predicate | Description |
---|---|
eq | Matches the exact value |
not_eq | Matches any value except for the specified one |
matches | Matches values that contain the specified substring |
lt | Matches values less than the specified value |
lteq | Matches values less than or equal to the specified value |
gt | Matches values greater than the specified value |
gteq | Matches values greater than or equal to the specified value |
null | Matches records where the specified field is null |
not_null | Matches records where the specified field is not null |
in | Match any comma-separated values in a string |
not_in | Match none of the comma-separated values |
Updated almost 2 years ago