{"note":"OpenAPI conversion -- returning structured metadata","name":"parliament-uk-treaties","description":"Treaties API","version":"v1","base_url":"","endpoints":6,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Treaties API\n@version v1\n@endpoints 6\n@toc api(6)\n\n@endpoint GET /api/BusinessItem/{id}\n@desc Returns business item by ID.\n@required {id: str # Business item with the ID specified}\n@returns(200) {value: map{id: str?, treatyId: str?, stepName: str?, steps: [str]?, itemDate: str(date-time), houses: [map]?, link: str?, sequence: int(int32), treatyUri: str(uri)?, businessItemUri: str(uri)?, houseUri: str(uri)?, houseName: str?, procedureStepUri: str(uri)?, houseId: str?, procedureStepId: str?, workpackageProcedureUri: str(uri)?}, links: [map]?} # The requested business item\n@errors {400: Bad Request, 404: If the item doesn't exist}\n\n@endpoint GET /api/GovernmentOrganisation\n@desc Returns all government organisations.\n@returns(200) {items: [map]?, totalResults: int(int32), itemsPerPage: int(int32), links: [map]?} # OK\n\n@endpoint GET /api/SeriesMembership\n@desc Returns all series memberships.\n@returns(200) {items: [map]?, totalResults: int(int32), itemsPerPage: int(int32), links: [map]?} # OK\n\n@endpoint GET /api/Treaty\n@desc Returns a list of treaties.\n@optional {SearchText: str, GovernmentOrganisationId: int(int32), Series: str, ParliamentaryProcess: str, DebateScheduled: bool, MotionsTabledAboutATreaty: bool, CommitteeRaisedConcerns: bool, House: str, Skip: int(int32), Take: int(int32)}\n@returns(200) {items: [map]?, totalResults: int(int32), itemsPerPage: int(int32), links: [map]?} # A list of treaties\n@errors {400: Bad Request}\n\n@endpoint GET /api/Treaty/{id}\n@desc Returns a treaty by ID.\n@required {id: str # Treaty with ID specified}\n@returns(200) {value: map{id: str?, name: str?, uri: str(uri)?, commandPaperPrefix: str?, commandPaperNumber: int(int32)?, commonsLayingDate: str(date-time)?, lordsLayingDate: str(date-time)?, webLink: str(uri)?, treatySeriesMembership: map{seriesMembershipType: str, uri: str(uri)?, citation: str?}, leadDepartment: map{id: int(int32), name: str?}, layingBodyDepartment: map{id: int(int32), name: str?}, parliamentaryConclusion: str, debateScheduled: str?, broughtToAttentionDate: str(date-time)?, signedDate: str(date-time)?, laidDate: str(date-time)?, pertinentDate: str(date-time)?, workpackageId: str?}, links: [map]?} # Details of the requested treaty\n@errors {400: Bad Request, 404: If the treaty can't be found}\n\n@endpoint GET /api/Treaty/{id}/BusinessItems\n@desc Returns business items belonging to the treaty with ID.\n@required {id: str # Business items belonging to treaty with the ID specified}\n@returns(200) {items: [map]?, totalResults: int(int32), itemsPerPage: int(int32), links: [map]?} # The business items for the requested treaty\n@errors {400: Bad Request, 404: If the treaty cannot be found}\n\n@end\n"}