Program Search API
- 1 Retrieve Available Search Filters
- 1.1 Endpoint
- 1.2 Request Parameters
- 1.3 Request Headers
- 1.4 Response
- 1.5 Filters
- 1.6 Possible Filters
- 1.7 Response Codes
- 1.8 Example Request
- 1.9 Example Response
- 2 Perform Search
- 2.1 Endpoint
- 2.2 Request Parameters
- 2.3 Request Headers
- 2.4 Response
Retrieve Available Search Filters
This endpoint allows you to retrieve a list of available search filters for public programs.
Endpoint
GET /public-programs/api/search/filters
Request Parameters
None.
Request Headers
None.
Response
Returns a JSON object containing an array of available search filters:
{
"filters": {
"type": "object",
"properties": {
"filter": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"default": {
"type": "null"
},
"required": {
"type": "boolean"
},
"help": {
"type": "string"
},
"field": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
}
},
"selected": {
"type": "null"
}
}
}
}
Filters
The filters
object contains a list of filters that can be used to search for programs. Each filter is described by the following attributes:
title
(string, required): The title of the filter.default
(string, optional): The default value for the filter.required
(boolean, required): Indicates if the filter is required.help
(string, required): A description of the filter.field
(object, required): A description of the type of field used for the filter.type
(string, required): The type of field. Possible values aretext
,choice
, anddatetime
.options
(object, optional): An object containing the options for the filter (only used for thechoice
type).
selected
(string, optional): The currently selected value for the filter.
Possible Filters
Any of these filters can be sent as part of the response.
Filter | Type | Default | Required | Help |
---|---|---|---|---|
searchText | text | null | false | Search by program name, description or code |
postcode | text | null | false | Search by a specific postcode |
latitude | text | null | false | Search by a specific geo-coordinate |
longitude | text | null | false | Search by a specific geo-coordinate |
distance | text | null | false | Restrict programs to a specific radius |
programTypeId | choice | "" | false | The Reclink Program Type. |
programAgeType | choice | "" | false | Filter by program ages. |
owner | choice | "" | false | Filter by program owner. |
startDateTime | datetime | "" | false | The date this program starts. |
endDateTime | datetime | "" | false | The date this program terminates. |
dateBetween | datetime | "" | false | A date that lies within the range of the program |
Response Codes
Status Code | Description |
---|---|
200 | The list of available filters was found. |
500 | An unexpected error occurred. |
Example Request
GET /public-programs/api/search/filters HTTP/1.1
Host: api.beta.club.reclink.org
Example Response
Perform Search
Endpoint
Request Parameters
A URL encoded list of filters.
filters[filterKey]=filterValue
Request Headers
None.
Response
Returns a JSON object containing an array of available search results: