openapi: 3.0.1
info:
  contact:
    email: softwareengineering@parliament.uk
    name: UK Parliament
    url: https://www.parliament.uk/
  description: An API which retrieves Members data.
  title: Members API
  version: v1
  x-apisguru-categories:
    - open_data
  x-origin:
    - format: openapi
      url: https://members-api.parliament.uk/swagger/v1/swagger.json
      version: "3.0"
  x-providerName: parliament.uk
  x-serviceName: members
paths:
  "/api/Location/Browse/{locationType}/{locationName}":
    get:
      parameters:
        - description: Location by type of location
          in: path
          name: locationType
          required: true
          schema:
            $ref: "#/components/schemas/LocationType"
        - description: Location by name specified
          in: path
          name: locationName
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LocationItem"
            text/json:
              schema:
                $ref: "#/components/schemas/LocationItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/LocationItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of locations, both parent and child
      tags:
        - Location
  /api/Location/Constituency/Search:
    get:
      parameters:
        - description: Constituencies containing serach term in their name
          in: query
          name: searchText
          schema:
            type: string
        - description: The number of records to skip from the first, default is 0
          in: query
          name: skip
          schema:
            default: 0
            format: int32
            type: integer
        - description: The number of records to return, default is 20. Maximum is 20
          in: query
          name: take
          schema:
            default: 20
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConstituencyMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/ConstituencyMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/ConstituencyMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of constituencies
      tags:
        - Location
  "/api/Location/Constituency/{id}":
    get:
      parameters:
        - description: Constituency by ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConstituencyItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ConstituencyItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ConstituencyItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a constituency by ID
      tags:
        - Location
  "/api/Location/Constituency/{id}/ElectionResult/Latest":
    get:
      parameters:
        - description: Latest election result by constituency id
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns latest election result by constituency id
      tags:
        - Location
  "/api/Location/Constituency/{id}/ElectionResult/{electionId}":
    get:
      parameters:
        - description: Election result by constituency id
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - description: Election result by election id
          in: path
          name: electionId
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns an election result by constituency and election id
      tags:
        - Location
  "/api/Location/Constituency/{id}/ElectionResults":
    get:
      parameters:
        - description: Elections results by constituency ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ElectionResultListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ElectionResultListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ElectionResultListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of election results by constituency ID
      tags:
        - Location
  "/api/Location/Constituency/{id}/Geometry":
    get:
      parameters:
        - description: Geometry by constituency ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StringItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns geometry by constituency ID
      tags:
        - Location
  "/api/Location/Constituency/{id}/Representations":
    get:
      parameters:
        - description: Representations by constituency ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ConstituencyRepresentationListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ConstituencyRepresentationListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ConstituencyRepresentationListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of representations by constituency ID
      tags:
        - Location
  "/api/Location/Constituency/{id}/Synopsis":
    get:
      parameters:
        - description: Synopsis by constituency ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StringItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a synopsis by constituency ID
      tags:
        - Location
  /api/LordsInterests/Register:
    get:
      parameters:
        - description: Registered interests containing search term
          in: query
          name: searchTerm
          schema:
            type: string
        - description: Page of results to return, default 0. Results per page 20.
          in: query
          name: page
          schema:
            format: int32
            type: integer
        - description: Registered interests that have been deleted
          in: query
          name: includeDeleted
          schema:
            default: false
            type: boolean
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MembersInterestsMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/MembersInterestsMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/MembersInterestsMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of registered interests
      tags:
        - LordsInterests
  /api/LordsInterests/Staff:
    get:
      parameters:
        - description: Staff containing search term
          in: query
          name: searchTerm
          schema:
            type: string
        - description: Page of results to return, default 0. Results per page 20.
          in: query
          name: page
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MembersStaffMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/MembersStaffMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/MembersStaffMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of staff
      tags:
        - LordsInterests
  /api/Members/History:
    get:
      parameters:
        - description: List of MemberIds to find
          in: query
          name: ids
          schema:
            items:
              format: int32
              type: integer
            type: array
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/MemberHistoryItem"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/MemberHistoryItem"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/MemberHistoryItem"
                type: array
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return members by ID with list of their historical names, parties and memberships
      tags:
        - Members
  /api/Members/Search:
    get:
      parameters:
        - description: Members where name contains term specified
          in: query
          name: Name
          schema:
            type: string
        - description: Members where postcode or geographical location matches the term specified
          in: query
          name: Location
          schema:
            type: string
        - description: Members which have held the post specified
          in: query
          name: PostTitle
          schema:
            type: string
        - description: Members which are currently affiliated with party with party ID
          in: query
          name: PartyId
          schema:
            format: int32
            type: integer
        - description: Members where their most recent house is the house specified
          in: query
          name: House
          schema:
            $ref: "#/components/schemas/House"
        - description: Members which currently hold the constituency with constituency id
          in: query
          name: ConstituencyId
          schema:
            format: int32
            type: integer
        - description: Members with surname begining with letter(s) specified
          in: query
          name: NameStartsWith
          schema:
            type: string
        - description: Members with the gender specified
          in: query
          name: Gender
          schema:
            type: string
        - description: Members who started on or after the date given
          in: query
          name: MembershipStartedSince
          schema:
            format: date-time
            type: string
        - description: Members who left the House on or after the date given
          in: query
          name: MembershipEnded.MembershipEndedSince
          schema:
            format: date-time
            type: string
        - in: query
          name: MembershipEnded.MembershipEndReasonIds
          schema:
            items:
              format: int32
              type: integer
            type: array
        - description: Members who were active on or after the date specified
          in: query
          name: MembershipInDateRange.WasMemberOnOrAfter
          schema:
            format: date-time
            type: string
        - description: Members who were active on or before the date specified
          in: query
          name: MembershipInDateRange.WasMemberOnOrBefore
          schema:
            format: date-time
            type: string
        - description: Members who were active in the house specifid
          in: query
          name: MembershipInDateRange.WasMemberOfHouse
          schema:
            $ref: "#/components/schemas/House"
        - description: Members currently Eligible to sit in their House
          in: query
          name: IsEligible
          schema:
            type: boolean
        - description: Members who are current or former members
          in: query
          name: IsCurrentMember
          schema:
            type: boolean
        - description: Members with specified policy interest
          in: query
          name: PolicyInterestId
          schema:
            format: int32
            type: integer
        - description: Members with specified experience
          in: query
          name: Experience
          schema:
            type: string
        - description: The number of records to skip from the first, default is 0
          in: query
          name: skip
          schema:
            default: 0
            format: int32
            type: integer
        - description: The number of records to return, default is 20. Maximum is 20
          in: query
          name: take
          schema:
            default: 20
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of current members of the Commons or Lords
      tags:
        - Members
  /api/Members/SearchHistorical:
    get:
      parameters:
        - description: Members with names containing the term specified
          in: query
          name: name
          schema:
            type: string
        - description: Members that were an active member of the Commons or Lords on the date specified
          in: query
          name: dateToSearchFor
          schema:
            format: date-time
            type: string
        - description: The number of records to skip from the first, default is 0
          in: query
          name: skip
          schema:
            default: 0
            format: int32
            type: integer
        - description: The number of records to return, default is 20. Maximum is 20
          in: query
          name: take
          schema:
            default: 20
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/MemberMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of members of the Commons or Lords
      tags:
        - Members
  "/api/Members/{id}":
    get:
      parameters:
        - description: Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - description: Member object will be populated with details from the date specified
          in: query
          name: detailsForDate
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemberItem"
            text/json:
              schema:
                $ref: "#/components/schemas/MemberItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/MemberItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return member by ID
      tags:
        - Members
  "/api/Members/{id}/Biography":
    get:
      parameters:
        - description: Biography of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemberBiographyItem"
            text/json:
              schema:
                $ref: "#/components/schemas/MemberBiographyItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/MemberBiographyItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return biography of member by ID
      tags:
        - Members
  "/api/Members/{id}/Contact":
    get:
      parameters:
        - description: Contact details of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ContactInformationListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ContactInformationListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ContactInformationListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of contact details of member by ID
      tags:
        - Members
  "/api/Members/{id}/ContributionSummary":
    get:
      parameters:
        - description: Contribution summary of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: page
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DebateContributionMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/DebateContributionMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/DebateContributionMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return contribution summary of member by ID
      tags:
        - Members
  "/api/Members/{id}/Edms":
    get:
      parameters:
        - description: Early day motions of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: page
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EarlyDayMotionMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/EarlyDayMotionMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/EarlyDayMotionMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of early day motions of member by ID
      tags:
        - Members
  "/api/Members/{id}/Experience":
    get:
      parameters:
        - description: Experience of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BiographyExperienceListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/BiographyExperienceListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/BiographyExperienceListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return experience of member by ID
      tags:
        - Members
  "/api/Members/{id}/Focus":
    get:
      parameters:
        - description: Areas of focus of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MemberFocusListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/MemberFocusListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/MemberFocusListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of areas of focus of member by ID
      tags:
        - Members
  "/api/Members/{id}/LatestElectionResult":
    get:
      parameters:
        - description: Latest election result of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/json:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/ElectionResultItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return latest election result of member by ID
      tags:
        - Members
  "/api/Members/{id}/Portrait":
    get:
      parameters:
        - description: Portrait of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: cropType
          schema:
            $ref: "#/components/schemas/PortraitCropEnum"
        - in: query
          name: webVersion
          schema:
            default: true
            type: boolean
      responses:
        "200":
          description: Success
        "204":
          description: No Content
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return portrait of member by ID
      tags:
        - Members
  "/api/Members/{id}/PortraitUrl":
    get:
      parameters:
        - description: Portrait url of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StringItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return portrait url of member by ID
      tags:
        - Members
  "/api/Members/{id}/RegisteredInterests":
    get:
      parameters:
        - description: Registered interests of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - description: Registered interests of Member by House specified
          in: query
          name: house
          schema:
            $ref: "#/components/schemas/House"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RegisteredInterestCategoryListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/RegisteredInterestCategoryListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/RegisteredInterestCategoryListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of registered interests of member by ID
      tags:
        - Members
  "/api/Members/{id}/Staff":
    get:
      parameters:
        - description: Staff of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StaffListItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StaffListItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StaffListItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of staff of member by ID
      tags:
        - Members
  "/api/Members/{id}/Synopsis":
    get:
      parameters:
        - description: Synopsis of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StringItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return synopsis of member by ID
      tags:
        - Members
  "/api/Members/{id}/Thumbnail":
    get:
      parameters:
        - description: Thumbnail of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          description: Success
        "204":
          description: No Content
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return thumbnail of member by ID
      tags:
        - Members
  "/api/Members/{id}/ThumbnailUrl":
    get:
      parameters:
        - description: Thumbnail url of Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/json:
              schema:
                $ref: "#/components/schemas/StringItem"
            text/plain:
              schema:
                $ref: "#/components/schemas/StringItem"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return thumbnail url of member by ID
      tags:
        - Members
  "/api/Members/{id}/Voting":
    get:
      parameters:
        - description: Votes by Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: house
          required: true
          schema:
            $ref: "#/components/schemas/House"
        - in: query
          name: page
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VoteMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/VoteMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/VoteMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of votes by member by ID
      tags:
        - Members
  "/api/Members/{id}/WrittenQuestions":
    get:
      parameters:
        - description: Written questions by Member by ID specified
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
        - in: query
          name: page
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WrittenQuestionMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/WrittenQuestionMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/WrittenQuestionMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Return list of written questions by member by ID
      tags:
        - Members
  "/api/Parties/GetActive/{house}":
    get:
      parameters:
        - description: Current parties by house
          in: path
          name: house
          required: true
          schema:
            $ref: "#/components/schemas/House"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartyMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/PartyMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/PartyMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of current parties with at least one active member.
      tags:
        - Parties
  "/api/Parties/LordsByType/{forDate}":
    get:
      parameters:
        - description: Composition of the Lords for date specified.
          in: path
          name: forDate
          required: true
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/LordsByTypeMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/LordsByTypeMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/LordsByTypeMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns the composition of the House of Lords by peerage type.
      tags:
        - Parties
  "/api/Parties/StateOfTheParties/{house}/{forDate}":
    get:
      parameters:
        - description: State of parties in Commons or Lords.
          in: path
          name: house
          required: true
          schema:
            $ref: "#/components/schemas/House"
        - description: State of parties for the date specified
          in: path
          name: forDate
          required: true
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PartySeatCountMembersServiceSearchResult"
            text/json:
              schema:
                $ref: "#/components/schemas/PartySeatCountMembersServiceSearchResult"
            text/plain:
              schema:
                $ref: "#/components/schemas/PartySeatCountMembersServiceSearchResult"
          description: Success
        "400":
          description: Bad Request
      summary: Returns current state of parties
      tags:
        - Parties
  "/api/Posts/Departments/{type}":
    get:
      parameters:
        - description: Departments by type
          in: path
          name: type
          required: true
          schema:
            $ref: "#/components/schemas/PostType"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
          description: Success
        "404":
          description: Not Found
      summary: Returns a list of departments.
      tags:
        - Posts
  /api/Posts/GovernmentPosts:
    get:
      parameters:
        - description: Government posts by department ID
          in: query
          name: departmentId
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of government posts.
      tags:
        - Posts
  /api/Posts/OppositionPosts:
    get:
      parameters:
        - description: Opposition posts by department ID
          in: query
          name: departmentId
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of opposition posts.
      tags:
        - Posts
  "/api/Posts/SpeakerAndDeputies/{forDate}":
    get:
      parameters:
        - description: Speaker and deputy speakers for date specified
          in: path
          name: forDate
          required: true
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/MemberItem"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/MemberItem"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/MemberItem"
                type: array
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list containing the speaker and deputy speakers.
      tags:
        - Posts
  /api/Posts/Spokespersons:
    get:
      parameters:
        - description: Spokespersons by party ID
          in: query
          name: partyId
          schema:
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentOppositionPostItem"
                type: array
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns a list of spokespersons.
      tags:
        - Posts
  /api/Reference/AnsweringBodies:
    get:
      parameters:
        - in: query
          name: id
          schema:
            format: int32
            type: integer
        - in: query
          name: nameContains
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/AnsweringBody"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/AnsweringBody"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/AnsweringBody"
                type: array
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of answering bodies.
      tags:
        - Reference
  /api/Reference/Departments:
    get:
      parameters:
        - in: query
          name: id
          schema:
            format: int32
            type: integer
        - in: query
          name: nameContains
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GovernmentDepartment"
                type: array
          description: Success
        "400":
          description: Bad Request
      summary: Returns a list of departments.
      tags:
        - Reference
  "/api/Reference/Departments/{id}/Logo":
    get:
      parameters:
        - description: Logo by department ID
          in: path
          name: id
          required: true
          schema:
            format: int32
            type: integer
      responses:
        "200":
          description: Success
        "400":
          description: Bad Request
        "404":
          description: Not Found
      summary: Returns department logo.
      tags:
        - Reference
  /api/Reference/PolicyInterests:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/GenericReferenceData"
                type: array
            text/json:
              schema:
                items:
                  $ref: "#/components/schemas/GenericReferenceData"
                type: array
            text/plain:
              schema:
                items:
                  $ref: "#/components/schemas/GenericReferenceData"
                type: array
          description: Success
      summary: Returns a list of policy interest.
      tags:
        - Reference
