@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api House of Commons Oral and Written Questions API
@base http://oralquestionsandmotions-api.parliament.uk
@version v1
@endpoints 4
@toc EarlyDayMotion(1), EarlyDayMotions(1), oralquestions(1), oralquestiontimes(1)

@group EarlyDayMotion
@endpoint GET /EarlyDayMotion/{id}
@desc Returns a single Early Day Motion by ID
@required {id: any # Early Day Motion with the ID specified.}
@returns(200) OK
@errors {400: BadRequest, 404: NotFound}

@endgroup

@group EarlyDayMotions
@endpoint GET /EarlyDayMotions/list
@desc Returns a list of Early Day Motions
@optional {parameters.edmIds: any # Early Day Motions with an ID in the list provided., parameters.uINWithAmendmentSuffix: any # Early Day Motions with an UINWithAmendmentSuffix provided., parameters.searchTerm: any # Early Day Motions where the title includes the search term provided., parameters.currentStatusDateStart: any # Early Day Motions where the current status has been set on or after the date provided. Date format YYYY-MM-DD., parameters.currentStatusDateEnd: any # Early Day Motions where the current status has been set on or before the date provided. Date format YYYY-MM-DD., parameters.isPrayer: any # Early Day Motions which are a prayer against a Negative Statutory Instrument., parameters.memberId: any # Return Early Day Motions tabled by Member with ID provided., parameters.includeSponsoredByMember: any # Include Early Day Motions sponsored by Member specified, parameters.tabledStartDate: any # Early Day Motions where the date tabled is on or after the date provided. Date format YYYY-MM-DD., parameters.tabledEndDate: any # Early Day Motions where the date tabled is on or before the date provided. Date format YYYY-MM-DD., parameters.statuses: any # Early Day Motions where current status is in the selected list., parameters.orderBy: any # Order results by date tabled, title or signature count. Default is date tabled., parameters.skip: any # The number of records to skip from the first, default is 0., parameters.take: any # The number of records to return, default is 25, maximum is 100.}
@returns(200) OK
@errors {400: BadRequest}

@endgroup

@group oralquestions
@endpoint GET /oralquestions/list
@desc Returns a list of oral questions
@optional {parameters.answeringDateStart: any # Oral Questions where the answering date has been set on or after the date provided. Date format YYYY-MM-DD., parameters.answeringDateEnd: any # Oral Questions where the answering date has been set on or before the date provided. Date format YYYY-MM-DD., parameters.questionType: any # Oral Questions where the question type is the selected type, substantive or topical., parameters.oralQuestionTimeId: any # Oral Questions where the question is within the question time with the ID provided, parameters.statuses: any # Oral Questions where current status is in the selected list, parameters.askingMemberIds: any # The ID of the member asking the question. Lists of member IDs for each house are available Commons and Lords., parameters.uINs: any # The UIN for the question - note that UINs reset at the start of each Parliamentary session., parameters.answeringBodyIds: any # Which answering body is to respond. A list of answering bodies can be found here., parameters.skip: any # The number of records to skip from the first, default is 0., parameters.take: any # The number of records to return, default is 25, maximum is 100.}
@returns(200) OK
@errors {400: BadRequest}

@endgroup

@group oralquestiontimes
@endpoint GET /oralquestiontimes/list
@desc Returns a list of oral question times
@optional {parameters.answeringDateStart: any # Oral Questions Time where the answering date has been set on or after the date provided. Date format YYYY-MM-DD., parameters.answeringDateEnd: any # Oral Questions Time where the answering date has been set on or before the date provided. Date format YYYY-MM-DD., parameters.deadlineDateStart: any # Oral Questions Time where the deadline date has been set on or after the date provided. Date format YYYY-MM-DD., parameters.deadlineDateEnd: any # Oral Questions Time where the deadline date has been set on or before the date provided. Date format YYYY-MM-DD., parameters.oralQuestionTimeId: any # Identifier of the OQT, parameters.answeringBodyIds: any # Which answering body is to respond. A list of answering bodies can be found here., parameters.skip: any # The number of records to skip from the first, default is 0., parameters.take: any # The number of records to return, default is 25, maximum is 100.}
@returns(200) OK
@errors {400: BadRequest}

@endgroup

@end
