Query Parameter Search
Mandatory Query Parameters
The mandatory query parameters that must be present in all API searches are:
geo[radial]modegeo-[radial]
mode
mode=discovery-geo
When using mode=discovery-geo, the startDate[gte] and startDate[lte] parameters are not permitted. As a result of this, the API will return details of the facilities, but will not include the slots available.
When using this mode, the facilities returned will be ordered by distance to the geo[radial] supplied, with closest first. For example, the query, https://search.imin.co/facilities-api/v2/facility-uses?geo[radial]=51.05602333,-2.423247080,100&mode=discovery-geo&limit=50&page=1&providerId=led&activityPrefLabel=Tennis, will return:
- Those
ledfacilities; - Within a
100km radius of51.05602333,-2.423247080; - That have the activity
Tennis.
mode=upcoming-slots
The only permitted mode with which either startDate[lte] or startDate[gte] can be supplied mode=upcoming-slots. The results returned will contain time-based information pertaining to one specific day and be ordered chronologically.
For example, the query, https://search.imin.co/facilities-api/v2/facility-uses?geo[radial]=51.05602333,-2.423247080,100&mode=upcoming-slots&limit=50&page=1&providerId=led&activityPrefLabel=Tennis&startDate[gte]=3000-01-01T16:00:00Z, would return:
- Those
ledfacilities; - Within a
100km radius of51.05602333,-2.423247080; - That have the activity
Tennis; and - All available slots between
16:00-23:59on3000-01-01.
The API will return a list of multiple facility uses (e.g. volleyball courts, football pitches, etc.) without slots for the next 2-weeks when making a query parameter search that does not include a startDate.
You can use the startDate parameter with a query parameter search to return slots for multiple facilities on a specific day, i.e. multiple facilities + one day + slots. Alternatively, you can use the ByID search (see next page) to return slots for one facility over multiple days, i.e. one facility + multiple days + slots.
mode and Slots
Optional Query Parameters
The following parameters are available for the query parameter search.
accessibilitySupportId*activityConceptCollectionId*activityIdactivityInSchemeactivityPrefLabelamenityFeatureType[valueTrue]availableChannelAdultavailableChannelJuniorlimitmembershipRequiredAdultmembershipRequiredJuniorpagepriceAdult[gte]priceAdult[lte]providerIdstartDate[gte]startDate[lte]Optional Query Parameters Examples
activityId=https%3A%2F%2Fopenactive.io%2Factivity-list%230a5f732d-e806-4e51-ad40-0a7de0239c8cactivityInScheme=https%3A%2F%2Fopenactive.io%2Factivity-listactivityPrefLabel=FootballamenityFeatureType[valueTrue]=showersavailableChannelAdult=OpenBookingPrepaymentavailableChannelJunior=OpenBookingPrepaymentlimit=10membershipRequiredAdult=truemembershipRequiredJunior=falsepage=2priceAdult[gte]=10priceAdult[lte]=5providerId=ledstartDate[gte]=3000-01-01T09:00:00ZstartDate[lte]=3999-12-31T18:00:00ZFacets Endpoint
The Facets Endpoint can be found at https://search.imin.co/facilities-api/v2/facets - NB there is a known issue with the Facets Endpoint. It provides an overview of some of the query parameter values that can be used for facilities search, as well as their result count.