API version 2.1
Method
- json_search_results
- Accepts any of the following search parameters:
- tx
- Free text search, case insensitive (eg "Park")
- pc
- Postcode, accepts partial postcodes (eg "BS8" or "BS8 111")
- st
- State, must be one of `open`, `forthcoming` or `closed`
- au
- Audience, must be one of the audiences configured on the site
- in
- Interests, must be one of the interests configured on the site
- de
- Department the activity sits within. Value must be the same as the ID of a department within the site
- ar
- Area, must be one of the areas configured on the site
- dk
- Date search type, must be one of `op` (open date) and `cl` (close date)
- fd
- Date to search from. Must be used in conjunction with `dk` (dd/mm/yyyy)
- td
- Date to search until. Must be used in conjunction with `dk` (dd/mm/yyyy)
- ct
- Activity type. Must be one of `QuickConsult` (Online Survey), `File` (Email/Postal Activity), `Document` (Offline Activity), or `Link` (Link)
- fields
- Determines which groups of metadata fields about the activities will be returned. Permissible values are 'basic', 'extended' and 'all'. Omitting this parameter is equivalent to 'basic'.
If no arguments are supplied, all published activities are returned.
Any unsupported arguments will be ignored.
Returns a JSON structure containing details of each activity found:- id
- The ID of the activity
- title
- The title of the activity
- url
- The URL of the activity
- status
- State: one of `open`, `forthcoming` or `closed`
- overview
- Overview of the activity
- startdate
- The date the activity opens / opened on
- enddate
- The date the activity closes / closed on
- department
- The department that the activity belongs to (extended and above)
- type
- The type of activity (extended and above)
- type_string
- Human readable type (extended and above)
- progress
- The current state of the activity (extended and above)
- visibility
- Either 'public' or 'private' depending on if the activity has been hidden from end users (extended and above)
- audiences
- A list of ids for audiences this activity applies to (all only)
- areas
- A list of ids for areas this activity applies to NB: This field is omitted unless area support is installed (all only)
- interests
- A list of ids for interests this activity applies to (all only)
Usage
For guidance on interacting with our API, please visit the API v2.x Developers' Guide.