There are two ways to search the Facilities API (search.imin.co/facilities-api/v2/facility-uses/):
Using the query parameter search; or
This endpoint will tell you what facilities are available around you and when (we will refer to the "when" as "slots"). Slots will be returned and limited to a specific date when a
startDate parameter is included in the API query.
For example, the following query, https://search.imin.co/facilities-api/v2/facility-uses?geo%5Bradial%5D=51.719732,-1.198388,1000&mode=discovery-geo&limit=50&page=1&providerId=fusion&activityPrefLabel=Football, will return:
1000km radius of
That have the activity
The following query, https://search.imin.co/facilities-api/v2/facility-uses?geo%5Bradial%5D=51.719732,-1.198388,100&limit=50&page=1&providerId=fusion&activityPrefLabel=Tennis&startDate[gte]=3000-01-01T16:00:00Z, will return:
100km radius of
That have the activity
All available slots between
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. It is not possible to return slots using a query parameter search that does not include a
startDate due to the large quantity of data involved in such an API call, i.e. multiple facilities + multiple days + no slots.
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 below) to return slots for one facility over multiple days, i.e. one facility + multiple days + slots.
The Facets Endpoint can be found at https://search.imin.co/facilities-api/v2/facets. It provides an overview of some of the query parameter values that can be used for facilities search, as well as their result count.
Once a query parameter search has been completed, the data returned will include
id an for a specific facility use. This is a URL that should be used to return the next 7-days of slots for that specific facility use. An example of this is: https://search.imin.co/facilities-api/v2/facility-uses/fusion-FacilityUse-B5FOOTBALL.
For example, the following
ByID search will return all slots over the next week for a specific facility use (a Volleyball court): https://search.imin.co/facilities-api/v2/facility-uses/fusion-FacilityUse-LCVOLLEYBALLR.