components:
  schemas:
    AnsweringBody:
      additionalProperties: false
      properties:
        department:
          $ref: "#/components/schemas/GovernmentDepartment"
        id:
          format: int32
          type: integer
        name:
          nullable: true
          type: string
        shortName:
          nullable: true
          type: string
        target:
          nullable: true
          type: string
      type: object
    BiographyExperience:
      additionalProperties: false
      properties:
        endMonth:
          format: int32
          nullable: true
          type: integer
        endYear:
          format: int32
          nullable: true
          type: integer
        id:
          format: int32
          type: integer
        organisation:
          nullable: true
          type: string
        startMonth:
          format: int32
          nullable: true
          type: integer
        startYear:
          format: int32
          nullable: true
          type: integer
        title:
          nullable: true
          type: string
        type:
          nullable: true
          type: string
        typeId:
          format: int32
          type: integer
      type: object
    BiographyExperienceListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/BiographyExperience"
          nullable: true
          type: array
      type: object
    BiographyItem:
      additionalProperties: false
      properties:
        additionalInfo:
          nullable: true
          type: string
        additionalInfoLink:
          nullable: true
          type: string
        endDate:
          format: date-time
          nullable: true
          type: string
        house:
          $ref: "#/components/schemas/House"
        id:
          format: int32
          type: integer
        name:
          nullable: true
          type: string
        startDate:
          format: date-time
          type: string
      type: object
    Constituency:
      additionalProperties: false
      properties:
        currentRepresentation:
          $ref: "#/components/schemas/ConstituencyRepresentation"
        endDate:
          format: date-time
          nullable: true
          type: string
        id:
          format: int32
          type: integer
        name:
          nullable: true
          type: string
        startDate:
          format: date-time
          type: string
      type: object
    ConstituencyItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/Constituency"
      type: object
    ConstituencyMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/ConstituencyItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    ConstituencyRepresentation:
      additionalProperties: false
      properties:
        member:
          $ref: "#/components/schemas/MemberItem"
        representation:
          $ref: "#/components/schemas/HouseMembership"
      type: object
    ConstituencyRepresentationListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/ConstituencyRepresentation"
          nullable: true
          type: array
      type: object
    ContactInformation:
      additionalProperties: false
      properties:
        email:
          nullable: true
          type: string
        fax:
          nullable: true
          type: string
        isPreferred:
          type: boolean
        isWebAddress:
          type: boolean
        line1:
          nullable: true
          type: string
        line2:
          nullable: true
          type: string
        line3:
          nullable: true
          type: string
        line4:
          nullable: true
          type: string
        line5:
          nullable: true
          type: string
        notes:
          nullable: true
          type: string
        phone:
          nullable: true
          type: string
        postcode:
          nullable: true
          type: string
        type:
          nullable: true
          type: string
        typeDescription:
          nullable: true
          type: string
        typeId:
          format: int32
          type: integer
      type: object
    ContactInformationListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/ContactInformation"
          nullable: true
          type: array
      type: object
    DebateContribution:
      additionalProperties: false
      properties:
        answerCount:
          format: int32
          type: integer
        debateId:
          format: int32
          type: integer
        debateTitle:
          nullable: true
          type: string
        debateWebsiteId:
          nullable: true
          type: string
        firstTimecode:
          format: date-time
          nullable: true
          type: string
        house:
          nullable: true
          type: string
        interventionCount:
          format: int32
          type: integer
        pointsOfOrderCount:
          format: int32
          type: integer
        questionCount:
          format: int32
          type: integer
        section:
          nullable: true
          type: string
        sittingDate:
          format: date-time
          type: string
        speechCount:
          format: int32
          type: integer
        statementsCount:
          format: int32
          type: integer
        supplementaryQuestionCount:
          format: int32
          type: integer
        totalContributions:
          format: int32
          type: integer
      type: object
    DebateContributionItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/DebateContribution"
      type: object
    DebateContributionMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/DebateContributionItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    EarlyDayMotion:
      additionalProperties: false
      properties:
        dateTabled:
          format: date-time
          type: string
        id:
          format: int32
          type: integer
        isAmendment:
          type: boolean
        isPrayer:
          type: boolean
        number:
          nullable: true
          type: string
        sponsorsCount:
          format: int32
          type: integer
        title:
          nullable: true
          type: string
      type: object
    EarlyDayMotionItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/EarlyDayMotion"
      type: object
    EarlyDayMotionMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/EarlyDayMotionItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    ElectionCandidate:
      additionalProperties: false
      properties:
        memberId:
          format: int32
          nullable: true
          type: integer
        name:
          nullable: true
          type: string
        party:
          $ref: "#/components/schemas/Party"
        rankOrder:
          format: int32
          nullable: true
          type: integer
        resultChange:
          nullable: true
          type: string
        voteShare:
          format: double
          nullable: true
          type: number
        votes:
          format: int32
          type: integer
      type: object
    ElectionResult:
      additionalProperties: false
      properties:
        candidates:
          items:
            $ref: "#/components/schemas/ElectionCandidate"
          nullable: true
          type: array
        constituencyName:
          nullable: true
          type: string
        electionDate:
          format: date-time
          type: string
        electionId:
          format: int32
          type: integer
        electionTitle:
          nullable: true
          type: string
        electorate:
          format: int32
          type: integer
        isGeneralElection:
          type: boolean
        isNotional:
          type: boolean
        majority:
          format: int32
          type: integer
        result:
          nullable: true
          type: string
        turnout:
          format: int32
          type: integer
        winningParty:
          $ref: "#/components/schemas/Party"
      type: object
    ElectionResultItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/ElectionResult"
      type: object
    ElectionResultListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/ElectionResult"
          nullable: true
          type: array
      type: object
    GenericReferenceData:
      additionalProperties: false
      properties:
        description:
          nullable: true
          type: string
        id:
          format: int32
          type: integer
      type: object
    GovernmentDepartment:
      additionalProperties: false
      properties:
        id:
          format: int32
          type: integer
        imageUrl:
          nullable: true
          type: string
        name:
          nullable: true
          type: string
        url:
          nullable: true
          type: string
      type: object
    GovernmentOppositionPost:
      additionalProperties: false
      properties:
        createdWhen:
          format: date-time
          type: string
        governmentDepartments:
          items:
            $ref: "#/components/schemas/GovernmentDepartment"
          nullable: true
          type: array
        hansardName:
          nullable: true
          type: string
        id:
          format: int32
          type: integer
        name:
          nullable: true
          type: string
        order:
          format: int32
          type: integer
        postHolders:
          items:
            $ref: "#/components/schemas/GovernmentOppositionPostHolder"
          nullable: true
          type: array
        type:
          $ref: "#/components/schemas/PostType"
      type: object
    GovernmentOppositionPostHolder:
      additionalProperties: false
      properties:
        endDate:
          format: date-time
          nullable: true
          type: string
        isPaid:
          type: boolean
        layingMinisterName:
          nullable: true
          type: string
        member:
          $ref: "#/components/schemas/MemberItem"
        startDate:
          format: date-time
          type: string
      type: object
    GovernmentOppositionPostItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/GovernmentOppositionPost"
      type: object
    GovernmentType:
      enum:
        - 0
        - 1
        - 2
        - 3
      format: int32
      type: integer
    GroupedQuestion:
      additionalProperties: false
      properties:
        dateTabled:
          format: date-time
          type: string
        questionUin:
          nullable: true
          type: string
      type: object
    House:
      enum:
        - 1
        - 2
      format: int32
      type: integer
    HouseMembership:
      additionalProperties: false
      properties:
        house:
          $ref: "#/components/schemas/House"
        membershipEndDate:
          format: date-time
          nullable: true
          type: string
        membershipEndReason:
          nullable: true
          type: string
        membershipEndReasonId:
          format: int32
          nullable: true
          type: integer
        membershipEndReasonNotes:
          nullable: true
          type: string
        membershipFrom:
          nullable: true
          type: string
        membershipFromId:
          format: int32
          nullable: true
          type: integer
        membershipStartDate:
          format: date-time
          nullable: true
          type: string
        membershipStatus:
          $ref: "#/components/schemas/HouseMembershipStatus"
      type: object
    HouseMembershipStatus:
      additionalProperties: false
      properties:
        status:
          $ref: "#/components/schemas/MemberStatus"
        statusDescription:
          nullable: true
          type: string
        statusId:
          format: int32
          nullable: true
          type: integer
        statusIsActive:
          type: boolean
        statusNotes:
          nullable: true
          type: string
        statusStartDate:
          format: date-time
          nullable: true
          type: string
      type: object
    Link:
      additionalProperties: false
      properties:
        href:
          nullable: true
          type: string
        method:
          nullable: true
          type: string
        rel:
          nullable: true
          type: string
      type: object
    Location:
      additionalProperties: false
      properties:
        childContexts:
          items:
            $ref: "#/components/schemas/LocationContext"
          nullable: true
          type: array
        context:
          $ref: "#/components/schemas/LocationContext"
        parentContext:
          $ref: "#/components/schemas/LocationContext"
        stateOfTheParties:
          items:
            $ref: "#/components/schemas/PartySeatCount"
          nullable: true
          type: array
      type: object
    LocationContext:
      additionalProperties: false
      properties:
        id:
          format: int32
          type: integer
        name:
          nullable: true
          type: string
        type:
          $ref: "#/components/schemas/LocationType"
        typeName:
          nullable: true
          type: string
      type: object
    LocationItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/Location"
      type: object
    LocationType:
      enum:
        - 0
        - 1
        - 2
        - 3
      format: int32
      type: integer
    LordsByType:
      additionalProperties: false
      properties:
        bishop:
          format: int32
          type: integer
        hereditary:
          format: int32
          type: integer
        life:
          format: int32
          type: integer
        party:
          $ref: "#/components/schemas/Party"
        total:
          format: int32
          type: integer
      type: object
    LordsByTypeItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/LordsByType"
      type: object
    LordsByTypeMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/LordsByTypeItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    Member:
      additionalProperties: false
      properties:
        gender:
          nullable: true
          type: string
        id:
          format: int32
          type: integer
        latestHouseMembership:
          $ref: "#/components/schemas/HouseMembership"
        latestParty:
          $ref: "#/components/schemas/Party"
        nameAddressAs:
          nullable: true
          type: string
        nameDisplayAs:
          nullable: true
          type: string
        nameFullTitle:
          nullable: true
          type: string
        nameListAs:
          nullable: true
          type: string
        thumbnailUrl:
          nullable: true
          type: string
      type: object
    MemberBiography:
      additionalProperties: false
      properties:
        committeeMemberships:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        electionsContested:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        governmentPosts:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        houseMemberships:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        oppositionPosts:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        otherPosts:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        partyAffiliations:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
        representations:
          items:
            $ref: "#/components/schemas/BiographyItem"
          nullable: true
          type: array
      type: object
    MemberBiographyItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/MemberBiography"
      type: object
    MemberFocus:
      additionalProperties: false
      properties:
        category:
          nullable: true
          type: string
        focus:
          items:
            type: string
          nullable: true
          type: array
      type: object
    MemberFocusListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/MemberFocus"
          nullable: true
          type: array
      type: object
    MemberHistory:
      additionalProperties: false
      properties:
        houseMembershipHistory:
          items:
            $ref: "#/components/schemas/HouseMembership"
          nullable: true
          type: array
        id:
          format: int32
          type: integer
        nameHistory:
          items:
            $ref: "#/components/schemas/MemberName"
          nullable: true
          type: array
        partyHistory:
          items:
            $ref: "#/components/schemas/MemberParty"
          nullable: true
          type: array
        thumbnailUrl:
          nullable: true
          type: string
      type: object
    MemberHistoryItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/MemberHistory"
      type: object
    MemberItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/Member"
      type: object
    MemberMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/MemberItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    MemberName:
      additionalProperties: false
      properties:
        endDate:
          format: date-time
          nullable: true
          type: string
        nameAddressAs:
          nullable: true
          type: string
        nameDisplayAs:
          nullable: true
          type: string
        nameFullTitle:
          nullable: true
          type: string
        nameListAs:
          nullable: true
          type: string
        startDate:
          format: date-time
          type: string
      type: object
    MemberParty:
      additionalProperties: false
      properties:
        endDate:
          format: date-time
          nullable: true
          type: string
        party:
          $ref: "#/components/schemas/Party"
        startDate:
          format: date-time
          type: string
      type: object
    MemberStatus:
      enum:
        - 0
        - 1
        - 2
        - 3
      format: int32
      type: integer
    MembersInterests:
      additionalProperties: false
      properties:
        interestCategories:
          items:
            $ref: "#/components/schemas/RegisteredInterestCategory"
          nullable: true
          type: array
        member:
          $ref: "#/components/schemas/Member"
      type: object
    MembersInterestsItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/MembersInterests"
      type: object
    MembersInterestsMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/MembersInterestsItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    MembersStaff:
      additionalProperties: false
      properties:
        member:
          $ref: "#/components/schemas/Member"
        staff:
          items:
            $ref: "#/components/schemas/Staff"
          nullable: true
          type: array
      type: object
    MembersStaffItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/MembersStaff"
      type: object
    MembersStaffMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/MembersStaffItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    Party:
      additionalProperties: false
      properties:
        abbreviation:
          nullable: true
          type: string
        backgroundColour:
          nullable: true
          type: string
        foregroundColour:
          nullable: true
          type: string
        governmentType:
          $ref: "#/components/schemas/GovernmentType"
        id:
          format: int32
          type: integer
        isIndependentParty:
          readOnly: true
          type: boolean
        isLordsMainParty:
          type: boolean
        isLordsSpiritualParty:
          type: boolean
        name:
          nullable: true
          type: string
      type: object
    PartyItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/Party"
      type: object
    PartyMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/PartyItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    PartySeatCount:
      additionalProperties: false
      properties:
        female:
          format: int32
          nullable: true
          type: integer
        male:
          format: int32
          nullable: true
          type: integer
        nonBinary:
          format: int32
          nullable: true
          type: integer
        party:
          $ref: "#/components/schemas/Party"
        total:
          format: int32
          type: integer
      type: object
    PartySeatCountItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/PartySeatCount"
      type: object
    PartySeatCountMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/PartySeatCountItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    PortraitCropEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
      format: int32
      type: integer
    PostType:
      enum:
        - 0
        - 1
        - 2
      format: int32
      type: integer
    RegisteredInterest:
      additionalProperties: false
      properties:
        childInterests:
          items:
            $ref: "#/components/schemas/RegisteredInterest"
          nullable: true
          type: array
        createdWhen:
          format: date-time
          nullable: true
          type: string
        deletedWhen:
          format: date-time
          nullable: true
          type: string
        id:
          format: int32
          type: integer
        interest:
          nullable: true
          type: string
        isCorrection:
          type: boolean
        lastAmendedWhen:
          format: date-time
          nullable: true
          type: string
      type: object
    RegisteredInterestCategory:
      additionalProperties: false
      properties:
        id:
          format: int32
          type: integer
        interests:
          items:
            $ref: "#/components/schemas/RegisteredInterest"
          nullable: true
          type: array
        name:
          nullable: true
          type: string
        sortOrder:
          format: int32
          type: integer
      type: object
    RegisteredInterestCategoryListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/RegisteredInterestCategory"
          nullable: true
          type: array
      type: object
    Staff:
      additionalProperties: false
      properties:
        details:
          nullable: true
          type: string
        forename:
          nullable: true
          type: string
        surname:
          nullable: true
          type: string
        title:
          nullable: true
          type: string
      type: object
    StaffListItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          items:
            $ref: "#/components/schemas/Staff"
          nullable: true
          type: array
      type: object
    StringItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          nullable: true
          type: string
      type: object
    Vote:
      additionalProperties: false
      properties:
        actedAsTeller:
          type: boolean
        date:
          format: date-time
          type: string
        divisionNumber:
          format: int32
          type: integer
        house:
          $ref: "#/components/schemas/House"
        id:
          format: int32
          type: integer
        inAffirmativeLobby:
          type: boolean
        numberAgainst:
          format: int32
          type: integer
        numberInFavour:
          format: int32
          type: integer
        title:
          nullable: true
          type: string
      type: object
    VoteItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/Vote"
      type: object
    VoteMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/VoteItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
    WrittenQuestion:
      additionalProperties: false
      properties:
        answerIsCorrection:
          nullable: true
          type: boolean
        answerIsHolding:
          nullable: true
          type: boolean
        answerText:
          nullable: true
          type: string
        answeringBody:
          $ref: "#/components/schemas/AnsweringBody"
        answeringBodyId:
          format: int32
          type: integer
        answeringMember:
          $ref: "#/components/schemas/Member"
        answeringMemberId:
          format: int32
          nullable: true
          type: integer
        askingMemberId:
          format: int32
          type: integer
        attachmentCount:
          format: int32
          type: integer
        correctingMember:
          $ref: "#/components/schemas/Member"
        correctingMemberId:
          format: int32
          nullable: true
          type: integer
        dateAnswered:
          format: date-time
          nullable: true
          type: string
        dateForAnswer:
          format: date-time
          type: string
        dateTabled:
          format: date-time
          type: string
        groupedQuestions:
          items:
            type: string
          nullable: true
          type: array
        groupedQuestionsDates:
          items:
            $ref: "#/components/schemas/GroupedQuestion"
          nullable: true
          type: array
        heading:
          nullable: true
          type: string
        house:
          $ref: "#/components/schemas/House"
        id:
          format: int32
          type: integer
        isNamedDay:
          type: boolean
        isWithdrawn:
          type: boolean
        memberHasInterest:
          type: boolean
        questionText:
          nullable: true
          type: string
        uin:
          nullable: true
          type: string
      type: object
    WrittenQuestionItem:
      additionalProperties: false
      properties:
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        value:
          $ref: "#/components/schemas/WrittenQuestion"
      type: object
    WrittenQuestionMembersServiceSearchResult:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: "#/components/schemas/WrittenQuestionItem"
          nullable: true
          type: array
        links:
          items:
            $ref: "#/components/schemas/Link"
          nullable: true
          type: array
        resultContext:
          nullable: true
          type: string
        skip:
          format: int32
          type: integer
        take:
          format: int32
          type: integer
        totalResults:
          format: int32
          type: integer
      type: object
