info:
  description: API for managing counterparty risk and intelligence
  title: PostRFP Buyer API
  version: 1.8.1
servers:
- url: https://re.postrfp.com/buyer/api/
- url: http://localhost:9000/buyer/api/
paths:
  /answer/{answer_id}/attachment:
    get:
      description: Download the Answer Attachment with the given ID
      parameters:
      - in: path
        required: true
        name: answer_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_answer_attachment
      tags:
      - Attachments
  /categories:
    get:
      description: Fetch an array of all Category objects for the user's 
        organisation
      parameters: []
      responses:
        '200':
          description: Successful Response
          links:
            delete_category:
              operationId: delete_category
              parameters:
                category_id: $response.body#/0/id
            get_category:
              operationId: get_category
              parameters:
                category_id: $response.body#/0/id
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Category'
      operationId: get_categories
      tags:
      - Categories
  /category:
    post:
      description: "Create a new Category belonging to the current user's organisation.\n\
        \nCategories with duplicate names are not permitted and receive an HTTP 409
        Response"
      parameters: []
      responses:
        '200':
          description: Successful Response
          links:
            get_category:
              operationId: get_category
              parameters:
                category_id: $response.body#/id
            delete_category:
              operationId: delete_category
              parameters:
                category_id: $response.body#/id
            put_category:
              operationId: put_category
              parameters:
                category_id: $response.body#/id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
      operationId: post_category
      tags:
      - Categories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewCategory'
  /category/{category_id}:
    delete:
      description: "Delete the category with the given ID.\n\nNote that projects belong
        to this category are __not__ deleted\nThis action requires the user permission
        'MANAGE_ORGANISATION'"
      parameters:
      - in: path
        required: true
        name: category_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_category
      tags:
      - Categories
    get:
      description: Fetch the Category object for the given ID
      parameters:
      - in: path
        required: true
        name: category_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Category'
      operationId: get_category
      tags:
      - Categories
    put:
      description: "Update the name or description for the Category at the given ID\n\
        \nThis action requires the user permission 'MANAGE_ORGANISATION'"
      parameters:
      - in: path
        required: true
        name: category_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_category
      tags:
      - Categories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewCategory'
  /client:
    post:
      description: "Create a new organisation. This operation is only valid for Consultant
        users creating\nBuyer organisations for their clients."
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgWithUsers'
      operationId: post_client
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewClient'
  /element/{element_id}/answers:
    get:
      description: "An array of answers from all projects and all issues for the provided
        element_id.\n\nProject ID, Title and Date Published are provided to be used
        as a reference when reviewing\nprevious answers."
      parameters:
      - in: path
        required: true
        name: element_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RespondentAnswers'
      operationId: get_element_answers
      tags:
      - Answers
  /event/types:
    get:
      description: List of available audit event type identifiers (public 
        constants). Useful for filtering.
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_event_types
      tags:
      - Audit
  /event/{event_id}:
    get:
      description: "Full details for a single audit event plus resolved context (issue
        info, question number,\nsection, user, project title when applicable). Returns
        404 if not visible to the caller’s\norganisation. Permission: MANAGE_ORGANISATION."
      parameters:
      - in: path
        required: true
        name: event_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditEvent'
      operationId: get_event
      tags:
      - Audit
  /events:
    get:
      description: "Organisation‑wide audit feed across all accessible projects. Optional
        event_type filter,\npaged. Permission: MANAGE_ORGANISATION."
      parameters:
      - in: query
        required: false
        name: eventType
        schema:
          type: string
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SummaryEvent'
      operationId: get_events
      tags:
      - Audit
  /issue/{issue_id}:
    get:
      description: 'Retrieve an Issue by ID (requires access to its Project). Permission:
        PROJECT_ACCESS.'
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Issue'
      operationId: get_issue
      tags:
      - Issues
  /issue/{issue_id}/status:
    post:
      description: "Change Issue status (uses server‑side transition rules & permission
        checks; may\nset timestamps and validate mandatory answers / deadlines). Emits
        appropriate\naudit event via change_issue_status."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_issue_status
      tags:
      - Issues
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueStatus'
  /issues:
    get:
      description: "Paginated list of Issues visible to the user across all participating
        Projects.\nSupports filtering by respondent (q_org_id) and status; sortable
        by deadline,\nsubmitted_date, or issue_date (asc/desc).\n\n\"orgId\" query
        parameter is the ID of the respondent organisation to filter by\n\"projectIds\"\
        \ is an array of GET parameters to filter by project ID."
      parameters:
      - in: query
        required: false
        name: issueSort
        description: Issue list sort order
        schema:
          type: string
          default: issue_date
          $ref: '#/components/schemas/_get_issuesIssuesort'
      - in: query
        required: false
        name: sort
        schema:
          type: string
          default: desc
          $ref: '#/components/schemas/_get_issuesSort'
      - in: query
        required: false
        name: orgId
        schema:
          type: string
      - in: query
        required: false
        name: projectStatus
        description: Filter by provided Project Status values
        schema:
          type: string
          $ref: '#/components/schemas/_get_issuesProjectstatus'
      - in: query
        required: false
        name: projectIds
        description: ID values of Projects to query against
        schema:
          type: array
          items:
            type: integer
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuesList'
      operationId: get_issues
      tags:
      - Issues
  /network:
    delete:
      description: "Delete all relationships defined for this network.\nRelationship
        Types are not deleted."
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: delete_network
      tags:
      - Network
    get:
      description: Get an array of all the Network Relationships described by 
        your organisation
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NetworkRelationship'
      operationId: get_network
      tags:
      - Network
  /network/project/{project_id}:
    post:
      description: "Generate a network of relationships between vendors and participants
        for the project ID\nprovided. Creates default Relationship Types for standard
        RFP project relationships."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NetworkRelationship'
      operationId: post_network_project
      tags:
      - Network
  /organisation:
    get:
      description: "Fetch organisation details together with an array of users.\n\n\
        Consultant users can provide an \"orgId\" query parameter to fetch details
        for a client\norganisation."
      parameters:
      - in: query
        required: false
        name: orgId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgWithUsers'
      operationId: get_organisation
      tags:
      - Auth
    put:
      description: Update name, password_expiry and public fields for the given 
        organisation.
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseOrganisation'
      operationId: put_organisation
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Organisation'
  /organisations:
    get:
      description: "Get an array of organisations. The type of organisation returned
        depends on the value of the\nquery parameter 'orgType':\n- 'vendors', the
        default, provides an array of vendor(supplier) organisations that have been\n\
        \   invited to respond to Projects issued by the current users' organisation.\n\
        - 'clients' - get buyer organisations that are clients of current user's organisation.
        This\n   option is only valid for Consultant organisations."
      parameters:
      - in: query
        required: false
        name: orgType
        schema:
          type: string
          default: vendors
          $ref: '#/components/schemas/_get_organisationsOrgtype'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BaseOrganisation'
      operationId: get_organisations
      tags:
      - Auth
  /permissions:
    get:
      description: "List all available permissions, optionally filtered by the entity
        type provided.\nValid entity types are 'project', 'issue' and 'admin'. If
        no entity type is provided\nthen all permissions are returned."
      parameters:
      - in: query
        required: false
        name: entity
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_permissions
      tags:
      - Auth
  /project:
    post:
      description: "Create a new Project\n\nID values provided in the category_ids
        field of the JSON request body\nare used to link the new project to categories
        with those ID values.\n\nThe 'section_id' field in the Response is the ID
        of the Root Section for the\nnewly created project."
      parameters: []
      responses:
        '200':
          description: Successful Response
          links:
            get_project:
              operationId: get_project
              parameters:
                project_id: $response.body#/id
            delete_project:
              operationId: delete_project
              parameters:
                project_id: $response.body#/id
            put_project_publish:
              operationId: put_project_publish
              parameters:
                project_id: $response.body#/id
            put_project:
              operationId: put_project
              parameters:
                project_id: $response.body#/id
            post_project_section_excel:
              operationId: post_project_section_excel
              parameters:
                project_id: $response.body#/id
                section_id: $response.body#/section_id
              description: Add questions to a new Project by uploading an Excel 
                xlsx file.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewProjectIds'
      operationId: post_project
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewProject'
  /project/{project_id}:
    delete:
      description: Delete the given project together with all sections, 
        subsections and questions
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project
      tags:
      - Projects
    get:
      description: "Get a project checking that the user is in a participant\norganisation
        and has explicit user permissions for that project"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullProject'
      operationId: get_project
      tags:
      - Projects
    put:
      description: "Update the project with the values contained in the UpdateableProject
        document.\n\nIf 'project_fields' is provided the existing values are overwritten."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          links:
            get_project:
              operationId: get_project
              parameters:
                project_id: $response.path.project_id
              description: The path element project_id can be used to fetch the 
                updated project at /project/{project_id}
      operationId: put_project
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateableProject'
  /project/{project_id}/answerattachments:
    get:
      description: "list Answer Attachments for the current project - attachments
        uploaded as answers to\nquestions with File Upload question elements"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AnswerAttachment'
      operationId: get_project_answerattachments
      tags:
      - Attachments
  /project/{project_id}/answers:
    get:
      description: "Fetch Answers to all questions in the current project for the
        Issue IDs provided.\n\n__N.B.__ This operation is inefficient for projects
        with very many questions or Issues. A\nmaximum of 2,000 element answers will
        be returned. An HTTP 400 error will be returned if more\nthan 2,000 answers
        are found. This total does not include unanswered Question Element / Issue\n\
        combinations. Operation ID get_project_qstats can be used to check how many\n\
        answerable elements are in the project.\n\n    Results are provided as a nested
        mapping object allowing easy reference when\n    assigning answers to questions
        for specific Issues:\n    ```\n    {\n        // ID of the Issue\n       \
        \ \"923\": {\n\n            // Element ID to  Answer Value\n            \"\
        2342742\": \"Yes, we can deliver to Jupiter\",\n            \"7234232\": \"\
        No, we cannot deliver to Baltimore\"\n\n        }\n    }\n    ```\n    So
        to reference an answer for Issue 923 to Element 7234232, the notation is\n\
        \    data['923']['7234232']\n\n    (bear in mind that numerical IDs are delivered
        as Strings when used as Object keys in JSON)"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: issueIds
        description: ID values of Issues to query against
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerLookup'
      operationId: get_project_answers
      tags:
      - Answers
  /project/{project_id}/approval:
    post:
      description: "Log an approval for the given project by the current user.\n\n\
        A user may only approve a given project once for each distinct project status.\n\
        If the user has already approved the project for its current status then\n\
        an error is raised.\n\nThe approval is recorded in the ProjectApproval table
        together with\nthe project status at the time of approval."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectApproval'
      operationId: post_project_approval
      tags:
      - Projects
  /project/{project_id}/approval/{approval_id}:
    delete:
      description: "Remove the given approval from the project.\n\nApprovals can be
        deleted by:\n- the user who created the approval\n- a user with both editProject
        and approveProject permissions"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: approval_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectApproval'
      operationId: delete_project_approval
      tags:
      - Projects
  /project/{project_id}/approvals:
    get:
      description: "List all approvals for the given project.\n\nAn approval is recorded
        when a user approves a project for its current status.\nA user may only approve
        a given project once for each distinct project status."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectApproval'
      operationId: get_project_approvals
      tags:
      - Projects
  /project/{project_id}/attachment:
    post:
      description: "Upload a file as an attachment to the project.\n\nThis action
        can be performed for Projects at status Draft or Live"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_project_attachment
      tags:
      - Attachments
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                attachment_upload:
                  type: string
                  format: binary
                description:
                  type: string
  /project/{project_id}/attachment/{attachment_id}:
    delete:
      description: "Delete the Project Attachment with the given ID\n\nThis action
        can be performed for Projects at status Draft or Live"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_attachment
      tags:
      - Attachments
    get:
      description: Download the Project Attachment with the given ID
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_project_attachment
      tags:
      - Attachments
  /project/{project_id}/attachments:
    get:
      description: list details for all Project Attachments (attachments 
        uploaded by the Project author - buyer)
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attachment'
      operationId: get_project_attachments
      tags:
      - Attachments
  /project/{project_id}/calcautoscores:
    get:
      description: "Preview autoscores (not persisted) for a target scorer’s set.
        Requires: Live project,\nmultiscored, participant target, proper save/agreed
        permissions."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
      operationId: get_project_calcautoscores
      tags:
      - Scoring
    post:
      description: "Persist autoscores into a target scorer’s set. Skips unchanged
        values. Emits create/change\naudit events (autoscore flagged). Same preconditions
        as preview."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
      operationId: post_project_calcautoscores
      tags:
      - Scoring
  /project/{project_id}/category/{category_id}:
    delete:
      description: Remove the category with the given ID from the project at 
        this URL
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: category_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_category
      tags:
      - Projects
    put:
      description: Assign the category with the given ID to the project at this 
        URL
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: category_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_category
      tags:
      - Projects
  /project/{project_id}/close:
    put:
      description: "Close the given project.\n\nChanges the status of the Project
        from 'Live' to 'Closed'.\nAny pending issues at status 'Opportunity' will
        be retracted."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_close
      tags:
      - Projects
  /project/{project_id}/events:
    get:
      description: "Project‑scoped audit timeline. Returns lightweight events (id,
        timestamp, user_id, type)\nvisible to the caller’s organisation. Optional
        filtering by event_type. Supports paging.\nPermission: PROJECT_ACCESS."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: eventType
        schema:
          type: string
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SummaryEvent'
      operationId: get_project_events
      tags:
      - Audit
  /project/{project_id}/issue:
    post:
      description: "Create a new Issue (invitation). Exactly one of respondent_id
        or respondent_email\nmust be supplied. Starts in Not Sent status. Emits ISSUE_CREATED
        audit event with\ninitial field values."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          links:
            get_project_issue:
              operationId: get_project_issue
              parameters:
                project_id: $response.path.id
                issue_id: $response.body#/id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_project_issue
      tags:
      - Issues
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewIssue'
  /project/{project_id}/issue/{issue_id}:
    delete:
      description: "Delete an Issue (permitted only while it is Not Sent, Declined,
        or Retracted).\nEmits ISSUE_DELETED audit event."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_issue
      tags:
      - Issues
    get:
      description: 'Retrieve a single Issue within a Project. Permission: PROJECT_ACCESS.'
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Issue'
      operationId: get_project_issue
      tags:
      - Issues
    put:
      description: "Update mutable Issue fields (e.g. label, deadlines, win/loss exposure).
        Status\nchanges are NOT allowed here (use status endpoint). Emits ISSUE_UPDATED
        audit event\nwith per‑field change log."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_issue
      tags:
      - Issues
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateableIssue'
  /project/{project_id}/issue/{issue_id}/attachment/{attachment_id}:
    get:
      description: Download the Issue Attachment with the given ID
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_project_issue_attachment
      tags:
      - Attachments
  /project/{project_id}/issue/{issue_id}/question:
    get:
      description: Get the answered question for the given project and issue.
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: true
        name: questionNumber
        description: e.g. "5.2.9"
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleRespondentQuestion'
      operationId: get_project_issue_question
      tags:
      - Answers
  /project/{project_id}/issueattachments:
    get:
      description: list all Issue attachments (uploaded by Respondents) for the 
        current Project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IssueAttachment'
      operationId: get_project_issueattachments
      tags:
      - Attachments
  /project/{project_id}/issues:
    get:
      description: 'List all Issues for a Project (no pagination). Permission: PROJECT_ACCESS.'
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Issues'
      operationId: get_project_issues
      tags:
      - Issues
  /project/{project_id}/movesection:
    put:
      description: "Move the section given by section_id to a location with the same
        project given by\nnew_parent_id - the ID of the new Parent section"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Section'
      operationId: put_project_movesection
      tags:
      - Sections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveSection'
  /project/{project_id}/nodes:
    get:
      description: "Get an array of subsections and questions for the given project
        id and section id.\nIf section ID is not provided then results for the root
        section of the project are returned.\n\nIf ancestors parameter is true or
        1, then nodes of all direct ancestors and siblings of those\nancestors are
        returned, facilitating the respresentation of a tree structure.\n\nEach section
        or question is a \"node\" in the questionnaire. The array\nis sorted in document
        order: 1.1.1, 1.1.2, 1.2.1, 1.2.2 etc."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: sectionId
        schema:
          type: integer
      - in: query
        required: false
        name: ancestors
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectNode'
      operationId: get_project_nodes
      tags:
      - Sections
  /project/{project_id}/note:
    post:
      description: "Add a Note to the given Project\n\nThe visibility of Notes to
        different organisation is given by the table below - the last three\ncolumns
        indicate the visiblity of the message to each group.\n\n|private|target_org_id
        defined|all respondents? |target respondent?|participants?   |\n|-------|---------------------|-----------------|------------------|----------------|\n\
        |false  | true                | no              |  yes             | yes \
        \           |\n|false  | false               | yes             |  not applicable\
        \  | yes            |\n|true   | false               | yes             | \
        \ not applicable  | yes            |\n|true   | true                | no \
        \             |  no              | yes            |\n\n\nField 'target_org_id'
        is the ID of the Organisation to whom a Note is addressed. The\nOrganisation
        must be a respondent for the current Project\n(i.e assigned as Respondent
        for an Issue).\n\nSetting 'target_org_id' has no effect if the message is
        private (in which case only users in\nParticpant organisations can view the
        message)\n\nPermissions: PROJECT_ADD_NOTE"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          links:
            get_project_notes:
              operationId: get_project_notes
              parameters:
                project_id: $response.path.id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_project_note
      tags:
      - Notes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectNote'
  /project/{project_id}/note/{note_id}:
    delete:
      description: "Delete a Project Note\n\nPermissions: PROJECT_ADD_NOTE"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: note_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_note
      tags:
      - Notes
    put:
      description: "Update a Project Note. See Post Project Note for details of privacy
        and visibility\n\nPermissions: PROJECT_ADD_NOTE"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: note_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_note
      tags:
      - Notes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectNote'
  /project/{project_id}/notes:
    get:
      description: Get a list of ProjectNotes for the given project_id.
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadNotes'
      operationId: get_project_notes
      tags:
      - Notes
  /project/{project_id}/participants:
    get:
      description: "List organisations that are registered as Participants in the
        given project together\nwith the Role assigned in the given project."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParticipantList'
      operationId: get_project_participants
      tags:
      - Projects
    put:
      description: "Update the Organisations participating in the given project together
        with their Roles\n\nThe current user's own Organisation cannot be removed
        as participant."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParticipantList'
      operationId: put_project_participants
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateParticipantList'
  /project/{project_id}/permissions:
    get:
      description: "returns {\n    target_user: user whose permissions are in focus\n\
        \    permissions: list of section ids the user can access\n}"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
      operationId: get_project_permissions
      tags:
      - Projects
    put:
      description: Assign section permissions for a restricted user to access 
        the project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_permissions
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectPermission'
  /project/{project_id}/publish:
    put:
      description: "Publish a project.\n\nChanges the status of the Project from 'Draft'
        to 'Live'.\n\n### Update Issue Statuses\n\nWhen project is published it is
        often useful to simultaneously \"release\" the issues that\nbelong to the
        project. \"Release\" means to change the status of an issue from 'Not Sent'
        to\neither 'Opportunity' or 'Accepted', depending on the value of the parent
        project's\n'Required Acceptance' field.\n\nIf the Project's require_acceptance
        field is true, the the status of each Issue\nwill change from 'Not Sent' to
        'Opportunity'.\n\nIf the Project's required_acceptance field is false the
        each Issue will move from\nstatus 'Not Sent' to 'Accepted'.\n\nOnly issues
        whose ID values are included in the JSON body 'release_issue_ids' field will\n\
        be updated.\n\nIf there are no values given in the JSON body field 'release_issue_id'\n\
        then the status of all issues belong to the project remain unchanged.\n\n\
        ID values in 'release_issue_ids' that do not belong to the current project
        are ignored."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PublishResult'
      operationId: put_project_publish
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishProject'
  /project/{project_id}/qstats:
    get:
      description: "Retrieve statistics for counts of sections, questions and question
        elements (by type)\nfor the given project ID."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionnaireStats'
      operationId: get_project_qstats
      tags:
      - Sections
  /project/{project_id}/question/{question_id}/element/{element_id}:
    put:
      description: Update a single Question Element
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: path
        required: true
        name: element_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_question_element
      tags:
      - Questions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QElement'
  /project/{project_id}/questions/replace:
    post:
      description: "Replace search_term with replace_term (from the Request's json
        body) in all questions in the\nproject. Question titles, label field and multiple
        choice options are updated.\n\nIf the JSON body field 'dry_run' is true then
        no update is made, but the results returned\nshow what changes would be made.\n\
        \nThe Response is an array of ReplacedItem records, one for each question
        element or question\ntitle that has been changed, together with the old and
        new values.\n\nThis search is case sensitive"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReplacedItem'
      operationId: post_project_questions_replace
      tags:
      - Search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextReplace'
  /project/{project_id}/report/msword:
    get:
      description: "Generate an MS Word report for the quesionnaire associated with
        the given Project ID.\nIf an issue ID is provided the answers are populated
        for that Issue."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: issueId
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_project_report_msword
      tags:
      - Reports
  /project/{project_id}/report/qtext:
    get:
      description: "Generate a spreadsheet with one row for each question and one
        column for title and then each\nLabel (question text) element in the question.\n\
        \nUseful for checking all the text in a questionnaire."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_project_report_qtext
      tags:
      - Reports
  /project/{project_id}/report/yesno:
    get:
      description: "Generate a spreadsheet report of answer to questions with a specific
        structure of 4 rows:\n\n 1. Question Body\n 2. Multiple choice options, e.g.
        'Yes; No; Yes, with Qualifications'\n 3. Comments box header, e.g. 'Qualifications'\n\
        \ 4. Text input field\n\n Questions not matching this structure are ignored"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_project_report_yesno
      tags:
      - Reports
  /project/{project_id}/scores:
    get:
      description: "Bulk export of all scores for a project in one score set (agreed
        or individual) for\nanalytic use. \"__default__\" resolves to the agreed set.
        Permission: ISSUE_VIEW_AGREED_SCORES."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoringData'
      operationId: get_project_scores
      tags:
      - Scoring
  /project/{project_id}/scoresets:
    get:
      description: "list accessible score sets. With ISSUE_VIEW_AGREED_SCORES returns
        all distinct user sets\nplus synthetic agreed set (__default__). Otherwise
        returns only caller’s own set."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScoreSet'
      operationId: get_project_scoresets
      tags:
      - Scoring
  /project/{project_id}/section/{section_id}:
    delete:
      description: "Delete the given Section and all questions and subsections contained
        within that\nsection."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_section
      tags:
      - Sections
    get:
      description: "Get the Section with the given ID together with questions and
        subsections contained\nwithin the Section."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarySection'
      operationId: get_project_section
      tags:
      - Sections
    post:
      description: Create a new Section
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Section'
      operationId: post_project_section
      tags:
      - Sections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableSection'
    put:
      description: Update title or description for the given Section
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_section
      tags:
      - Sections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableSection'
  /project/{project_id}/section/{section_id}/children:
    put:
      description: "Set the contents of the Section by providing a list of section
        IDs *or* question IDs.\n\nThis method can be used to move *existing* questions
        or sections to a new parent section or\nto re-order existing section contents.
        It cannot be used to move questions or sections from a\ndifferent project.\n\
        \nChild objects (Section or Question) which exist within the current section
        but whose ID is not\nincluded in the JSON body parameter are termed 'orphans'.\
        \  If 'delete_orphans' is true, then\nsuch objects will be deleted, i.e. the
        contents of the current section will be exactly the same\nas that provided
        by the question_ids or section_ids parameter.\n\nThe default value for 'delete_orphans'
        is false - this value should only be overridden with\ncare.\n\nN.B.  The JSON
        body object should contain either question_ids or section_ids arrays, but\n\
        not both."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarySection'
      operationId: put_project_section_children
      tags:
      - Sections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SectionChildNodes'
  /project/{project_id}/section/{section_id}/excel:
    post:
      description: "Create questions and subsections within the given section by uploading
        an Excel spreadsheet\nwith a specific format of 5 columns:\n\n- A: Section
        Title. Add the newly created question to this section, creating the Section
        if\n        necessary\n- B: Question Title. Short - for reference and navigation\n\
        - C: Question Text. The body of the question\n- D: Multiple Choices. Multiple
        choice options seperated by semi colons. A numeric value\n        in angle
        brackets, e.g. <5> after the option text is interpreted as the Autoscore value\n\
        \        for that option\n- E: Comments Field header. If provided in conjunction
        with Multiple choice options the\n        value of this column is used to
        create a subheader below the multiple choice field\n        and above a text
        field for comments or qualifications.\n\n\nAt most 500 rows are processed.
        Additional rows are disregarded. If column D is empty the\nquestion will consist
        of a single text input field."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExcelImportResult'
      operationId: post_project_section_excel
      tags:
      - Sections
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                data_upload:
                  type: string
                  format: binary
  /project/{project_id}/section/{section_id}/import:
    post:
      description: Import questionnaire from previous project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionImportResult'
      operationId: post_project_section_import
      tags:
      - Sections
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SectionImportDoc'
  /project/{project_id}/section/{section_id}/issue/{issue_id}/answers:
    get:
      description: Fetch an array of Answer objects for the given Project, Issue
        and Section
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Answer'
      operationId: get_project_section_issue_answers
      tags:
      - Answers
  /project/{project_id}/section/{section_id}/issue/{issue_id}/scores:
    get:
      description: "Scores for a single Issue within the scope of a Section (and underlying
        fetch rules),\nfiltered by score set. Permission: derived from score set."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
      operationId: get_project_section_issue_scores
      tags:
      - Scoring
  /project/{project_id}/section/{section_id}/question:
    post:
      description: Create a new Question in the given section
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Question'
      operationId: post_project_section_question
      tags:
      - Questions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionDef'
  /project/{project_id}/section/{section_id}/question/{question_id}:
    delete:
      description: "Delete the Question with the given ID\n\nThe return value is an
        array of remaining instances of the same question that may exist\nin other
        projects"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QI'
      operationId: delete_project_section_question
      tags:
      - Questions
    get:
      description: Get the question with the given ID
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Question'
      operationId: get_project_section_question
      tags:
      - Questions
    put:
      description: "Update the title and question elements for the given question\n\
        \nThe provided JSON document must provide elements with ID values for all
        elements that are to\nbe retained.\nElements with ID values provided are updated.\n\
        Elements without an ID are added as new.\nAny existing elements not provided
        (with matching IDs) in the JSON document are deleted.\n\nIf items to be deleted
        have already been answered (in any project) this update is rejected\nwith
        an HTTP Status code of 409 (Conflict)."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Question'
      operationId: put_project_section_question
      tags:
      - Questions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuestionDef'
  /project/{project_id}/section/{section_id}/question/{question_id}/copy:
    post:
      description: Create a copy of the question (instance & definition) given 
        by question_id
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Node'
      operationId: post_project_section_question_copy
      tags:
      - Questions
  /project/{project_id}/section/{section_id}/question/{question_id}/unlink:
    post:
      description: "Unlink the question from any previous projects so it can be edited
        freely.\nN.B. This breaks answer & score importing between projects"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_project_section_question_unlink
      tags:
      - Questions
  /project/{project_id}/section/{section_id}/weightings:
    get:
      description: "Get weightings for the Sections or Questions in the given section,
        together with the\nabsolute weighting of parent section (allowing absolute
        weights to be calculated for\nsubsections or questions)"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: query
        required: false
        name: weightsetId
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParentedWeighting'
      operationId: get_project_section_weightings
      tags:
      - Weighting
  /project/{project_id}/treenodes:
    get:
      description: "N.B. - this method is deprecated. Use get_project_nodes instead.\n\
        \nGet an array of all sections, subsections and questions for the given project
        id.\n\nEach section or question is a \"node\" in the questionnaire tree structure.
        The array\nis sorted in document order: 1.1.1, 1.1.2, 1.2.1, 1.2.2 etc."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProjectNode'
      operationId: get_project_treenodes
      tags:
      - Sections
  /project/{project_id}/user/permissions:
    get:
      description: "Returns a User dictionary augmented with sets of permissions (string
        names) given the\nthe user's effective permissions in the given project. This
        set is derived from the\nintersection of the user's permissions plus the user's
        participant organisation\npermission (role) in the project.\n\nIf target_user
        is given then the permissions apply to that user, otherwise\nthe permissions
        apply to the current user (user arg)"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectUser'
      operationId: get_project_user_permissions
      tags:
      - Projects
  /project/{project_id}/users:
    get:
      description: List all participant users with access to the project.
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: restricted
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserList'
      operationId: get_project_users
      tags:
      - Projects
  /project/{project_id}/watch:
    delete:
      description: Remove the target user from the watchlist for this project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Watcher'
      operationId: delete_project_watch
      tags:
      - Projects
    post:
      description: "Assign a new user as a watcher of the given project.\nReturns
        a list of user ids watching the current project"
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Watcher'
      operationId: post_project_watch
      tags:
      - Projects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetUser'
  /project/{project_id}/watchlist:
    get:
      description: List the users watching this project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Watcher'
      operationId: get_project_watchlist
      tags:
      - Projects
  /project/{project_id}/weightings:
    get:
      description: "Get total and instance(local) weightings for questions and sections
        in the current project.\n\nTotal weightings are the normalised, hierarchical
        weights reflecting the weight of the parent\nsection and all ancestor sections.\n\
        \nInstance weighings are the weightings that the user assigns to a question
        or section."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: query
        required: false
        name: weightsetId
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectWeightings'
      operationId: get_project_weightings
      tags:
      - Weighting
    post:
      description: "Batch saving/updating of Weightings\n\nTo save default weightings
        set the value of weightset_id to null."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_project_weightings
      tags:
      - Weighting
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WeightingsDoc'
  /project/{project_id}/weightset:
    post:
      description: "Create a new Weighting Set for the given Project\n\nWeightings
        will be created for each question and section in the project. The value of\n\
        these weightings will be set to the initial_value field in the json body,
        if given,\nor will be copied from the weightset whose ID is given by source_weightset_id."
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WeightSet'
      operationId: post_project_weightset
      tags:
      - Weighting
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWeightSet'
  /project/{project_id}/weightset/{weightset_id}:
    delete:
      description: Delete the given weighting set from the Project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: weightset_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_project_weightset
      tags:
      - Weighting
    put:
      description: Change the name of an existing Weighting Set
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      - in: path
        required: true
        name: weightset_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: put_project_weightset
      tags:
      - Weighting
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShortName'
  /project/{project_id}/weightsets:
    get:
      description: Get an array of Weighting Set objects for the given Project
      parameters:
      - in: path
        required: true
        name: project_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WeightSet'
      operationId: get_project_weightsets
      tags:
      - Weighting
  /projects:
    get:
      description: "An array of projects that the user's organisation is a participant\n\
        of and that the user, if restricted, has permission to access.\n\nIf no values
        are provided for project_statuses then projects with any status are returned.\n\
        \nUsing the \"participant_id\" query param will filter the list of projects
        to include only\nthose for which have a Participant organisation whose ID
        is that of participant_id. This\nparameter is only available to users in Consultant
        organisations and the participant_id must\nbe the ID of an organisation that
        is a Client of the Consultant."
      parameters:
      - in: query
        required: false
        name: projectStatus
        description: Filter by provided Project Status values
        schema:
          type: array
          items:
            type: string
      - in: query
        required: false
        name: projectSort
        description: Sort projects by dates or title
        schema:
          type: string
          default: date_created
          $ref: '#/components/schemas/_get_projectsProjectsort'
      - in: query
        required: false
        name: sort
        schema:
          type: string
          default: desc
          $ref: '#/components/schemas/_get_projectsSort'
      - in: query
        required: false
        name: participantId
        schema:
          type: string
      - in: query
        required: false
        name: qTitle
        description: Search for string inside a title
        schema:
          type: string
      - in: query
        required: false
        name: categoryId
        description: ID of the Project
        schema:
          type: integer
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectList'
      operationId: get_projects
      tags:
      - Projects
  /question/{question_id}/answers:
    get:
      description: "Fetch answers for question `question_id` from project structures
        as nested object\nmapping issue ID to question element ID to answer.\n\n \
        \   Results are provided as a nested mapping object allowing easy reference
        when\n    assigning answers to questions for specific Issues:\n    ```\n \
        \   {\n        // ID of the Issue\n        \"923\": {\n\n            // Element
        ID to  Answer Value\n            \"2342742\": \"Yes, we can deliver to Jupiter\"\
        ,\n            \"7234232\": \"No, we cannot deliver to Baltimore\"\n\n   \
        \     }\n    }\n    ```\n    So to reference an answer for Issue 923 to Element
        7234232, the notation is\n    data['923']['7234232']\n\n    (bear in mind
        that numerical IDs are delivered as Strings when used as Object keys in JSON)"
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerLookup'
      operationId: get_question_answers
      tags:
      - Answers
  /question/{question_id}/element/{element_id}/attachment:
    get:
      description: Download the Question Attachment associated with the given 
        Element ID
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: path
        required: true
        name: element_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      operationId: get_question_element_attachment
      tags:
      - Attachments
  /question/{question_id}/events:
    get:
      description: "Chronological history of QUESTION and SECTION events for all instances
        sharing the same\nunderlying question definition as the supplied question
        instance. Ordered oldest first.\nPermission: PROJECT_VIEW_QUESTIONNAIRE (section
        scope)."
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FullEvent'
      operationId: get_question_events
      tags:
      - Audit
  /question/{question_id}/instances:
    get:
      description: Find shared instances of the given question across all 
        projects
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QuestionInstance'
      operationId: get_question_instances
      tags:
      - Questions
  /question/{question_id}/issue/{issue_id}/answers:
    get:
      description: Fetch an array of Answer & Element ID for the given Question,
        Issue
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElementAnswerList'
      operationId: get_question_issue_answers
      tags:
      - Answers
  /question/{question_id}/issue/{issue_id}/comments:
    get:
      description: "All comments (chronological) for a specific score (question +
        issue + score set).\nEmpty list if score not yet created. Requires view permissions."
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
      operationId: get_question_issue_comments
      tags:
      - Scoring
  /question/{question_id}/score:
    post:
      description: "Create or update a single score (question + issue + score set).
        Validates range,\nenforces save permission, emits audit event (create/change)."
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_question_score
      tags:
      - Scoring
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Score'
  /question/{question_id}/score/comment:
    post:
      description: "Add a comment to (and optionally update) a score. Creates score
        if needed.\nEmits SCORE_COMMENT_ADDED plus score change audit if value updated."
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_question_score_comment
      tags:
      - Scoring
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Score'
  /question/{question_id}/scores:
    get:
      description: "Scores for one question across all Issues in a specified score
        set (agreed or individual).\nPermission determined by score set context."
      parameters:
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
      operationId: get_question_scores
      tags:
      - Scoring
  /relationship:
    delete:
      description: Delete a new Relationship between two organisations
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: delete_relationship
      tags:
      - Network
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Relationship'
    post:
      description: Create a new Relationship between two organisations
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_relationship
      tags:
      - Network
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Relationship'
  /reltype:
    post:
      description: "Create a new Relationship Type for your organisation\n\nA RelationshipType
        must be defined for your organisation before a Relationship can\nbe defined
        between two 3rd party organisations.\nMultiple RelationshipTypes can be defined
        for your organisation in order to model different\ntypes of inter-organisation
        relationships - e.g. 'Partner', 'Downstream Supplier',\n'Regulator', etc."
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_reltype
      tags:
      - Network
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelationshipType'
  /reltype/{reltype_id}:
    delete:
      description: "Delete the Relationship Type with the given ID together with all\n\
        relationships of that type. Underlying Organisations are not deleted."
      parameters:
      - in: path
        required: true
        name: reltype_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: delete_reltype
      tags:
      - Network
    put:
      description: Update the name or description for the Relationship Type with
        the given ID
      parameters:
      - in: path
        required: true
        name: reltype_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: put_reltype
      tags:
      - Network
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RelationshipType'
  /reltypes:
    get:
      description: Get an array of Relationship Types for your organisation
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelationshipType'
      operationId: get_reltypes
      tags:
      - Network
  /role:
    get:
      description: List permissions associated with the provided Role
      parameters:
      - in: query
        required: false
        name: roleId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_role
      tags:
      - Auth
  /roles:
    get:
      description: List all available roles - built-in and custom (defined by 
        the current users organisation)
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_roles
      tags:
      - Auth
  /search:
    get:
      description: "Text search for the various Object types given by 'options'.\n\
        \nOptionally, filter results by project ID (project_id parameter)\n\n20 results
        are returned per query. Results can be paged using the offset parameter.\n\
        \nThe following special characters can be used in searchTerm to refine the
        search:\n\n* Prepend a + symbol to a word to only see results with that word\n\
        * Prepend a - symbol to exlude any records containing that word\n* Append
        * to a word to act as a wildcard\n\nFor example \"+green fingers find* -expensive\"\
        \ will find records that:\n\n1. Must contain the work \"green\"\n2. Should
        contain \"fingers\"\n3. Should contain words starting with \"find\" e.g. \"\
        findings\" or \"finds\" or \"Findlay\"\n4. Must not contain the work \"expensive\"\
        \n\n\n### Results\nA SearchResult record is returned for each hit. This has
        the following fields:\n\n* __klass__ - identifies the type of search result,
        corresponding to the options parameter\n* __project_title__ - title of the
        associated Project\n* __object_id__ - for questions, answers, choices and
        scoreComment records this is in the form\n  of a string containing section
        ID and question ID separated by a | character, e.g.\n  239|121231, where 239
        is the Section ID and 121231 is the Question ID. For note records\n  the object_id
        is the ID of that note.\n* __object_ref__ - for questions, answers, choices
        and scoreComment this is the question number\n  e.g. '4.2.18'\n* __snippet__
        - this a block of text surrounding a containing the searchTerm\n* __search_score__
        - a score indicating the closeness of match"
      parameters:
      - in: query
        required: true
        name: searchTerm
        description: See Path documentation for details of search special 
          characters
        schema:
          type: string
      - in: query
        required: false
        name: options
        description: Defines which object types should be searched
        schema:
          type: array
          items:
            type: string
      - in: query
        required: false
        name: projectId
        description: ID of the Project
        schema:
          type: integer
      - in: query
        required: false
        name: offset
        description: For paging results
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SearchResult'
      operationId: get_search
      tags:
      - Search
  /section/{section_id}/scores:
    get:
      description: "Calculated scores (immediate child subsections & questions) applying
        optional weighting\nand scoring model (default \"Unweighted\"). Returns per
        Issue breakdown + totals."
      parameters:
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      - in: query
        required: false
        name: weightsetId
        schema:
          type: integer
      - in: query
        required: false
        name: scoringModel
        description: 'Type of scoring model to return. One of: Unweighted - no weighting
          applied, Direct - score multiplied by the score of the question or section,
          Absolute - score multiplied by absolute weight of the question or section'
        schema:
          type: string
          default: Unweighted
          $ref: '#/components/schemas/_get_section_scoresScoringmodel'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculatedScores'
      operationId: get_section_scores
      tags:
      - Scoring
  /section/{section_id}/scoreset/scores:
    post:
      description: "Bulk upsert of multiple scores across questions & issues within
        a Section for one score set.\nEmits per-score audit events. Fails fast on
        permission or value validation errors."
      parameters:
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Id'
      operationId: post_section_scoreset_scores
      tags:
      - Scoring
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SectionScoreDocs'
  /section/{section_id}/scoresummaries:
    get:
      description: "Coverage & subtotal summary for a Section: per-subsection progress
        (questions vs scored)\nand per-question score snapshot. Used for completion
        dashboards. Permission: score set view."
      parameters:
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: query
        required: false
        name: scoresetId
        description: Set to the user ID of a scoring user if Multiple Score Sets
          are enabled for this project
        schema:
          type: string
          default: __default__
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScoreSummary'
      operationId: get_section_scoresummaries
      tags:
      - Scoring
  /tag:
    post:
      description: Create a new Tag for your organization
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
      operationId: post_tag
      tags:
      - Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTag'
  /tag/{tag_id}:
    delete:
      description: "Delete the tag with the given ID and remove all references to
        that tag\nfrom related items."
      parameters:
      - in: path
        required: true
        name: tag_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_tag
      tags:
      - Tags
    put:
      description: Update the name and description of an existing tag
      parameters:
      - in: path
        required: true
        name: tag_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
      operationId: put_tag
      tags:
      - Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewTag'
  /tag/{tag_id}/assign:
    delete:
      description: "Un-assign the Tag with the given ID from the question instances
        with ID values\nprovided in the TagAssigns document.\n\nAn array of un-assigned
        question IDs is returned."
      parameters:
      - in: path
        required: true
        name: tag_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
      operationId: delete_tag_assign
      tags:
      - Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagAssigns'
    post:
      description: "Assign the Tag with the given ID to the question instances with
        ID values\nprovided in the TagAssigns document.\n\nDuplicate assignments are
        silently ignored.\n\nAn array of assigned question IDs is returned."
      parameters:
      - in: path
        required: true
        name: tag_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
      operationId: post_tag_assign
      tags:
      - Tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagAssigns'
  /tags:
    get:
      description: Get an array of all the Tags defined by your organization
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
      operationId: get_tags
      tags:
      - Tags
  /tags/section/{section_id}:
    get:
      description: "Get an array of objects, one for each tag, listing the question
        ids assigned to each\ntag for the given section_id.\n\nN.B. - this operation
        is not recursive only questions that are direct children of the given\nsection
        ID are considered"
      parameters:
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TagGroup'
      operationId: get_tags_section
      tags:
      - Tags
  /user:
    delete:
      description: "Delete the user account given by 'id' in the body document.\n\n\
        If the user ID is that of the current user an HTTP 400 Error reponse is returned
        -\na user cannot delete themselves via this method."
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: delete_user
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserId'
    get:
      description: Fetch an existing User by ID
      parameters:
      - in: query
        required: true
        name: userId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullUser'
      operationId: get_user
      tags:
      - Auth
    post:
      description: "Create a new user account.\n\nUser ID must be unique across the
        system. An HTTP 409 response is returned\nif the user ID provided already
        exists in the database;"
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringId'
      operationId: post_user
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableUser'
    put:
      description: Update an existing user account
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: put_user
      tags:
      - Auth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableUser'
  /users:
    get:
      description: "List users belonging to the Organisation given by orgId. If this
        parameter is not provided\nthen users are returned for the current logged-in
        user's organisation."
      parameters:
      - in: query
        required: false
        name: orgId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BaseUser'
      operationId: get_users
      tags:
      - Auth
  /vendor:
    get:
      description: "Vendor organisation profile (Consultant users only): organisation
        details plus\nIssues involving this buyer and the vendor's users."
      parameters:
      - in: query
        required: false
        name: orgId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Supplier'
      operationId: get_vendor
      tags:
      - Issues
  /webhook:
    delete:
      description: Delete the webhook for the given `event_type` - `org_id` 
        combination
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: delete_webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWebhook'
    post:
      description: "Save a new Webhook subscribing to the event_type given in the
        body JSON document.\n\nThe will sent a POST request to the provided `url`
        with a JSON encoded body for each event\nof the given `event_type`."
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWebhook'
    put:
      description: "Update the `remote_url` or `http_header` for the Webhook with
        the given event_type / org_id.\n\ndelivery_status and retries are reset to
        default values"
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: put_webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewWebhook'
  /webhook/events:
    get:
      description: Fetch an array of event types which accept webhook 
        subscriptions
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_webhook_events
      tags:
      - Webhooks
  /webhooks:
    get:
      description: "Fetch an array of Webhook objects for the current users' organisation,
        or, if given, the\norganisation indicated by query param `orgId`."
      parameters:
      - in: query
        required: false
        name: orgId
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Webhook'
      operationId: get_webhooks
      tags:
      - Webhooks
tags:
- name: Answers
  description: Operations for fetching vendor's answers
- name: Attachments
  description: Manage file attachments and uploads
- name: Audit
  description: View and query Audit Event Logs
- name: Auth
  description: Users, roles and authentication
- name: Categories
  description: Use Categories to organize Projects
- name: Issues
  description: Operations for managing Issues (invitations to respond) and their
    lifecycle.
- name: Network
  description: Define a network of relationships between organisations
- name: Notes
  description: Manage Project Notes  - messages between participants and 
    respondents in a project.
- name: Projects
  description: Manage projects, project permissions & project notes
- name: Questions
  description: Create, edit and fetch questions within a project
- name: Reports
  description: Generate reports - MS Word, Excel, Data Export
- name: Scoring
  description: "Scoring endpoints: manage raw scores, comments, autoscores, summaries
    and calculated /\nweighted aggregations. Empty scoreset_id (\"\") = agreed (consensus)
    set; non‑empty = individual."
- name: Search
  description: Search for question, answer or note text within or across 
    projects
- name: Sections
  description: Create, edit and view sections within a project
- name: Tags
  description: Manage tags - keywords that can be used to categorize questions
- name: Webhooks
  description: Manage Webhook Subscriptions - register external URLs to receive 
    notification of system events.
- name: Weighting
  description: Assign weightings to Sections and Questions. Manage named 
    weighting sets.
openapi: 3.1.1
components:
  schemas:
    AllocatedTo:
      properties:
        allocated_to:
          title: Allocated To
          type: string
        question_instance_id:
          title: Question Instance Id
          type: integer
      required:
      - allocated_to
      - question_instance_id
      title: AllocatedTo
      type: object
    Answer:
      properties:
        element_id:
          description: ID of the question Element for this answer
          title: Element Id
          type: integer
        answer:
          maxLength: 65536
          title: Answer
          type: string
        issue_id:
          description: ID of the associated Issue for this answer
          title: Issue Id
          type: integer
        question_id:
          title: Question Id
          type: integer
      required:
      - element_id
      - answer
      - issue_id
      - question_id
      title: Answer
      type: object
    AnswerAttachment:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        filename:
          title: Filename
          type: string
        mimetype:
          title: Mimetype
          type: string
        size:
          title: Size
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
      required:
      - filename
      - mimetype
      - size
      - size_bytes
      title: AnswerAttachment
      type: object
    AnswerLookup:
      additionalProperties:
        additionalProperties:
          type: string
        type: object
      description: Mapping of Issue ID to Question Element ID to answer
      example:
        '523':
          '234872': Answer for Issue 523, Element 234872
          '234875': Answer for Issue 523, Element 234875
        '529':
          '234872': Answer for Issue 529, Element 234872
          '234875': Answer for Issue 529, Element 234875
      title: AnswerLookup
      type: object
    AnswerResponseState:
      properties:
        status:
          title: Status
          type: string
        allocated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Allocated By
        allocated_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Allocated To
        approved_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Approved By
        updated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By
        date_updated:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Date Updated
        question_instance_id:
          title: Question Instance Id
          type: integer
      required:
      - status
      - allocated_by
      - allocated_to
      - approved_by
      - updated_by
      - date_updated
      - question_instance_id
      title: AnswerResponseState
      type: object
    AnswerSearch:
      properties:
        number:
          title: Number
          type: string
        question_id:
          title: Question Id
          type: integer
      required:
      - number
      - question_id
      title: AnswerSearch
      type: object
    Attachment:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        filename:
          title: Filename
          type: string
        mimetype:
          title: Mimetype
          type: string
        size:
          title: Size
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
        private:
          title: Private
          type: boolean
        description:
          maxLength: 255
          minLength: 1
          title: Description
          type: string
        date_uploaded:
          format: date-time
          title: Date Uploaded
          type: string
        author_id:
          title: Author Id
          type: string
        org_id:
          title: Org Id
          type: string
      required:
      - filename
      - mimetype
      - size
      - size_bytes
      - private
      - description
      - date_uploaded
      - author_id
      - org_id
      title: Attachment
      type: object
    AuditEvent:
      properties:
        id:
          title: Id
          type: integer
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        user_id:
          title: User Id
          type: string
        event_type:
          title: Event Type
          type: string
        event_class:
          title: Event Class
          type: string
        question_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Question Id
        project_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Project Id
        issue_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Issue Id
        org_id:
          title: Org Id
          type: string
        object_id:
          title: Object Id
        changes:
          items:
            additionalProperties: true
            type: object
          title: Changes
          type: array
        issue:
          anyOf:
          - $ref: '#/components/schemas/EvIssue'
          - type: 'null'
          default:
        user:
          anyOf:
          - $ref: '#/components/schemas/User'
          - type: 'null'
        question_number:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Question Number
        section_id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Section Id
        project_title:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Project Title
      required:
      - id
      - timestamp
      - user_id
      - event_type
      - event_class
      - question_id
      - project_id
      - issue_id
      - org_id
      - object_id
      - changes
      - user
      title: AuditEvent
      type: object
    BaseOrganisation:
      properties:
        id:
          maxLength: 50
          minLength: 3
          title: Id
          type: string
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        type:
          anyOf:
          - $ref: '#/components/schemas/OrgType'
          - type: 'null'
          default:
        public:
          default: false
          title: Public
          type: boolean
        domain_name:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Domain Name
      required:
      - id
      - name
      title: BaseOrganisation
      type: object
    BaseUser:
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          title: Type
          type: string
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
      required:
      - id
      - org_id
      - type
      - fullname
      - email
      title: BaseUser
      type: object
    CalculatedScores:
      properties:
        scoring_model:
          $ref: '#/components/schemas/ScoringModel'
        scores:
          additionalProperties:
            $ref: '#/components/schemas/IssueScores'
          title: Scores
          type: object
      required:
      - scoring_model
      - scores
      title: CalculatedScores
      type: object
    Category:
      properties:
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        description:
          maxLength: 250
          title: Description
          type: string
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      required:
      - name
      - description
      title: Category
      type: object
    Checkbox:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CB
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: Checkbox
      type: object
    Choice:
      additionalProperties: false
      properties:
        autoscore:
          anyOf:
          - maximum: 1000
            minimum: 0
            type: integer
          - type: 'null'
          default:
          title: Autoscore
        label:
          maxLength: 1024
          minLength: 1
          title: Label
          type: string
      required:
      - label
      title: Choice
      type: object
    Distribution:
      enum:
      - BROADCAST_NOTICE
      - RESPONDENT_QUERY
      - RESPONDENT_INTERNAL_MEMO
      - ISSUER_INTERNAL_MEMO
      - TARGETED
      title: Distribution
      type: string
    EditableSection:
      properties:
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
        description:
          anyOf:
          - maxLength: 1024
            type: string
          - type: 'null'
          default:
          title: Description
      required:
      - title
      title: EditableSection
      type: object
    EditableUser:
      properties:
        id:
          maxLength: 50
          minLength: 5
          title: Id
          type: string
        org_id:
          maxLength: 50
          minLength: 4
          title: Org Id
          type: string
        fullname:
          maxLength: 50
          minLength: 5
          title: Fullname
          type: string
        email:
          format: email
          title: Email
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        roles:
          items:
            maxLength: 255
            minLength: 3
            type: string
          maxItems: 20
          title: Roles
          type: array
      required:
      - id
      - org_id
      - fullname
      - email
      - roles
      title: EditableUser
      type: object
    ElGrid:
      items:
        $ref: '#/components/schemas/ElRow'
      maxItems: 50
      minItems: 0
      title: ElGrid
      type: array
    ElRow:
      items:
        anyOf:
        - $ref: '#/components/schemas/TextInput'
        - $ref: '#/components/schemas/Label'
        - $ref: '#/components/schemas/RadioChoices'
        - $ref: '#/components/schemas/SelectDropdown'
        - $ref: '#/components/schemas/Checkbox'
        - $ref: '#/components/schemas/QuestionAttachment'
        - $ref: '#/components/schemas/UploadField'
      maxItems: 10
      minItems: 0
      title: ElRow
      type: array
    ElementAnswer:
      properties:
        element_id:
          description: ID of the question Element for this answer
          title: Element Id
          type: integer
        answer:
          maxLength: 65536
          title: Answer
          type: string
      required:
      - element_id
      - answer
      title: ElementAnswer
      type: object
    ElementAnswerList:
      items:
        $ref: '#/components/schemas/ElementAnswer'
      maxItems: 100
      minItems: 0
      title: ElementAnswerList
      type: array
    Error:
      properties:
        error:
          title: Error
          type: string
        description:
          title: Description
          type: string
      required:
      - error
      - description
      title: Error
      type: object
    EvIssue:
      properties:
        respondent_id:
          title: Respondent Id
          type: string
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
      required:
      - respondent_id
      - label
      title: EvIssue
      type: object
    ExcelImportResult:
      properties:
        imported_count:
          description: Count of the number of imported questions
          title: Imported Count
          type: integer
      required:
      - imported_count
      title: ExcelImportResult
      type: object
    FullEvent:
      properties:
        id:
          title: Id
          type: integer
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        user_id:
          title: User Id
          type: string
        event_type:
          title: Event Type
          type: string
        event_class:
          title: Event Class
          type: string
        question_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Question Id
        project_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Project Id
        issue_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Issue Id
        org_id:
          title: Org Id
          type: string
        object_id:
          title: Object Id
        changes:
          items:
            additionalProperties: true
            type: object
          title: Changes
          type: array
      required:
      - id
      - timestamp
      - user_id
      - event_type
      - event_class
      - question_id
      - project_id
      - issue_id
      - org_id
      - object_id
      - changes
      title: FullEvent
      type: object
    FullProject:
      properties:
        title:
          default: Untitled Project
          maxLength: 256
          minLength: 5
          title: Title
          type: string
        workflow_id:
          default: 1
          title: Workflow Id
          type: integer
        description:
          anyOf:
          - maxLength: 20000
            type: string
          - type: 'null'
          default:
          title: Description
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        multiscored:
          default: false
          description: Indicates whether Multiple Score Sets are enabled for 
            this project
          title: Multiscored
          type: boolean
        maximum_score:
          default: 10
          exclusiveMaximum: 2147483648
          exclusiveMinimum: 0
          title: Maximum Score
          type: integer
        from_email_address:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          description: Send notification emails pertaining to the current 
            project from this email address
          title: From Email Address
        project_fields:
          default: []
          items:
            $ref: '#/components/schemas/ProjectField'
          title: Project Fields
          type: array
        id:
          title: Id
          type: integer
        status:
          title: Status
          type: string
        author_id:
          title: Author Id
          type: string
        owner_organisation:
          anyOf:
          - $ref: '#/components/schemas/Organisation'
          - type: 'null'
          default:
        date_published:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Date Published
        date_created:
          format: date-time
          title: Date Created
          type: string
        permissions:
          default: []
          items:
            type: string
          title: Permissions
          type: array
        categories:
          items:
            $ref: '#/components/schemas/Category'
          title: Categories
          type: array
        section_id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Section Id
      required:
      - id
      - status
      - author_id
      - date_created
      - categories
      title: FullProject
      type: object
    FullUser:
      description: "Don't use for incoming data - permissions are derived from user's
        roles\nthus should not be set directly."
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
        organisation:
          $ref: '#/components/schemas/Organisation'
        roles:
          items:
            type: string
          title: Roles
          type: array
        permissions:
          description: List of this user's permissions, based on their roles
          items:
            type: string
          title: Permissions
          type: array
          uniqueItems: true
      required:
      - id
      - org_id
      - fullname
      - email
      - organisation
      - roles
      - permissions
      title: FullUser
      type: object
    HitTypes:
      enum:
      - questions
      - choices
      - answers
      - notes
      - scoreComments
      title: HitTypes
      type: string
    HttpHeader:
      properties:
        header:
          maxLength: 255
          pattern: ^[a-zA-Z0-9-]+$
          title: Header
          type: string
        value:
          maxLength: 2048
          title: Value
          type: string
      required:
      - header
      - value
      title: HttpHeader
      type: object
    Id:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      title: Id
      type: object
    ImportableAnswers:
      properties:
        title:
          title: Title
          type: string
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Issue Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Submitted Date
        question_count:
          title: Question Count
          type: integer
        issue_id:
          title: Issue Id
          type: integer
      required:
      - title
      - issue_date
      - submitted_date
      - question_count
      - issue_id
      title: ImportableAnswers
      type: object
    Issue:
      description: "Represents the directly editable fields of an Issue\n\nEither
        respondent or respondent_email must be set, but not both"
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        award_status:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Award Status
        internal_comments:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Internal Comments
        feedback:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Feedback
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
        id:
          title: Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        respondent:
          anyOf:
          - $ref: '#/components/schemas/Organisation'
          - type: 'null'
          default:
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
        status:
          title: Status
          type: string
        accepted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Accepted Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Submitted Date
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          description: Date the Issue was published
          title: Issue Date
      required:
      - id
      - project_id
      - status
      title: Issue
      type: object
    IssueAttachment:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        filename:
          title: Filename
          type: string
        mimetype:
          title: Mimetype
          type: string
        size:
          title: Size
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
        private:
          title: Private
          type: boolean
        description:
          maxLength: 1024
          minLength: 1
          title: Description
          type: string
        date_uploaded:
          format: date-time
          title: Date Uploaded
          type: string
        author_id:
          title: Author Id
          type: string
        org_id:
          title: Org Id
          type: string
        issue_id:
          title: Issue Id
          type: integer
      required:
      - filename
      - mimetype
      - size
      - size_bytes
      - private
      - description
      - date_uploaded
      - author_id
      - org_id
      - issue_id
      title: IssueAttachment
      type: object
    IssueScores:
      properties:
        total_score:
          description: Total calculated score for the issue
          title: Total Score
          type: number
        section_scores:
          additionalProperties:
            type: number
          description: Dictionary mapping section IDs to their calculated scores
          example:
            '1': 85.5
            '2': 92.0
            '3': 78.3
          title: Section Scores
          type: object
        question_scores:
          additionalProperties:
            type: number
          description: Dictionary mapping question IDs to their calculated 
            scores
          example:
            '1': 90.0
            '2': 85.0
            '3': 88.5
            '4': 76.0
          title: Question Scores
          type: object
      required:
      - total_score
      - section_scores
      - question_scores
      title: IssueScores
      type: object
    IssueStatus:
      properties:
        new_status:
          $ref: '#/components/schemas/IssueStatuses'
      required:
      - new_status
      title: IssueStatus
      type: object
    IssueStatuses:
      enum:
      - Not Sent
      - Opportunity
      - Accepted
      - Updateable
      - Declined
      - Submitted
      - Retracted
      title: IssueStatuses
      type: string
    Issues:
      items:
        $ref: '#/components/schemas/Issue'
      title: Issues
      type: array
    IssuesList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ListIssue'
          title: Data
          type: array
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
      - data
      - pagination
      title: IssuesList
      type: object
    Label:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: LB
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: Label
      type: object
    ListIssue:
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        respondent_id:
          anyOf:
          - maxLength: 50
            type: string
          - type: 'null'
          default:
          title: Respondent Id
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
        issue_id:
          title: Issue Id
          type: integer
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
        project_title:
          title: Project Title
          type: string
        project_id:
          title: Project Id
          type: integer
        status:
          title: Status
          type: string
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Issue Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Submitted Date
      required:
      - issue_id
      - project_title
      - project_id
      - status
      title: ListIssue
      type: object
    ListProject:
      properties:
        id:
          title: Id
          type: integer
        workflow_id:
          title: Workflow Id
          type: integer
        title:
          title: Title
          type: string
        owner_org_name:
          title: Owner Org Name
          type: string
        owner_org_id:
          title: Owner Org Id
          type: string
        status:
          title: Status
          type: string
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        date_created:
          format: date-time
          title: Date Created
          type: string
        watching_since:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Watching Since
        is_watched:
          default: false
          title: Is Watched
          type: boolean
      required:
      - id
      - workflow_id
      - title
      - owner_org_name
      - owner_org_id
      - status
      - date_created
      title: ListProject
      type: object
    MatchedElement:
      properties:
        title:
          title: Title
          type: string
        number:
          title: Number
          type: string
        el_type:
          title: El Type
          type: string
        label:
          title: Label
          type: string
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          title: Choices
          type: array
      required:
      - title
      - number
      - el_type
      - label
      - choices
      title: MatchedElement
      type: object
    MoveSection:
      properties:
        new_parent_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: New Parent Id
          type: integer
        section_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Section Id
          type: integer
      required:
      - new_parent_id
      - section_id
      title: MoveSection
      type: object
    NetworkRelationship:
      properties:
        relationship_type:
          $ref: '#/components/schemas/RelationshipType'
        from_org:
          $ref: '#/components/schemas/BaseOrganisation'
        to_org:
          $ref: '#/components/schemas/BaseOrganisation'
      required:
      - relationship_type
      - from_org
      - to_org
      title: NetworkRelationship
      type: object
    NewCategory:
      description: Represents a category which can be assigned to a Project for 
        classification and filtering
      properties:
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        description:
          maxLength: 250
          title: Description
          type: string
      required:
      - name
      - description
      title: NewCategory
      type: object
    NewClient:
      properties:
        org_name:
          maxLength: 50
          minLength: 4
          title: Org Name
          type: string
        domain_name:
          anyOf:
          - maxLength: 256
            type: string
          - type: 'null'
          default:
          title: Domain Name
        administrator_email:
          format: email
          title: Administrator Email
          type: string
        administrator_name:
          maxLength: 50
          minLength: 4
          title: Administrator Name
          type: string
      required:
      - org_name
      - administrator_email
      - administrator_name
      title: NewClient
      type: object
    NewIssue:
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        respondent_id:
          anyOf:
          - maxLength: 50
            type: string
          - type: 'null'
          default:
          title: Respondent Id
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
      title: NewIssue
      type: object
    NewProject:
      properties:
        title:
          maxLength: 256
          minLength: 5
          title: Title
          type: string
        workflow_id:
          default: 1
          title: Workflow Id
          type: integer
        description:
          anyOf:
          - maxLength: 20000
            type: string
          - type: 'null'
          default:
          title: Description
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        multiscored:
          default: false
          description: Indicates whether Multiple Score Sets are enabled for 
            this project
          title: Multiscored
          type: boolean
        maximum_score:
          default: 10
          exclusiveMaximum: 2147483648
          exclusiveMinimum: 0
          title: Maximum Score
          type: integer
        from_email_address:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          description: Send notification emails pertaining to the current 
            project from this email address
          title: From Email Address
        project_fields:
          default: []
          items:
            $ref: '#/components/schemas/ProjectField'
          title: Project Fields
          type: array
        questionnaire_title:
          default: Questionnaire
          maxLength: 64
          minLength: 5
          title: Questionnaire Title
          type: string
        category_ids:
          default: []
          items:
            type: integer
          title: Category Ids
          type: array
      required:
      - title
      title: NewProject
      type: object
    NewProjectIds:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        section_id:
          description: The ID of the Root section for the newly created project
          title: Section Id
          type: integer
      required:
      - section_id
      title: NewProjectIds
      type: object
    NewTag:
      description: A Tag is a keyword used to categorize questions
      properties:
        name:
          maxLength: 128
          minLength: 2
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 256
            type: string
          - type: 'null'
          default:
          title: Description
        colour:
          anyOf:
          - maxLength: 7
            pattern: ^#[0-9A-Fa-f]{6}$
            type: string
          - type: 'null'
          default:
          description: Hex color code (#RRGGBB)
          examples:
          - '#1E90FF'
          title: Colour
      required:
      - name
      title: NewTag
      type: object
    NewWebhook:
      properties:
        org_id:
          maxLength: 50
          title: Org Id
          type: string
        event_type:
          maxLength: 50
          title: Event Type
          type: string
        url:
          format: uri
          minLength: 1
          title: Url
          type: string
        guard_policy:
          anyOf:
          - maxLength: 4096
            type: string
          - type: 'null'
          default:
          title: Guard Policy
        transform_expression:
          anyOf:
          - maxLength: 4096
            type: string
          - type: 'null'
          default:
          title: Transform Expression
        http_headers:
          anyOf:
          - items:
              $ref: '#/components/schemas/HttpHeader'
            maxItems: 5
            type: array
          - type: 'null'
          description: Optional list of HTTP headers to include in the webhook 
            POST request
          title: Http Headers
      required:
      - org_id
      - event_type
      - url
      title: NewWebhook
      type: object
    NewWeightSet:
      description: "Create a new weighting set. This can be populated with either
        an initial value\nfor each section and question (initial_value field) or by
        copying an existing weightset.\n\nOnly one of initial_value and source_weightset_id
        can be set"
      properties:
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        initial_value:
          anyOf:
          - maximum: 100
            minimum: 0
            type: integer
          - type: 'null'
          default:
          description: Initial weighting value for each question and section
          title: Initial Value
        source_weightset_id:
          anyOf:
          - exclusiveMaximum: 2147483648
            minimum: 0
            type: integer
          - type: 'null'
          default:
          description: Copy weightings from an existing Weighting Set with this 
            ID
          title: Source Weightset Id
      required:
      - name
      title: NewWeightSet
      type: object
    Node:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
      required:
      - number
      - title
      title: Node
      type: object
    NodeTypeEnum:
      enum:
      - section
      - question
      title: NodeTypeEnum
      type: string
    Nodes:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
        type:
          title: Type
          type: string
        subsections:
          anyOf:
          - items:
              $ref: '#/components/schemas/Nodes'
            type: array
          - type: 'null'
          default:
          title: Subsections
        questions:
          anyOf:
          - items:
              $ref: '#/components/schemas/Nodes'
            type: array
          - type: 'null'
          default:
          title: Questions
      required:
      - number
      - title
      - type
      title: Nodes
      type: object
    OrgType:
      enum:
      - RESPONDENT
      - BUYER
      - CONSULTANT
      title: OrgType
      type: string
    OrgWithUsers:
      properties:
        id:
          maxLength: 50
          minLength: 3
          title: Id
          type: string
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        type:
          anyOf:
          - $ref: '#/components/schemas/OrgType'
          - type: 'null'
          default:
        public:
          default: false
          title: Public
          type: boolean
        domain_name:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Domain Name
        users:
          items:
            $ref: '#/components/schemas/BaseUser'
          title: Users
          type: array
      required:
      - id
      - name
      - users
      title: OrgWithUsers
      type: object
    Organisation:
      properties:
        id:
          maxLength: 50
          minLength: 3
          title: Id
          type: string
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        type:
          anyOf:
          - $ref: '#/components/schemas/OrgType'
          - type: 'null'
          default:
        public:
          default: false
          title: Public
          type: boolean
        domain_name:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Domain Name
        password_expiry:
          default: 0
          title: Password Expiry
          type: integer
      required:
      - id
      - name
      title: Organisation
      type: object
    Pagination:
      description: Schema for pagination information.
      properties:
        current_page:
          title: Current Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total_count:
          title: Total Count
          type: integer
        total_pages:
          title: Total Pages
          type: integer
        has_next:
          title: Has Next
          type: boolean
        current_page_count:
          default: 0
          description: Number of records in the current page
          title: Current Page Count
          type: integer
      required:
      - current_page
      - page_size
      - total_count
      - total_pages
      - has_next
      title: Pagination
      type: object
    ParentedWeighting:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/QWeight'
          title: Questions
          type: array
        sections:
          items:
            $ref: '#/components/schemas/SecWeight'
          title: Sections
          type: array
        parent_absolute_weight:
          title: Parent Absolute Weight
          type: number
      required:
      - questions
      - sections
      - parent_absolute_weight
      title: ParentedWeighting
      type: object
    Participant:
      properties:
        organisation:
          $ref: '#/components/schemas/Organisation'
        role:
          maxLength: 255
          title: Role
          type: string
      required:
      - organisation
      - role
      title: Participant
      type: object
    ParticipantList:
      items:
        $ref: '#/components/schemas/Participant'
      title: ParticipantList
      type: array
    ProjectApproval:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        project_id:
          title: Project Id
          type: integer
        user_id:
          title: User Id
          type: string
        project_status:
          title: Project Status
          type: string
        date_approved:
          format: date-time
          title: Date Approved
          type: string
      required:
      - project_id
      - user_id
      - project_status
      - date_approved
      title: ProjectApproval
      type: object
    ProjectField:
      description: "ProjectFields allow the user to associate custom data fields with
        their project.\n\nBy default such fields are invisible to respondent users
        - behaviour dictated by the 'private'\nproperty. ProjectFields are ordered
        when displayed according to the 'position' property."
      properties:
        key:
          maxLength: 64
          minLength: 1
          title: Key
          type: string
        value:
          maxLength: 8192
          title: Value
          type: string
        private:
          default: true
          description: Indicates whether this field is visible to Respondents
          title: Private
          type: boolean
      required:
      - key
      - value
      title: ProjectField
      type: object
    ProjectList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ListProject'
          title: Data
          type: array
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
      - data
      - pagination
      title: ProjectList
      type: object
    ProjectNode:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
        type:
          $ref: '#/components/schemas/NodeTypeEnum'
        parent_id:
          anyOf:
          - type: integer
          - type: 'null'
          description: ID of this node's parent section
          title: Parent Id
        position:
          description: Position of the node within the parent
          title: Position
          type: integer
        depth:
          description: The nested depth of this node within the questionnaire
          title: Depth
          type: integer
        description:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Description
      required:
      - number
      - title
      - type
      - parent_id
      - position
      - depth
      title: ProjectNode
      type: object
    ProjectNote:
      properties:
        target_org_id:
          anyOf:
          - type: string
          - type: 'null'
          default:
          description: ID of the Organisation to who this Note is addressed
          title: Target Org Id
        note_text:
          maxLength: 16384
          minLength: 1
          title: Note Text
          type: string
        internal:
          default: false
          description: If true, visible only to buyer (participant) 
            organisations
          title: Internal
          type: boolean
      required:
      - note_text
      title: ProjectNote
      type: object
    ProjectPermission:
      properties:
        user:
          title: User
          type: string
        permissions:
          items:
            type: integer
          title: Permissions
          type: array
      required:
      - user
      - permissions
      title: ProjectPermission
      type: object
    ProjectUser:
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
        organisation:
          $ref: '#/components/schemas/Organisation'
        roles:
          items:
            type: string
          title: Roles
          type: array
        effectivePermissions:
          items:
            type: string
          title: Effectivepermissions
          type: array
        userPermissions:
          items:
            type: string
          title: Userpermissions
          type: array
        participantPermissions:
          items:
            type: string
          title: Participantpermissions
          type: array
        participantRole:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Participantrole
      required:
      - id
      - org_id
      - fullname
      - email
      - organisation
      - roles
      title: ProjectUser
      type: object
    ProjectWeightings:
      properties:
        weightset:
          $ref: '#/components/schemas/WeightSet'
        total:
          $ref: '#/components/schemas/Weightings'
        instance:
          $ref: '#/components/schemas/Weightings'
      required:
      - weightset
      - total
      - instance
      title: ProjectWeightings
      type: object
    PublishProject:
      properties:
        release_issue_ids:
          items:
            exclusiveMaximum: 2147483648
            exclusiveMinimum: 0
            type: integer
          maxItems: 50
          minItems: 0
          title: Release Issue Ids
          type: array
      required:
      - release_issue_ids
      title: PublishProject
      type: object
    PublishResult:
      properties:
        issue_id:
          title: Issue Id
          type: integer
        respondent_id:
          title: Respondent Id
          type: string
      required:
      - issue_id
      - respondent_id
      title: PublishResult
      type: object
    QElement:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          enum:
          - TX
          - LB
          - CR
          - CC
          - CB
          - QA
          - AT
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: QElement
      type: object
    QElementStats:
      properties:
        TX:
          description: Count of Text Input elements
          title: Tx
          type: integer
        CR:
          description: Count of Radio Choices elements
          title: Cr
          type: integer
        CC:
          description: Count of Combon/Select elements
          title: Cc
          type: integer
        CB:
          description: Count of Checkbox elements
          title: Cb
          type: integer
        LB:
          description: Count of Label elements
          title: Lb
          type: integer
        QA:
          description: Count of Question Attachment elements
          title: Qa
          type: integer
        AT:
          description: Count of Upload Field Attachment elements
          title: At
          type: integer
        MD:
          description: Count of Media elements
          title: Md
          type: integer
        answerable_elements:
          description: Total number of answerable elements
          title: Answerable Elements
          type: integer
      required:
      - TX
      - CR
      - CC
      - CB
      - LB
      - QA
      - AT
      - MD
      - answerable_elements
      title: QElementStats
      type: object
    QI:
      properties:
        id:
          title: Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        number:
          title: Number
          type: string
      required:
      - id
      - project_id
      - number
      title: QI
      type: object
    QWeight:
      properties:
        question_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Question Id
          type: integer
        weight:
          minimum: 0.0
          title: Weight
          type: number
      required:
      - question_id
      - weight
      title: QWeight
      type: object
    Question:
      properties:
        title:
          maxLength: 1024
          minLength: 2
          title: Title
          type: string
        elements:
          $ref: '#/components/schemas/ElGrid'
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        number:
          title: Number
          type: string
        section_id:
          anyOf:
          - exclusiveMaximum: 4294967295
            type: integer
          - type: 'null'
          default:
          title: Section Id
      required:
      - title
      - elements
      - number
      title: Question
      type: object
    QuestionAttachment:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: QA
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: QuestionAttachment
      type: object
    QuestionDef:
      properties:
        title:
          maxLength: 1024
          minLength: 2
          title: Title
          type: string
        elements:
          $ref: '#/components/schemas/ElGrid'
      required:
      - title
      - elements
      title: QuestionDef
      type: object
    QuestionInstance:
      properties:
        id:
          title: Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        number:
          title: Number
          type: string
        section_id:
          title: Section Id
          type: integer
        project_title:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Project Title
      required:
      - id
      - project_id
      - number
      - section_id
      title: QuestionInstance
      type: object
    QuestionScore:
      properties:
        question_id:
          title: Question Id
          type: integer
        issue_id:
          title: Issue Id
          type: integer
        scoreset_id:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Scoreset Id
        score:
          anyOf:
          - type: number
          - type: 'null'
          default:
          title: Score
      required:
      - question_id
      - issue_id
      title: QuestionScore
      type: object
    QuestionnaireStats:
      properties:
        questions:
          description: Count of Questions in the Project
          title: Questions
          type: integer
        sections:
          description: Count of Sections in the Project
          title: Sections
          type: integer
        elements:
          $ref: '#/components/schemas/QElementStats'
          description: Statistics for Question Elements
      required:
      - questions
      - sections
      - elements
      title: QuestionnaireStats
      type: object
    RadioChoices:
      additionalProperties: false
      properties:
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          maxItems: 20
          minItems: 2
          title: Choices
          type: array
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CR
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - choices
      - el_type
      title: RadioChoices
      type: object
    ReadNote:
      properties:
        target_org_id:
          anyOf:
          - type: string
          - type: 'null'
          default:
          description: ID of the Organisation to who this Note is addressed
          title: Target Org Id
        note_text:
          maxLength: 16384
          minLength: 1
          title: Note Text
          type: string
        internal:
          default: false
          description: If true, visible only to buyer (participant) 
            organisations
          title: Internal
          type: boolean
        note_id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Note Id
        note_time:
          format: date-time
          title: Note Time
          type: string
        organisation_id:
          maxLength: 50
          title: Organisation Id
          type: string
        distribution:
          $ref: '#/components/schemas/Distribution'
      required:
      - note_text
      - note_time
      - organisation_id
      - distribution
      title: ReadNote
      type: object
    ReadNotes:
      items:
        $ref: '#/components/schemas/ReadNote'
      title: ReadNotes
      type: array
    Relationship:
      properties:
        reltype_id:
          exclusiveMaximum: 2147483648
          exclusiveMinimum: 0
          title: Reltype Id
          type: integer
        from_org_id:
          maxLength: 50
          minLength: 2
          title: From Org Id
          type: string
        to_org_id:
          maxLength: 50
          minLength: 2
          title: To Org Id
          type: string
      required:
      - reltype_id
      - from_org_id
      - to_org_id
      title: Relationship
      type: object
    RelationshipType:
      properties:
        id:
          anyOf:
          - exclusiveMaximum: 2147483648
            exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
        name:
          maxLength: 128
          minLength: 2
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 256
            type: string
          - type: 'null'
          default:
          title: Description
      required:
      - name
      title: RelationshipType
      type: object
    ReplacedItem:
      properties:
        change_type:
          title: Change Type
          type: string
        question_number:
          title: Question Number
          type: string
        old:
          title: Old
          type: string
        new:
          title: New
          type: string
      required:
      - change_type
      - question_number
      - old
      - new
      title: ReplacedItem
      type: object
    RespondentAnswer:
      properties:
        answer_id:
          title: Answer Id
          type: integer
        answer:
          title: Answer
          type: string
        respondent_id:
          title: Respondent Id
          type: string
        issue_id:
          title: Issue Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        project_title:
          title: Project Title
          type: string
        date_published:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Date Published
      required:
      - answer_id
      - answer
      - respondent_id
      - issue_id
      - project_id
      - project_title
      - date_published
      title: RespondentAnswer
      type: object
    RespondentAnswers:
      items:
        $ref: '#/components/schemas/RespondentAnswer'
      title: RespondentAnswers
      type: array
    Score:
      properties:
        issue_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Issue Id
          type: integer
        score_value:
          anyOf:
          - type: number
          - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            type: string
          - type: 'null'
          default:
          title: Score Value
        scoreset_id:
          default: ''
          title: Scoreset Id
          type: string
        comment:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Comment
      required:
      - issue_id
      title: Score
      type: object
    ScoreSet:
      properties:
        scoreset_id:
          title: Scoreset Id
          type: string
        fullname:
          title: Fullname
          type: string
      required:
      - scoreset_id
      - fullname
      title: ScoreSet
      type: object
    ScoreSummary:
      properties:
        subsections:
          items:
            $ref: '#/components/schemas/postrfp__shared__serial__scoremodels__SectionScore'
          title: Subsections
          type: array
        questions:
          items:
            $ref: '#/components/schemas/QuestionScore'
          title: Questions
          type: array
      required:
      - subsections
      - questions
      title: ScoreSummary
      type: object
    ScoringData:
      properties:
        scoreset_id:
          title: Scoreset Id
          type: string
        scores:
          items:
            additionalProperties: true
            type: object
          title: Scores
          type: array
      required:
      - scoreset_id
      - scores
      title: ScoringData
      type: object
    ScoringModel:
      description: Enum for score types
      enum:
      - Unweighted
      - Direct
      - Absolute
      title: ScoringModel
      type: string
    SearchResult:
      properties:
        klass:
          $ref: '#/components/schemas/HitTypes'
        project_title:
          title: Project Title
          type: string
        project_id:
          title: Project Id
          type: integer
        object_id:
          anyOf:
          - type: string
          - type: integer
          title: Object Id
        object_ref:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Object Ref
        snippet:
          title: Snippet
          type: string
      required:
      - klass
      - project_title
      - project_id
      - object_id
      - snippet
      title: SearchResult
      type: object
    SecWeight:
      properties:
        section_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Section Id
          type: integer
        weight:
          minimum: 0.0
          title: Weight
          type: number
      required:
      - section_id
      - weight
      title: SecWeight
      type: object
    Section:
      properties:
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
        description:
          anyOf:
          - maxLength: 1024
            type: string
          - type: 'null'
          default:
          title: Description
        id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
        parent_id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          title: Parent Id
        number:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Number
      required:
      - title
      - parent_id
      title: Section
      type: object
    SectionChildNodes:
      properties:
        question_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 100
          title: Question Ids
          type: array
        section_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 100
          title: Section Ids
          type: array
        delete_orphans:
          default: false
          title: Delete Orphans
          type: boolean
      title: SectionChildNodes
      type: object
    SectionImportDoc:
      properties:
        project_id:
          title: Project Id
          type: integer
        section_ids:
          default: []
          items:
            type: integer
          title: Section Ids
          type: array
        question_ids:
          default: []
          items:
            type: integer
          title: Question Ids
          type: array
        clone:
          default: true
          title: Clone
          type: boolean
      required:
      - project_id
      title: SectionImportDoc
      type: object
    SectionImportResult:
      properties:
        section_count:
          default: 0
          title: Section Count
          type: integer
        question_count:
          default: 0
          title: Question Count
          type: integer
      title: SectionImportResult
      type: object
    SectionScoreDoc:
      properties:
        question_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Question Id
          type: integer
        scores:
          items:
            $ref: '#/components/schemas/postrfp__shared__serial__models__SectionScore'
          title: Scores
          type: array
      required:
      - question_id
      - scores
      title: SectionScoreDoc
      type: object
    SectionScoreDocs:
      items:
        $ref: '#/components/schemas/SectionScoreDoc'
      maxItems: 100
      minItems: 1
      title: SectionScoreDocs
      type: array
    SelectDropdown:
      additionalProperties: false
      properties:
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          maxItems: 20
          minItems: 2
          title: Choices
          type: array
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CC
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - choices
      - el_type
      title: SelectDropdown
      type: object
    ShortName:
      properties:
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
      required:
      - name
      title: ShortName
      type: object
    SingleRespondentQuestion:
      properties:
        title:
          maxLength: 1024
          minLength: 2
          title: Title
          type: string
        elements:
          $ref: '#/components/schemas/ElGrid'
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        number:
          title: Number
          type: string
        section_id:
          anyOf:
          - exclusiveMaximum: 4294967295
            type: integer
          - type: 'null'
          default:
          title: Section Id
        respondent:
          $ref: '#/components/schemas/Organisation'
      required:
      - title
      - elements
      - number
      - respondent
      title: SingleRespondentQuestion
      type: object
    StatusSchema:
      description: Schema for state data compatible with  editor.
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        name:
          description: Human-readable name of the state
          maxLength: 64
          title: Name
          type: string
        code:
          description: System identifier for the state
          maxLength: 64
          title: Code
          type: string
        colour:
          anyOf:
          - maxLength: 7
            pattern: ^#[0-9A-Fa-f]{6}$
            type: string
          - type: 'null'
          default:
          description: Hex color code (#RRGGBB)
          examples:
          - '#1E90FF'
          title: Colour
        status_actions:
          default: []
          items:
            type: string
          title: Status Actions
          type: array
        description:
          anyOf:
          - maxLength: 512
            type: string
          - type: 'null'
          default:
          title: Description
      required:
      - name
      - code
      title: StatusSchema
      type: object
    StringId:
      properties:
        id:
          title: Id
          type: string
      required:
      - id
      title: StringId
      type: object
    SummaryEvent:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        user_id:
          title: User Id
          type: string
        event_type:
          title: Event Type
          type: string
      required:
      - timestamp
      - user_id
      - event_type
      title: SummaryEvent
      type: object
    SummarySection:
      properties:
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
        description:
          anyOf:
          - maxLength: 1024
            type: string
          - type: 'null'
          default:
          title: Description
        id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
        parent_id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          title: Parent Id
        number:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Number
        questions:
          items:
            $ref: '#/components/schemas/Node'
          title: Questions
          type: array
        subsections:
          items:
            $ref: '#/components/schemas/Node'
          title: Subsections
          type: array
      required:
      - title
      - parent_id
      title: SummarySection
      type: object
    Supplier:
      properties:
        issues:
          items:
            $ref: '#/components/schemas/Issue'
          title: Issues
          type: array
        organisation:
          $ref: '#/components/schemas/Organisation'
        users:
          items:
            $ref: '#/components/schemas/User'
          title: Users
          type: array
      required:
      - issues
      - organisation
      - users
      title: Supplier
      type: object
    Tag:
      properties:
        name:
          maxLength: 128
          minLength: 2
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 256
            type: string
          - type: 'null'
          default:
          title: Description
        colour:
          anyOf:
          - maxLength: 7
            pattern: ^#[0-9A-Fa-f]{6}$
            type: string
          - type: 'null'
          default:
          description: Hex color code (#RRGGBB)
          examples:
          - '#1E90FF'
          title: Colour
        id:
          anyOf:
          - exclusiveMaximum: 2147483648
            exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
      required:
      - name
      title: Tag
      type: object
    TagAssigns:
      properties:
        question_instance_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 1000
          title: Question Instance Ids
          type: array
        section_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 1000
          title: Section Ids
          type: array
        recursive:
          default: false
          title: Recursive
          type: boolean
      required:
      - question_instance_ids
      - section_ids
      title: TagAssigns
      type: object
    TagGroup:
      properties:
        question_instance_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 1000
          title: Question Instance Ids
          type: array
        section_ids:
          items:
            exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          maxItems: 1000
          title: Section Ids
          type: array
        recursive:
          default: false
          title: Recursive
          type: boolean
        tag_id:
          exclusiveMaximum: 2147483648
          exclusiveMinimum: 0
          title: Tag Id
          type: integer
      required:
      - question_instance_ids
      - section_ids
      - tag_id
      title: TagGroup
      type: object
    TargetUser:
      properties:
        targetUser:
          anyOf:
          - minLength: 3
            type: string
          - type: 'null'
          default:
          title: Targetuser
      title: TargetUser
      type: object
    TextInput:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: TX
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        height:
          default: 1
          exclusiveMaximum: 40
          exclusiveMinimum: 0
          title: Height
          type: integer
        width:
          default: 1
          exclusiveMaximum: 500
          exclusiveMinimum: 0
          title: Width
          type: integer
        regexp:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Regexp
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - el_type
      title: TextInput
      type: object
    TextReplace:
      properties:
        search_term:
          title: Search Term
          type: string
        replace_term:
          title: Replace Term
          type: string
        dry_run:
          default: true
          title: Dry Run
          type: boolean
      required:
      - search_term
      - replace_term
      title: TextReplace
      type: object
    TransitionSchema:
      description: Schema for transition data compatible with  editor.
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        name:
          maxLength: 64
          title: Name
          type: string
        source_status:
          $ref: '#/components/schemas/StatusSchema'
        target_status:
          $ref: '#/components/schemas/StatusSchema'
        guard_policy:
          anyOf:
          - type: string
          - type: 'null'
          default:
          description: CEL expression for guard condition
          title: Guard Policy
      required:
      - name
      - source_status
      - target_status
      title: TransitionSchema
      type: object
    TreeNode:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        parent_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Parent Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
      required:
      - parent_id
      - number
      - title
      title: TreeNode
      type: object
    UpdateParticipant:
      properties:
        org_id:
          maxLength: 50
          title: Org Id
          type: string
        role:
          maxLength: 255
          title: Role
          type: string
      required:
      - org_id
      - role
      title: UpdateParticipant
      type: object
    UpdateParticipantList:
      items:
        $ref: '#/components/schemas/UpdateParticipant'
      maxItems: 20
      title: UpdateParticipantList
      type: array
    UpdateableIssue:
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        award_status:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Award Status
        internal_comments:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Internal Comments
        feedback:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Feedback
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
      title: UpdateableIssue
      type: object
    UpdateableProject:
      properties:
        title:
          default: Untitled Project
          maxLength: 256
          minLength: 5
          title: Title
          type: string
        workflow_id:
          default: 1
          title: Workflow Id
          type: integer
        description:
          anyOf:
          - maxLength: 20000
            type: string
          - type: 'null'
          default:
          title: Description
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        multiscored:
          default: false
          description: Indicates whether Multiple Score Sets are enabled for 
            this project
          title: Multiscored
          type: boolean
        maximum_score:
          default: 10
          exclusiveMaximum: 2147483648
          exclusiveMinimum: 0
          title: Maximum Score
          type: integer
        from_email_address:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          description: Send notification emails pertaining to the current 
            project from this email address
          title: From Email Address
        project_fields:
          default: []
          items:
            $ref: '#/components/schemas/ProjectField'
          title: Project Fields
          type: array
      title: UpdateableProject
      type: object
    UploadField:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: AT
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - el_type
      title: UploadField
      type: object
    User:
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
        organisation:
          $ref: '#/components/schemas/Organisation'
        roles:
          items:
            type: string
          title: Roles
          type: array
      required:
      - id
      - org_id
      - fullname
      - email
      - organisation
      - roles
      title: User
      type: object
    UserId:
      properties:
        id:
          maxLength: 50
          title: Id
          type: string
      required:
      - id
      title: UserId
      type: object
    UserList:
      items:
        $ref: '#/components/schemas/BaseUser'
      title: UserList
      type: array
    UserType:
      enum:
      - standard
      - restricted
      title: UserType
      type: string
    Watcher:
      properties:
        user_id:
          title: User Id
          type: string
        fullname:
          title: Fullname
          type: string
        email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Email
        watching_since:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Watching Since
        is_watching:
          default: false
          title: Is Watching
          type: boolean
      required:
      - user_id
      - fullname
      title: Watcher
      type: object
    Webhook:
      properties:
        org_id:
          maxLength: 50
          title: Org Id
          type: string
        event_type:
          maxLength: 50
          title: Event Type
          type: string
        url:
          format: uri
          minLength: 1
          title: Url
          type: string
        guard_policy:
          anyOf:
          - maxLength: 4096
            type: string
          - type: 'null'
          default:
          title: Guard Policy
        transform_expression:
          anyOf:
          - maxLength: 4096
            type: string
          - type: 'null'
          default:
          title: Transform Expression
        http_headers:
          anyOf:
          - items:
              $ref: '#/components/schemas/HttpHeader'
            maxItems: 5
            type: array
          - type: 'null'
          description: Optional list of HTTP headers to include in the webhook 
            POST request
          title: Http Headers
        delivery_status:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Delivery Status
        last_delivery:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Last Delivery
        error_message:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Error Message
        retries:
          default: 0
          title: Retries
          type: integer
      required:
      - org_id
      - event_type
      - url
      title: Webhook
      type: object
    WeightSet:
      properties:
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      required:
      - name
      title: WeightSet
      type: object
    Weightings:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/QWeight'
          title: Questions
          type: array
        sections:
          items:
            $ref: '#/components/schemas/SecWeight'
          title: Sections
          type: array
      required:
      - questions
      - sections
      title: Weightings
      type: object
    WeightingsDoc:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/QWeight'
          title: Questions
          type: array
        sections:
          items:
            $ref: '#/components/schemas/SecWeight'
          title: Sections
          type: array
        weightset_id:
          anyOf:
          - exclusiveMaximum: 4294967295
            exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Weightset Id
      required:
      - questions
      - sections
      title: WeightingsDoc
      type: object
    postrfp__shared__serial__models__SectionScore:
      properties:
        issue_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Issue Id
          type: integer
        score_value:
          anyOf:
          - type: number
          - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            type: string
          title: Score Value
      required:
      - issue_id
      - score_value
      title: SectionScore
      type: object
    postrfp__shared__serial__scoremodels__SectionScore:
      properties:
        section_id:
          title: Section Id
          type: integer
        issue_id:
          title: Issue Id
          type: integer
        question_count:
          title: Question Count
          type: integer
        questions_scored:
          title: Questions Scored
          type: integer
        score:
          anyOf:
          - type: number
          - type: 'null'
          default:
          title: Score
      required:
      - section_id
      - issue_id
      - question_count
      - questions_scored
      title: SectionScore
      type: object
    _get_organisationsOrgtype:
      title: _get_organisationsOrgtype
      enum:
      - clients
      - vendors
      type: string
    _get_issuesIssuesort:
      title: _get_issuesIssuesort
      enum:
      - deadline
      - submitted_date
      - issue_date
      type: string
    _get_issuesSort:
      title: _get_issuesSort
      enum:
      - asc
      - desc
      type: string
    _get_issuesProjectstatus:
      title: _get_issuesProjectstatus
      enum:
      - Not Sent
      - Opportunity
      - Accepted
      - Updateable
      - Declined
      - Submitted
      - Retracted
      type: string
    _get_projectsProjectsort:
      title: _get_projectsProjectsort
      enum:
      - date_created
      - date_published
      - deadline
      - title
      type: string
    _get_projectsSort:
      title: _get_projectsSort
      enum:
      - asc
      - desc
      type: string
    _get_section_scoresScoringmodel:
      title: _get_section_scoresScoringmodel
      enum:
      - Unweighted
      - Direct
      - Absolute
      type: string
