{"note":"OpenAPI conversion -- returning structured metadata","name":"parliament-uk-members","description":"Members API","version":"v1","base_url":"","endpoints":43,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Members API\n@version v1\n@endpoints 43\n@hint download_for_search\n@toc api(43)\n\n@endpoint GET /api/Location/Browse/{locationType}/{locationName}\n@desc Returns a list of locations, both parent and child\n@required {locationType: any # Location by type of location, locationName: str # Location by name specified}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/Search\n@desc Returns a list of constituencies\n@optional {searchText: str # Constituencies containing serach term in their name, skip: int(int32)=0 # The number of records to skip from the first, default is 0, take: int(int32)=20 # The number of records to return, default is 20. Maximum is 20}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Location/Constituency/{id}\n@desc Returns a constituency by ID\n@required {id: int(int32) # Constituency by ID}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/Synopsis\n@desc Returns a synopsis by constituency ID\n@required {id: int(int32) # Synopsis by constituency ID}\n@returns(200) {value: str?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/Representations\n@desc Returns a list of representations by constituency ID\n@required {id: int(int32) # Representations by constituency ID}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/Geometry\n@desc Returns geometry by constituency ID\n@required {id: int(int32) # Geometry by constituency ID}\n@returns(200) {value: str?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/ElectionResults\n@desc Returns a list of election results by constituency ID\n@required {id: int(int32) # Elections results by constituency ID}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/ElectionResult/{electionId}\n@desc Returns an election result by constituency and election id\n@required {id: int(int32) # Election result by constituency id, electionId: int(int32) # Election result by election id}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Location/Constituency/{id}/ElectionResult/Latest\n@desc Returns latest election result by constituency id\n@required {id: int(int32) # Latest election result by constituency id}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/LordsInterests/Register\n@desc Returns a list of registered interests\n@optional {searchTerm: str # Registered interests containing search term, page: int(int32) # Page of results to return, default 0. Results per page 20., includeDeleted: bool=false # Registered interests that have been deleted}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/LordsInterests/Staff\n@desc Returns a list of staff\n@optional {searchTerm: str # Staff containing search term, page: int(int32) # Page of results to return, default 0. Results per page 20.}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Members/Search\n@desc Returns a list of current members of the Commons or Lords\n@optional {Name: str # Members where name contains term specified, Location: str # Members where postcode or geographical location matches the term specified\r     Searches for current constituencies with full postcode, or outward code; and name of constituency\r     If there are no results based on above, searches for all current and past constituencies in specified area of UK.\r     To explicitly search by area (ignoring name of constituency); please prefix query with `region:`., PostTitle: str # Members which have held the post specified, PartyId: int(int32) # Members which are currently affiliated with party with party ID, House: any # Members where their most recent house is the house specified, ConstituencyId: int(int32) # Members which currently hold the constituency with constituency id, NameStartsWith: str # Members with surname begining with letter(s) specified, Gender: str # Members with the gender specified, MembershipStartedSince: str(date-time) # Members who started on or after the date given, MembershipEnded.MembershipEndedSince: str(date-time) # Members who left the House on or after the date given, MembershipEnded.MembershipEndReasonIds: [int(int32)], MembershipInDateRange.WasMemberOnOrAfter: str(date-time) # Members who were active on or after the date specified, MembershipInDateRange.WasMemberOnOrBefore: str(date-time) # Members who were active on or before the date specified, MembershipInDateRange.WasMemberOfHouse: any # Members who were active in the house specifid, IsEligible: bool # Members currently Eligible to sit in their House, IsCurrentMember: bool # Members who are current or former members, PolicyInterestId: int(int32) # Members with specified policy interest, Experience: str # Members with specified experience, skip: int(int32)=0 # The number of records to skip from the first, default is 0, take: int(int32)=20 # The number of records to return, default is 20. Maximum is 20}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Members/SearchHistorical\n@desc Returns a list of members of the Commons or Lords\n@optional {name: str # Members with names containing the term specified, dateToSearchFor: str(date-time) # Members that were an active member of the Commons or Lords on the date specified, skip: int(int32)=0 # The number of records to skip from the first, default is 0, take: int(int32)=20 # The number of records to return, default is 20. Maximum is 20}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Members/{id}\n@desc Return member by ID\n@required {id: int(int32) # Member by ID specified}\n@optional {detailsForDate: str(date-time) # Member object will be populated with details from the date specified}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Biography\n@desc Return biography of member by ID\n@required {id: int(int32) # Biography of Member by ID specified}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Contact\n@desc Return list of contact details of member by ID\n@required {id: int(int32) # Contact details of Member by ID specified}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/ContributionSummary\n@desc Return contribution summary of member by ID\n@required {id: int(int32) # Contribution summary of Member by ID specified}\n@optional {page: int(int32)}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Edms\n@desc Return list of early day motions of member by ID\n@required {id: int(int32) # Early day motions of Member by ID specified}\n@optional {page: int(int32)}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Experience\n@desc Return experience of member by ID\n@required {id: int(int32) # Experience of Member by ID specified}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Focus\n@desc Return list of areas of focus of member by ID\n@required {id: int(int32) # Areas of focus of Member by ID specified}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/History\n@desc Return members by ID with list of their historical names, parties and memberships\n@optional {ids: [int(int32)] # List of MemberIds to find}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/LatestElectionResult\n@desc Return latest election result of member by ID\n@required {id: int(int32) # Latest election result of Member by ID specified}\n@returns(200) {value: any?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Portrait\n@desc Return portrait of member by ID\n@required {id: int(int32) # Portrait of Member by ID specified}\n@optional {cropType: any=0, webVersion: bool=true}\n@returns(200) OK\n@returns(204) No Content\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/PortraitUrl\n@desc Return portrait url of member by ID\n@required {id: int(int32) # Portrait url of Member by ID specified}\n@returns(200) {value: str?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/RegisteredInterests\n@desc Return list of registered interests of member by ID\n@required {id: int(int32) # Registered interests of Member by ID specified}\n@optional {house: any # Registered interests of Member by House specified}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Staff\n@desc Return list of staff of member by ID\n@required {id: int(int32) # Staff of Member by ID specified}\n@returns(200) {value: [map]?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Synopsis\n@desc Return synopsis of member by ID\n@required {id: int(int32) # Synopsis of Member by ID specified}\n@returns(200) {value: str?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Thumbnail\n@desc Return thumbnail of member by ID\n@required {id: int(int32) # Thumbnail of Member by ID specified}\n@returns(200) OK\n@returns(204) No Content\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/ThumbnailUrl\n@desc Return thumbnail url of member by ID\n@required {id: int(int32) # Thumbnail url of Member by ID specified}\n@returns(200) {value: str?, links: [map]?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/Voting\n@desc Return list of votes by member by ID\n@required {id: int(int32) # Votes by Member by ID specified, house: any}\n@optional {page: int(int32)}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Members/{id}/WrittenQuestions\n@desc Return list of written questions by member by ID\n@required {id: int(int32) # Written questions by Member by ID specified}\n@optional {page: int(int32)}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Parties/StateOfTheParties/{house}/{forDate}\n@desc Returns current state of parties\n@required {house: any # State of parties in Commons or Lords., forDate: str(date-time) # State of parties for the date specified}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Parties/LordsByType/{forDate}\n@desc Returns the composition of the House of Lords by peerage type.\n@required {forDate: str(date-time) # Composition of the Lords for date specified.}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Parties/GetActive/{house}\n@desc Returns a list of current parties with at least one active member.\n@required {house: any # Current parties by house}\n@returns(200) {items: [map]?, totalResults: int(int32), resultContext: str?, skip: int(int32), take: int(int32), links: [map]?, resultType: any?} # OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Posts/GovernmentPosts\n@desc Returns a list of government posts.\n@optional {departmentId: int(int32) # Government posts by department ID}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Posts/OppositionPosts\n@desc Returns a list of opposition posts.\n@optional {departmentId: int(int32) # Opposition posts by department ID}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Posts/Spokespersons\n@desc Returns a list of spokespersons.\n@optional {partyId: int(int32) # Spokespersons by party ID}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Posts/Departments/{type}\n@desc Returns a list of departments.\n@required {type: any # Departments by type}\n@returns(200) OK\n@errors {404: Not Found}\n\n@endpoint GET /api/Posts/SpeakerAndDeputies/{forDate}\n@desc Returns a list containing the speaker and deputy speakers.\n@required {forDate: str(date-time) # Speaker and deputy speakers for date specified}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@endpoint GET /api/Reference/PolicyInterests\n@desc Returns a list of policy interest.\n@returns(200) OK\n\n@endpoint GET /api/Reference/Departments\n@desc Returns a list of departments.\n@optional {id: int(int32), nameContains: str}\n@returns(200) OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Reference/AnsweringBodies\n@desc Returns a list of answering bodies.\n@optional {id: int(int32), nameContains: str}\n@returns(200) OK\n@errors {400: Bad Request}\n\n@endpoint GET /api/Reference/Departments/{id}/Logo\n@desc Returns department logo.\n@required {id: int(int32) # Logo by department ID}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found}\n\n@end\n"}