Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Retrieve Available Search Filters

...

Code Block
languagejson
// 20230501162434
// https://api.beta.club.reclink.org/public-programs/api/search/filters

{
  "filters": {
    "searchText": {
      "title": "Search",
      "default": null,
      "required": false,
      "help": "Search by program name, description or code",
      "field": {
        "type": "text"
      },
      "selected": null
    },
    "postcode": {
      "title": "Postcode",
      "default": null,
      "required": false,
      "help": "Search by a specific postcode",
      "field": {
        "type": "text"
      },
      "selected": null
    },
    "latitude": {
      "title": "Latitude",
      "default": null,
      "required": false,
      "help": "Search by a specific geo-coordinate",
      "field": {
        "type": "text"
      },
      "selected": null
    },
    "longitude": {
      "title": "Longitude",
      "default": null,
      "required": false,
      "help": "Search by a specific geo-coordinate",
      "field": {
        "type": "text"
      },
      "selected": null
    },
    "distance": {
      "title": "Distance (km)",
      "default": null,
      "required": false,
      "help": "Restrict programs to a specific radius",
      "field": {
        "type": "text"
      },
      "selected": null
    },
    "programTypeId": {
      "title": "Program Type",
      "default": "",
      "required": false,
      "help": "The Reclink Program Type.",
      "field": {
        "type": "choice",
        "options": {
          "6041b978-c313-49cd-ac29-ce48b180f30d": "Test"
        }
      },
      "selected": null
    },
    "programAgeType": {
      "title": "Age Range",
      "default": "",
      "required": false,
      "help": "Filter by program ages.",
      "field": {
        "type": "choice",
        "options": {
          "0-12": "CHILD",
          "13-17": "YOUTH",
          "18+": "ADULT",
          "All": "ALL"
        }
      },
      "selected": null
    },
    "owner": {
      "title": "Program Owner",
      "default": "",
      "required": true,
      "help": "Filter by program owner.",
      "field": {
        "type": "choice",
        "options": {
          "Victoria Group": "mp-clubgroups::group::VIC_GROUP"
        }
      },
      "selected": null
    },
    "startDateTime": {
      "title": "Start Date",
      "default": "",
      "required": false,
      "help": "The date this program starts.",
      "field": {
        "type": "datetime"
      },
      "selected": null
    },
    "endDateTime": {
      "title": "End Date",
      "default": "",
      "required": false,
      "help": "The date this program terminates.",
      "field": {
        "type": "datetime"
      },
      "selected": null
    },
    "dateBetween": {
      "title": "Program Date",
      "default": "",
      "required": false,
      "help": "A date that lies within the range of the program.",
      "field": {
        "type": "datetime"
      },
      "selected": null
    }
  }
}

Perform Search

Endpoint

Code Block
POST /public-programs/api/search/search

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:

Code Block
languagejson
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "API Response",
  "type": "object",
  "properties": {
    "programs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "prc": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "startDate": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date-time"
              },
              "timezone_type": {
                "type": "integer"
              },
              "timezone": {
                "type": "string"
              }
            },
            "required": ["date", "timezone_type", "timezone"]
          },
          "endDate": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date-time"
              },
              "timezone_type": {
                "type": "integer"
              },
              "timezone": {
                "type": "string"
              }
            },
            "required": ["date", "timezone_type", "timezone"]
          },
          "ageRangeType": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "postcode": {
            "type": "string"
          },
          "sessionCount": {
            "type": "integer"
          },
          "banner": {
            "type": "string"
          }
        },
        "required": ["title", "id", "prc", "description", "startDate", "endDate", "ageRangeType", "location", "postcode", "sessionCount", "banner"]
      }
    }
  },
  "required": ["programs"]
}