Filters

See API Reference for the specification of each filter. This guide explains some general principles that have been used to define the specification as well as notes about how to combine filters.

Filters are search intent

Although the names of query parameters may match fields found in the response, they are not directly related. All filters represent a search intention, e.g. "the user is interested in anything that happens on a Tuesday" (byDay=schema:Tuesday) rather than "the user is interested in anything with field byDay equal to schema:Tuesday". The API may combine multiple fields to determine if a session satisfies an intention-based filter.

Filters also have operators to modify the intention, e.g. "the user is interested in anything that costs less than £5" (priceAdult[lte]=5).

Filters that do not have an operator are assumed to mean "equals" for numbers, and "is one of" for strings e.g. "the user is interested in anything that is beginner or intermediate level" (levelType=imin:Beginner&levelType=imin:Intermediate).

Filter naming rules

Noun[operator] e.g. withpriceAdult[lte], priceAdult is the noun and lte ("Less than or equal") is the operator.

"Noun"s can be composed of multiple words. The general rule is that words are ordered from less specific to more specific (e.g. priceAdult, ageMax).

Filter Combinations

When different filters are combined (e.g. filtering for activity prefLabel as well as genderRestriction), every single EventSeries in the results that are returned matches each and every different filter

Example: activityPrefLabel=Basketball&ageRangeMin[gte]=16&genderRestriction=oa:FemaleOnly The following would be a valid session given these filters:

{
"type": "EventSeries",
"id": "https://search.imin.co/v2/sessions/example-dummyid#!/subEvent/2018-09-10T18:00:00Z",
"name": "NPB Women's Basketball",
"activity": [
{
"type": "Concept",
"id": "https://openactive.io/activity-list#e09776e6-f1b4-421b-b667-5c5913cf97aa",
// activityPrefLabel=Basketball
"prefLabel": "Basketball"
}
],
// genderRestriction=oa:FemaleOnly
"genderRestriction": "oa:FemaleOnly",
"ageRange": {
"type": "QuantitativeValue",
// ageRangeMin[gte]=16
// since minValue is greater than or equal to 16, this session is included
"minValue": 16,
"maxValue": 80
},
// other fields...
}

Filters that accept multiple values

Several filters can be supplied multiple values, which will be applied to the results as disjunctions. This means that a session matching any one of the values will be considered valid.

Example: activityId=c0360db0-a817-4bae-9167-40f89b49fc9e&activityId=f2ea7405-6098-4378-b0fe-4e398a659fc4 This filter will bring back sessions with either Tennis or Badminton as an activity. They need not match both. The following would be a valid session:

{
"type": "EventSeries",
"name": "Tennis Tuesdays",
"activity": [
{
"type": "Concept",
"id": "https://openactive.io/activity-list/#f2ea7405-6098-4378-b0fe-4e398a659fc4",
"prefLabel": "Tennis",
}
],
// other fields...
}

Find out more..

The following pages describe more specifics about certain filters.