Disclaimer In this beta version data has been captured from the initial report of proceedings (Hansard) which can be subsequently corrected, therefore it cannot be guaranteed to be 100% accurate. At this time deferred divisions are not included in the data sets.

Overview

Services have been developed to serve Division details filtered by house, date range, member Id, and division id. These services are available for consumption by any interested party and are documented below.

Three services are provided. A query string needs to be attached to filter the Divisions data, either a start and end date or a dynamic date must be specified in order to return data. It is also mandatory to include the output format in the url.


URL

URL: divisions/list.{format}?{query}

This service will display a list of all the Divisions which have taken place.

The information provided by this service is as follows:

  • Date of the Division
  • Division Subject
  • Time of the Division
  • Division Number
  • Hansard Identifier of Division
  • Total count of vote's for (Ayes)
  • Total count of vote's against (Noes)
  • House
  • Section of the house i.e Main chamber.

Example URL:

/Divisions/list.xml?startdate=2014-04-01&enddate=2014-04-28

URL: divisions/division/{id}.{format}

This service will bring up information for a single Division, which is as follows:

  • Subject
  • Preamble
  • PreVoteContent
  • Hansard Identifier
  • Ayes
  • Noes
  • House
  • Location of the Division
  • Divisions Time
  • Division Number
  • List of members that voted for.
  • List of members that voted against.

Example URL:

/Divisions/Division/102.xml

URL: divisions/calendar.{format}?{query}

This service will provide a list of all the dates, when a Division took place.

Example URL:

/divisions/calendar.xml?date=thismonth

Query Parameters

Parameter Description
divisionId The unique identifier of a Division.
house Valid House within Parliament (Commons or Lords).
startDate Date range start date (string: yyyy-MM-dd).
endDate Date range end date (string: yyyy-MM-dd). NB - the total number of days that can be returned by any single call is 90.
date Date, (string, a dynamic date description - see below).
memberId Valid member Id from the Members Names service (integer).

Dynamic Dates

A dynamic date can form part of the query. These values will be automatically parsed by the server to create an appropriate date range for the query.

Parameter Description
today Data for today
yesterday Data for yesterday
last7days Data for the last 7 days
last30days Data for the last 30 days
thisweek Data for the current week (start day Monday)
thismonth Data for the current calendar month
lastmonth Data for the next calendar month

Example URLs

/divisions/list.xml?date=thismonth


Output Formats

The following output formats are available, to be included in the query:

Format Description
xml Xml output, available on both services.
json Json output, available on both services.

Example URLs

/divisions/list.xml?date=thisweek

/divisions/list.json?date=thisweek