> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ctrl-hub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Evaluate group compliance for a CRS

> Evaluate compliance for a collection of users against a competency requirement specification. Returns the overall `satisfied` outcome and a hierarchical compliance report.



## OpenAPI

````yaml /api-reference/openapi.yaml post /v3/competency-requirement-specifications/{competency_requirement_specification_id}/compliance
openapi: 3.1.0
info:
  contact:
    email: support@ctrl-hub.com
    name: Ctrl Hub
    url: https://www.ctrl-hub.com
  description: >
    Ctrl Hub is the all-in-one platform for high-risk industries like utilities,
    construction, infrastructure, and renewables. We help teams manage
    everything from risk assessments and HAVS exposure to vehicle and equipment
    checks, with a guaranteed minimum of 200% ROI.
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  summary: An API for managing your compliance and risk posture
  termsOfService: https://www.ctrl-hub.com/terms-conditions
  title: Ctrl Hub
  version: 1.0.0
servers:
  - description: Production
    url: https://api.ctrl-hub.com
  - description: Staging
    url: https://api.ctrl-hub.dev
  - description: Development
    url: https://api.ctrl-hub.run
security: []
tags:
  - description: |
      Audit events are the events that are logged by the system.
    name: Audit Events
  - description: |
      View the platform's health and availability.
    name: Status
  - description: >
      User-owned dashboards composed of cards on a fixed-slot bento layout.
      Cards come from a per-domain registry; the API stores their config as
      opaque JSON.
    name: Dashboards
  - description: |
      Manage appointments for work to be carried out with your customers
    name: Customer Appointments
  - description: |
      Manage interactions you have with your customers
    name: Customer Interactions
  - description: |
      Manage accounts for your customers
    name: Customer Accounts and Contacts
  - description: |
      Qualifications are the skills and knowledge that an organisation requires.
    name: Qualifications
  - description: |
      Workflows allow you to automate your processes.
    name: Workflows
  - description: |
      Manage documents
    name: Documents
  - description: |
      Manage documents
    name: Folders
  - description: |
      Manage documents
    name: Document Reviews
  - description: |
      Manage feature configurations for an organisation.
    name: Feature Configurations
  - description: |
      Equipment are the physical assets that an organisation manages.
    name: Equipment
  - description: |
      Manage your forms and their schemas
    name: Forms, Schemas and Categories
  - description: |
      Create and view form submissions
    name: Submissions
  - description: |
      View the roles available in the system.
    name: IAM Roles
  - description: >
      IAM role groups can be assigned to principals to manage authorisation
      centrally.
    name: IAM Role Groups
  - description: |
      Manage service accounts which can access the API programmatically.
    name: Service Accounts
  - description: |
      Manage bridges between organisations.
    name: Bridges
  - description: |
      Manage settings for an organisation.
    name: Settings
  - description: |
      Manage teams within an organisation.
    name: Teams
  - description: |
      Manage job roles within an organisation.
    name: Job Roles
  - description: |
      Manage users and accounts.
    name: Users
  - description: |
      Invite and manage invitations to organisations.
    name: Invitations
  - description: >
      IAM grants are the asignment of roles or permissions to principals to
      manage resource access.
    name: IAM Grants
  - description: |
      View the permissions available in the system.
    name: IAM Permissions
  - description: |
      SSO providers are the identity providers for an organisation.
    name: SSO Providers
  - description: |
      Whoami returns information about the currently authenticated principal.
    name: Whoami
  - description: |
      Manage your images
    name: Images
  - description: >
      Organisations are the center point for most resources in the platform.
      Most other endpoints are subresources of an organisation.
    name: Organisations
  - description: |
      Permits managements, integrated with street manager.
    name: Permits
  - description: |
      Projects manage your work and governance.
    name: Projects
  - description: >
      Import templates allow users to save and reuse their CSV importer
      configuration as named templates.
    name: Import Templates
  - description: |
      Properties are the physical locations.
    name: Properties
  - description: |
      Search across schemes, work orders, and operations.
    name: Search
  - description: |
      Provides the API specification in JSON and YAML formats
    name: Specifications
  - description: |
      Streets are the physical roads.
    name: Streets
  - description: |
      Integration with street manager
    name: Street Manager
  - description: |
      Vehicles are the physical vehicles that an organisation manages.
    name: Vehicles
  - description: >
      Scheme contracts (also known as regions) group schemes allocated from the
      network to a contractor.
    name: Scheme Contracts
  - description: >
      Scheme shares allow you to share your schemes with other organisations
      across bridges.
    name: Scheme Shares
  - description: |
      Schemes are large programmes of work
    name: Schemes
  - description: |
      Work orders the component parts of a scheme.
    name: Work Orders
  - description: |
      Operations are the work to be carried out within work orders.
    name: Operations
externalDocs:
  description: More documentation and resources
  url: https://docs.ctrl-hub.com
paths:
  /v3/competency-requirement-specifications/{competency_requirement_specification_id}/compliance:
    post:
      tags:
        - Qualifications
      description: >-
        Evaluate compliance for a collection of users against a competency
        requirement specification. Returns the overall `satisfied` outcome and a
        hierarchical compliance report.
      operationId: PostCompetencyRequirementSpecificationCompliance
      parameters:
        - $ref: '#/components/parameters/competency_requirement_specification_id'
        - $ref: '#/components/parameters/competency_compliance_results_include'
      requestBody:
        $ref: '#/components/requestBodies/EvaluateGroupCompliance'
      responses:
        '200':
          $ref: >-
            #/components/responses/PostCompetencyRequirementSpecificationCompliance
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorised'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - Session: []
        - OAuth2: []
        - Cookie: []
components:
  parameters:
    competency_requirement_specification_id:
      name: competency_requirement_specification_id
      in: path
      required: true
      description: The unique identifier for the competency requirement specification.
      schema:
        type: string
        format: uuid
      example: d4e5f6a7-b8c9-0123-defa-234567890123
    competency_compliance_results_include:
      name: include
      in: query
      description: A comma separated list of related resources to include.
      required: false
      style: form
      explode: false
      schema:
        type: array
        items:
          type: string
          enum:
            - qualifications
            - qualification_units
            - skills_registers
            - skills_register_schemes
            - skills_register_scheme_categories
            - training_standards
            - training_items
            - inductions
            - assessment_definitions
            - qualification_awards
            - training_completions
            - induction_completions
            - registrations
            - scheme_registrations
            - category_registrations
            - assessment_records
  requestBodies:
    EvaluateGroupCompliance:
      required: true
      description: The collection of users to evaluate compliance for.
      content:
        application/vnd.api+json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                title: An array of users
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - id
                    - type
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: The unique identifier of the user
                    type:
                      type: string
                      const: users
  responses:
    PostCompetencyRequirementSpecificationCompliance:
      description: >-
        Per-user compliance results for a CRS — one entry per user supplied in
        the request.
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            allOf:
              - type: object
                required:
                  - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CompetencyComplianceResult'
                  included:
                    $ref: '#/components/schemas/CompetencyComplianceResultIncludes'
              - $ref: '#/components/schemas/JSONAPI'
    BadRequest:
      description: >
        There was an error with the request - this could be due to an invalid
        body, query parameters,

        or headers that were sent to the API.
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 98ca4a78-b66f-4234-9719-aaf832ee6669
            status: '400'
            title: A validation error was encountered
            source:
              parameter: include
            meta:
              resource: wrong_value
    Unauthorised:
      description: Authentication failed
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 05fc9c8d-73b9-4697-9337-57f7a567a48f
            status: '401'
            title: You are not authorised to access this resource
            detail: In order to access this resource, you need the 'admin' role.
            code: AUTH.001
    NotFound:
      description: The requested resource could not be found
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 7b4c8f12-3e9a-4d5b-8c6f-1a2b3c4d5e6f
            status: '404'
            title: Resource not found
            detail: The requested resource could not be found or does not exist.
            code: NOT_FOUND.001
    InternalServerError:
      description: There was a problem handling the request on the server side
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: fe9d9a69-f0a7-4fdc-bb2c-176027f316c5
            status: '500'
            title: Internal Server Error
            detail: An unexpected error occurred on the server.
  headers:
    content-type:
      description: The content type of the response
      schema:
        type: string
      example: application/vnd.api+json
    content-length:
      description: The length of the response body in bytes
      schema:
        type: integer
        format: int32
      example: 1234
    x-request-id:
      description: >-
        An ID that can be provided when reporting bugs to help identify the
        issue
      schema:
        type: string
      example: 8470f56af4cf25e22be08e72c70dbbdc
  schemas:
    CompetencyComplianceResult:
      type: object
      description: The compliance evaluation result for a CRS against a set of users.
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          description: Composite identifier in the form "{crs_id}:{user_id}".
          example: >-
            aaaaaaaa-0000-0000-0000-000000000001:bbbbbbbb-0000-0000-0000-000000000001
        type:
          type: string
          const: competency-compliance-results
        attributes:
          $ref: '#/components/schemas/CompetencyComplianceResultAttributes'
        relationships:
          $ref: '#/components/schemas/CompetencyComplianceResultRelationships'
    CompetencyComplianceResultIncludes:
      type: array
      description: >-
        Related resources that can be included when a compliance result is
        returned.
      items:
        discriminator:
          propertyName: type
          mapping:
            qualifications:
              $ref: '#/components/schemas/Qualification'
            qualification-units:
              $ref: '#/components/schemas/QualificationUnit'
            skills-registers:
              $ref: '#/components/schemas/SkillsRegister'
            skills-register-schemes:
              $ref: '#/components/schemas/SkillsRegisterScheme'
            skills-register-scheme-categories:
              $ref: '#/components/schemas/SkillsRegisterSchemeCategory'
            training-standards:
              $ref: '#/components/schemas/TrainingStandard'
            training-items:
              $ref: '#/components/schemas/TrainingItem'
            inductions:
              $ref: '#/components/schemas/Induction'
            assessment-definitions:
              $ref: '#/components/schemas/AssessmentDefinition'
            qualification-awards:
              $ref: '#/components/schemas/QualificationAward'
            training-completions:
              $ref: '#/components/schemas/TrainingCompletion'
            induction-completions:
              $ref: '#/components/schemas/InductionCompletion'
            registrations:
              $ref: '#/components/schemas/Registration'
            scheme-registrations:
              $ref: '#/components/schemas/SchemeRegistration'
            category-registrations:
              $ref: '#/components/schemas/CategoryRegistration'
            assessment-records:
              $ref: '#/components/schemas/AssessmentRecord'
        oneOf:
          - $ref: '#/components/schemas/Qualification'
          - $ref: '#/components/schemas/QualificationUnit'
          - $ref: '#/components/schemas/SkillsRegister'
          - $ref: '#/components/schemas/SkillsRegisterScheme'
          - $ref: '#/components/schemas/SkillsRegisterSchemeCategory'
          - $ref: '#/components/schemas/TrainingStandard'
          - $ref: '#/components/schemas/TrainingItem'
          - $ref: '#/components/schemas/Induction'
          - $ref: '#/components/schemas/AssessmentDefinition'
          - $ref: '#/components/schemas/QualificationAward'
          - $ref: '#/components/schemas/TrainingCompletion'
          - $ref: '#/components/schemas/InductionCompletion'
          - $ref: '#/components/schemas/Registration'
          - $ref: '#/components/schemas/SchemeRegistration'
          - $ref: '#/components/schemas/CategoryRegistration'
          - $ref: '#/components/schemas/AssessmentRecord'
    JSONAPI:
      type: object
      description: JSON API response object
      required:
        - jsonapi
      properties:
        jsonapi:
          type: object
          required:
            - version
          properties:
            version:
              type: string
              description: The version of the JSON API specification
              examples:
                - '1.0'
    Error:
      type: object
      description: An error response
      properties:
        id:
          description: >-
            A unique identifier for this particular occurrence of the problem.
            If you encounter this, please provide us with the error ID and we
            can investigate it on our side.
          type: string
          format: uuid
          examples:
            - 05fc9c8d-73b9-4697-9337-57f7a567a48f
        status:
          description: >-
            The status code for the error. This might not match the HTTP status
            code if there are more that one errors to return with different
            status codes.
          type: string
          examples:
            - '401'
            - '500'
        title:
          description: A human readable title for the error.
          type: string
          examples:
            - You are not authorised to access this resource
        detail:
          description: >-
            Where there is more detail that we can provide outside of the title,
            we will provide it here.
          type: string
          examples:
            - In order to access this resource, you need the 'admin' role.
        code:
          description: >-
            A unique code for the error that may help us to diagnose the issue.
            Not all errors have codes, so this is usually empty.
          type: string
          examples:
            - AUTH.001
        source:
          description: A JSON object containing additional information about the error.
          type: object
          properties:
            pointer:
              description: >-
                A JSON Pointer to the value in the request that caused the
                error.
              type: string
              examples:
                - /data/attributes/email
            parameter:
              description: >-
                A string indicating which query parameter in the request caused
                the error.
              type: string
              examples:
                - include
      required:
        - id
        - status
        - title
    CompetencyComplianceResultAttributes:
      type: object
      required:
        - satisfied
        - report
      properties:
        satisfied:
          type: boolean
          description: Whether the evaluated collection satisfies the CRS specification.
        report:
          $ref: '#/components/schemas/ComplianceReportNode'
    CompetencyComplianceResultRelationships:
      type: object
      description: Relationships for a competency compliance result
      required:
        - competency_requirement_specification
        - user
      properties:
        competency_requirement_specification:
          type: object
          required:
            - data
          properties:
            data:
              $ref: >-
                #/components/schemas/CompetencyRequirementSpecificationRelationship
        user:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
    Qualification:
      type: object
      description: A qualification
      required:
        - id
        - type
        - attributes
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification.
        type:
          type: string
          const: qualifications
        attributes:
          $ref: '#/components/schemas/QualificationAttributes'
        meta:
          $ref: '#/components/schemas/QualificationMeta'
        relationships:
          $ref: '#/components/schemas/QualificationRelationships'
    QualificationUnit:
      type: object
      description: A qualification unit
      required:
        - id
        - type
        - attributes
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification unit.
        type:
          type: string
          const: qualification-units
        attributes:
          $ref: '#/components/schemas/QualificationUnitAttributes'
    SkillsRegister:
      type: object
      description: A skills register
      required:
        - id
        - type
        - attributes
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register.
        type:
          type: string
          const: skills-registers
        attributes:
          $ref: '#/components/schemas/SkillsRegisterAttributes'
    SkillsRegisterScheme:
      type: object
      description: A skills register scheme
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register scheme.
        type:
          type: string
          const: skills-register-schemes
        attributes:
          $ref: '#/components/schemas/SkillsRegisterSchemeAttributes'
        relationships:
          $ref: '#/components/schemas/SkillsRegisterSchemeRelationships'
    SkillsRegisterSchemeCategory:
      type: object
      description: A skills register scheme category
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register scheme category.
        type:
          type: string
          const: skills-register-scheme-categories
        attributes:
          $ref: '#/components/schemas/SkillsRegisterSchemeCategoryAttributes'
        relationships:
          $ref: '#/components/schemas/SkillsRegisterSchemeCategoryRelationships'
    TrainingStandard:
      type: object
      description: A training standard
      required:
        - id
        - type
        - attributes
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the training standard.
        type:
          type: string
          const: training-standards
        attributes:
          $ref: '#/components/schemas/TrainingStandardAttributes'
        meta:
          $ref: '#/components/schemas/TrainingStandardMeta'
        relationships:
          $ref: '#/components/schemas/TrainingStandardRelationships'
    TrainingItem:
      type: object
      description: A training item
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the training item.
        type:
          type: string
          const: training-items
        attributes:
          $ref: '#/components/schemas/TrainingItemAttributes'
        relationships:
          $ref: '#/components/schemas/TrainingItemRelationships'
    Induction:
      type: object
      description: An induction
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the induction.
        type:
          type: string
          const: inductions
        attributes:
          $ref: '#/components/schemas/InductionAttributes'
        relationships:
          $ref: '#/components/schemas/InductionRelationships'
    AssessmentDefinition:
      type: object
      description: An assessment definition
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the assessment definition.
        type:
          type: string
          const: assessment-definitions
        attributes:
          $ref: '#/components/schemas/AssessmentDefinitionAttributes'
        relationships:
          $ref: '#/components/schemas/AssessmentDefinitionRelationships'
    QualificationAward:
      type: object
      description: A qualification award
      required:
        - id
        - type
        - attributes
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification award.
        type:
          type: string
          const: qualification-awards
        attributes:
          $ref: '#/components/schemas/QualificationAwardAttributes'
        meta:
          $ref: '#/components/schemas/QualificationAwardMeta'
        relationships:
          $ref: '#/components/schemas/QualificationAwardRelationships'
    TrainingCompletion:
      type: object
      description: A training completion
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the training completion.
        type:
          type: string
          const: training-completions
        attributes:
          $ref: '#/components/schemas/TrainingCompletionAttributes'
        relationships:
          $ref: '#/components/schemas/TrainingCompletionRelationships'
    InductionCompletion:
      type: object
      description: An induction completion record
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the induction completion.
        type:
          type: string
          const: induction-completions
        attributes:
          $ref: '#/components/schemas/InductionCompletionAttributes'
        relationships:
          $ref: '#/components/schemas/InductionCompletionRelationships'
    Registration:
      type: object
      description: A registration on a skills register
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the registration.
        type:
          type: string
          const: registrations
        attributes:
          $ref: '#/components/schemas/RegistrationAttributes'
        relationships:
          $ref: '#/components/schemas/RegistrationRelationships'
    SchemeRegistration:
      type: object
      description: A scheme registration
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the scheme registration.
        type:
          type: string
          const: scheme-registrations
        attributes:
          $ref: '#/components/schemas/SchemeRegistrationAttributes'
        relationships:
          $ref: '#/components/schemas/SchemeRegistrationRelationships'
    CategoryRegistration:
      type: object
      description: A category registration
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the category registration.
        type:
          type: string
          const: category-registrations
        attributes:
          $ref: '#/components/schemas/CategoryRegistrationAttributes'
        relationships:
          $ref: '#/components/schemas/CategoryRegistrationRelationships'
    AssessmentRecord:
      type: object
      description: An assessment record
      required:
        - id
        - type
        - attributes
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the assessment record.
        type:
          type: string
          const: assessment-records
        attributes:
          $ref: '#/components/schemas/AssessmentRecordAttributes'
        relationships:
          $ref: '#/components/schemas/AssessmentRecordRelationships'
    ComplianceReportNode:
      description: >
        A single node in the compliance report tree. Leaf nodes carry `type` and
        `reference_id`; logic nodes carry `node_kind` and `children`.
      oneOf:
        - $ref: '#/components/schemas/ComplianceReportLeaf'
        - $ref: '#/components/schemas/ComplianceReportLogicAndOr'
        - $ref: '#/components/schemas/ComplianceReportLogicNot'
    CompetencyRequirementSpecificationRelationship:
      type: object
      description: Represents a relationship to a competency requirement specification
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the competency requirement specification
        type:
          type: string
          const: competency-requirement-specifications
    UserRelationship:
      type: object
      description: Represents a relationship to a user
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the user
        type:
          type: string
          const: users
    QualificationAttributes:
      type: object
      description: Attributes for a qualification
      required:
        - qualification_number
        - title
        - status
        - provenance
      properties:
        qualification_number:
          type: string
          description: >-
            The qualification number (e.g. "500/1514/X"). The canonical
            identifier for the qualification.
        title:
          type: string
          description: The full title of the qualification.
        level:
          type: string
          description: The level of the qualification (e.g. "Level 3").
        sub_level:
          type: string
          description: The sub-level of the qualification, if applicable.
        type:
          type: string
          description: >-
            The type of qualification (e.g. "QCF", "NVQ", "Award",
            "Certificate", "Diploma").
        total_credits:
          type:
            - integer
            - 'null'
          description: The total credit value of the qualification. Null if not applicable.
        guided_learning_hours:
          type:
            - integer
            - 'null'
          description: >-
            The guided learning hours for the qualification. Null if not
            specified.
        total_qualification_time:
          type:
            - integer
            - 'null'
          description: The total qualification time in hours. Null if not specified.
        ssa:
          type: string
          description: The Sector Subject Area (e.g. "04.1 Engineering").
        operational_start_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the qualification became available. Null if not specified.
        operational_end_date:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date the qualification ceased to be available. Null if still
            active.
        regulation_status:
          type: string
          description: >-
            The regulatory status of the qualification (e.g. "Available to
            learners", "No longer awarded", "Withdrawn").
        awarding_body_rn:
          type: string
          description: The recognition number of the owning awarding body (e.g. "RN5133").
        awarding_body_name:
          type: string
          description: The name of the owning awarding body (denormalised).
        status:
          type: string
          description: The lifecycle status of the qualification.
          enum:
            - ingested
            - published
            - archived
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        provenance:
          type: string
          description: How this record entered the system.
          enum:
            - ofqual
            - manual
    QualificationMeta:
      type: object
      description: Metadata for a qualification
      required:
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
          description: The date and time when the qualification was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the qualification was last updated
    QualificationRelationships:
      type: object
      description: Relationships for a qualification
      required:
        - awarding_body
      properties:
        awarding_body:
          type: object
          description: The awarding body that owns this qualification
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/AwardingBodyRelationship'
    QualificationUnitAttributes:
      type: object
      description: Attributes for a qualification unit
      required:
        - uan
        - title
        - provenance
      properties:
        uan:
          type: string
          description: >-
            The Universal Accreditation Number (e.g. "A/503/0665"). The
            canonical identifier for the unit.
        unit_key:
          type: string
          description: >-
            The Ofqual composite key (RN + UAN, e.g. "RN6142/A/503/0665"). Used
            for sync joins only.
        title:
          type: string
          description: The full title of the unit.
        level:
          type: string
          description: The level of the unit (e.g. "Level 2").
        credit_value:
          type:
            - integer
            - 'null'
          description: The credit value of the unit. Null if not applicable.
        guided_learning_hours:
          type:
            - integer
            - 'null'
          description: The guided learning hours for the unit. Null if not specified.
        ssa:
          type: string
          description: The Sector Subject Area (e.g. "04.1 Engineering").
        withdrawn_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the unit was withdrawn by Ofqual. Null if still active.
        provenance:
          type: string
          description: How this record entered the system.
          enum:
            - ofqual
            - manual
    SkillsRegisterAttributes:
      type: object
      description: Attributes for a skills register
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the skills register.
          examples:
            - Energy & Utilities Skills Register
        acronym:
          type:
            - string
            - 'null'
          description: The short-form acronym for the skills register.
          examples:
            - EUSR
        renewal_frequency:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            The number of days between renewals. Null if the register does not
            require renewal.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured. Requires renewal_frequency to be set.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
    SkillsRegisterSchemeAttributes:
      type: object
      description: Attributes for a skills register scheme
      required:
        - name
        - status
      properties:
        name:
          type: string
          description: The name of the scheme.
          examples:
            - NCO Gas
        description:
          type:
            - string
            - 'null'
          description: A description of the scheme.
        status:
          type: string
          enum:
            - published
            - unpublished
          description: The publication status of the scheme.
          examples:
            - published
        renewal_frequency:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            The number of days between renewals. Null if the scheme does not
            require renewal.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured. Requires renewal_frequency to be set.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        url:
          type:
            - string
            - 'null'
          format: uri
          description: A link to the scheme's external page.
          examples:
            - https://eusr.co.uk/schemes/network-construction-operations-gas/
    SkillsRegisterSchemeRelationships:
      type: object
      description: Relationships for a skills register scheme
      required:
        - skills_register
      properties:
        skills_register:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/SkillsRegisterRelationship'
        categories:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SkillsRegisterSchemeCategoryRelationship'
    SkillsRegisterSchemeCategoryAttributes:
      type: object
      description: Attributes for a skills register scheme category
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the category.
          examples:
            - Service Layer
        renewal_frequency:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            The number of days between renewals. Null if the category does not
            require renewal.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured. Requires renewal_frequency to be set.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
    SkillsRegisterSchemeCategoryRelationships:
      type: object
      description: Relationships for a skills register scheme category
      required:
        - skills_register_scheme
      properties:
        skills_register_scheme:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/SkillsRegisterSchemeRelationship'
    TrainingStandardAttributes:
      type: object
      description: Attributes for a training standard
      required:
        - title
        - status
        - provenance
      properties:
        grant_ts_code:
          type:
            - string
            - 'null'
          description: >-
            The CITB grant training standard code (e.g. "GET0096"). Null for
            standards without a unique code.
        title:
          type: string
          description: The title of the training standard.
        occupational_area:
          type: string
          description: The industry sector grouping (e.g. "Utilities - gas", "Asbestos").
        product_type:
          type:
            - string
            - 'null'
          description: The CITB product type classification.
          enum:
            - Recognised
            - Assured
            - CITB Products
            - null
        url:
          type:
            - string
            - 'null'
          description: >-
            Link to the full standard specification on the standards body
            website.
        status:
          type: string
          description: The lifecycle status of the training standard within Ctrl Hub.
          enum:
            - ingested
            - published
            - archived
        citb_status:
          type:
            - string
            - 'null'
          description: The status as reported by CITB. Null for non-CITB standards.
          enum:
            - Published
            - In development
            - Withdrawn
            - null
        grant_tier:
          type:
            - string
            - 'null'
          description: The CITB grant funding tier (e.g. "Tier 1", "Tier 2").
        grant_amount_pence:
          type:
            - integer
            - 'null'
          description: >-
            The CITB grant funding amount in pence (e.g. 14000 for £140). Null
            if not applicable.
        renewal_period_months:
          type:
            - integer
            - 'null'
          description: >-
            The renewal period in months (e.g. 60 for SHEA Gas, 36 for First
            Aid). Null if unknown or not applicable.
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        last_updated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date the standard was last updated by the standards body. Null
            if not available.
        provenance:
          type: string
          description: How this record entered the system.
          enum:
            - citb
            - manual
        last_synced_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date this record was last synced from the external source. Null
            for manual records.
    TrainingStandardMeta:
      type: object
      description: Metadata for a training standard
      required:
        - created_at
        - updated_at
      properties:
        created_at:
          type: string
          format: date-time
          description: The date and time when the training standard was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the training standard was last updated
    TrainingStandardRelationships:
      type: object
      description: Relationships for a training standard
      required:
        - standards_body
        - categories
      properties:
        standards_body:
          type: object
          description: The standards body that owns this training standard
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/StandardsBodyRelationship'
        categories:
          type: object
          description: The categories this training standard belongs to
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/TrainingStandardCategoryRelationship'
    TrainingItemAttributes:
      type: object
      description: Attributes for a training item
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the training item.
          examples:
            - Internal SHEA Equivalent
        timing:
          type:
            - string
            - 'null'
          description: When this training item is required relative to work.
          enum:
            - prior_to_starting_work
            - first_job_assessment
            - null
          examples:
            - prior_to_starting_work
        description:
          type: string
          description: A description of the training item.
        renewal_period:
          type:
            - integer
            - 'null'
          minimum: 1
          description: The number of days between renewals. Null if no renewal is required.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this training item definition expires. Null
            indicates no expiry.
    TrainingItemRelationships:
      type: object
      description: Relationships for a training item
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
    InductionAttributes:
      type: object
      description: Attributes for an induction
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the induction.
          examples:
            - SGN Network Induction
        timing:
          type:
            - string
            - 'null'
          description: When this induction is required relative to work.
          enum:
            - prior_to_starting_work
            - first_job_assessment
            - null
          examples:
            - prior_to_starting_work
        description:
          type: string
          description: A description of the induction.
        renewal_period:
          type:
            - integer
            - 'null'
          minimum: 1
          description: The number of days between renewals. Null if no renewal is required.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this induction definition expires. Null
            indicates no expiry.
    InductionRelationships:
      type: object
      description: Relationships for an induction
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
    AssessmentDefinitionAttributes:
      type: object
      description: Attributes for an assessment definition
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the assessment definition.
          examples:
            - CAS Assessment - Service Layer
        code:
          type:
            - string
            - 'null'
          description: An optional code for the assessment definition.
          examples:
            - CAS 1234
        timing:
          type:
            - string
            - 'null'
          description: When this assessment is required relative to work.
          enum:
            - prior_to_starting_work
            - first_job_assessment
            - null
          examples:
            - prior_to_starting_work
        description:
          type: string
          description: A description of the assessment definition.
        renewal_period:
          type:
            - integer
            - 'null'
          minimum: 1
          description: The number of days between renewals. Null if no renewal is required.
          examples:
            - 365
        high_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which high risk begins. Null if not
            configured.
        medium_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which medium risk begins. Requires
            high_risk_duration to be set and must be greater than or equal to
            high_risk_duration.
        low_risk_duration:
          type:
            - integer
            - 'null'
          minimum: 1
          description: >-
            Days before expiry at which low risk begins. Requires
            medium_risk_duration to be set and must be greater than or equal to
            medium_risk_duration.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this assessment definition expires. Null
            indicates no expiry.
    AssessmentDefinitionRelationships:
      type: object
      description: Relationships for an assessment definition
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
    QualificationAwardAttributes:
      type: object
      description: Attributes for a qualification award
      required:
        - status
      properties:
        status:
          type: string
          description: The status of the qualification award
          enum:
            - assigned
            - awarded
        due:
          type: string
          format: date-time
          description: The date and time when the qualification is due
        awarded_at:
          type: string
          format: date-time
          description: The date and time when the qualification was awarded
    QualificationAwardMeta:
      type: object
      description: Metadata for a qualification award
      required:
        - created_at
        - risks
      properties:
        is_valid:
          type: boolean
          description: >-
            Indicates whether there has been an assessment for this award which
            passed.
        is_latest:
          type: boolean
          description: >-
            Indicates whether this is the latest award for a user and
            qualification. If false, there is a more recent award.
        created_at:
          type: string
          format: date-time
          description: The date and time when the award was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the award was last updated
        modified_at:
          type: string
          format: date-time
          description: The date and time when the award was last modified
        expires_at:
          type: string
          format: date-time
          description: >-
            The date and time when the award expires. If the qualification does
            not need renewal, this will not be set.
        risks:
          type: object
          description: Risk information for this award
          required:
            - current
            - thresholds
          properties:
            current:
              type: string
              description: The current risk level
              enum:
                - none
                - low
                - medium
                - high
                - critical
            next_check:
              type: string
              format: date-time
              description: >-
                The date and time when the next risk check is scheduled based on
                the current risk level and thresholds
            thresholds:
              type: object
              description: Risk threshold dates
              required:
                - none
                - low
                - medium
                - high
                - critical
              properties:
                none:
                  type: string
                  format: date-time
                  description: Date when no risk period started
                low:
                  type: string
                  format: date-time
                  description: Date when low risk starts
                medium:
                  type: string
                  format: date-time
                  description: Date when medium risk starts
                high:
                  type: string
                  format: date-time
                  description: Date when high risk starts
                critical:
                  type: string
                  format: date-time
                  description: Date when critical risk starts (expiry date)
    QualificationAwardRelationships:
      type: object
      description: Relationships for a qualification award
      required:
        - user
        - author
        - qualification
      properties:
        assessments:
          type: array
          description: The assessments associated with this award
          items:
            $ref: '#/components/schemas/QualificationAwardAssessmentRelationship'
        user:
          type: object
          description: The user who received this award
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        author:
          type: object
          description: The user who granted this award
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        qualification:
          type: object
          description: The qualification that was awarded
          properties:
            data:
              $ref: '#/components/schemas/QualificationRelationship'
        renewed_by:
          type: object
          description: The award that renewed this one, if any
          properties:
            data:
              $ref: '#/components/schemas/QualificationAwardRelationship'
        renews:
          type: object
          description: The award that this one renews, if any
          properties:
            data:
              $ref: '#/components/schemas/QualificationAwardRelationship'
        folder:
          type: object
          description: The folder that contains this award
          properties:
            data:
              $ref: '#/components/schemas/FolderRelationship'
    TrainingCompletionAttributes:
      type: object
      description: Attributes for a training completion
      required:
        - reference_type
        - reference_id
      properties:
        reference_type:
          type: string
          description: The type of training reference.
          enum:
            - training_standard
            - training_item
        reference_id:
          type: string
          format: uuid
          description: The ID of the referenced training standard or training item.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date and time when training was completed.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this completion expires. Null indicates no
            expiry.
        risk_status:
          type: string
          description: The current risk level of this training completion.
          enum:
            - none
            - low
            - medium
            - high
            - critical
        next_check:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when the next risk check is scheduled. Null if no
            check is required.
        kind:
          oneOf:
            - type: 'null'
            - type: string
              enum:
                - does_not_undertake_activity
                - expected_first_assessment
          description: Indicates an exemption kind for this record.
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
      oneOf:
        - required:
            - expected_by
          properties:
            kind:
              const: expected_first_assessment
            expected_by:
              type: string
              format: date-time
        - properties:
            kind:
              not:
                const: expected_first_assessment
            expected_by:
              type: 'null'
    TrainingCompletionRelationships:
      type: object
      description: Relationships for a training completion
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        user:
          type: object
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        folder:
          type: object
          description: >-
            The folder containing evidence documents for this training
            completion.
          properties:
            data:
              $ref: '#/components/schemas/FolderRelationship'
    InductionCompletionAttributes:
      type: object
      description: Attributes for an induction completion
      properties:
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date and time when the induction was completed.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this completion expires. Null indicates no
            expiry.
        risk_status:
          type: string
          description: The current risk level of this induction completion.
          enum:
            - none
            - low
            - medium
            - high
            - critical
        next_check:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when the next risk check is scheduled. Null if no
            check is required.
        kind:
          type:
            - string
            - 'null'
          description: Indicates an exemption kind for this record.
          enum:
            - does_not_undertake_activity
            - expected_first_assessment
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
    InductionCompletionRelationships:
      type: object
      description: Relationships for an induction completion
      required:
        - organisation
        - user
        - induction
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        user:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        induction:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/InductionRelationship'
        folder:
          type: object
          description: >-
            The folder containing evidence documents for this induction
            completion.
          properties:
            data:
              $ref: '#/components/schemas/FolderRelationship'
    RegistrationAttributes:
      type: object
      description: Attributes for a registration
      properties:
        registration_number:
          type:
            - string
            - 'null'
          description: The card or certificate number for this registration.
          examples:
            - EUSR-12345
        registered_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the registration was issued.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date the registration expires. Independent of any underlying
            qualification expiry.
        kind:
          oneOf:
            - type: 'null'
            - type: string
              enum:
                - does_not_undertake_activity
                - expected_first_assessment
          description: Indicates an exemption kind for this record.
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
      oneOf:
        - required:
            - expected_by
          properties:
            kind:
              const: expected_first_assessment
            expected_by:
              type: string
              format: date-time
        - properties:
            kind:
              not:
                const: expected_first_assessment
            expected_by:
              type: 'null'
    RegistrationRelationships:
      type: object
      description: Relationships for a registration
      required:
        - user
        - skills_register
      properties:
        user:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        skills_register:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/SkillsRegisterRelationship'
        skills_register_schemes:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SkillsRegisterSchemeRelationship'
        skills_register_scheme_categories:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SkillsRegisterSchemeCategoryRelationship'
    SchemeRegistrationAttributes:
      type: object
      description: Attributes for a scheme registration
      properties:
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this registration expires. Null indicates no
            expiry.
        risk_status:
          type: string
          description: The current risk level of this registration.
          enum:
            - none
            - low
            - medium
            - high
            - critical
        next_check:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when the next risk check is scheduled. Null if no
            check is required.
        kind:
          oneOf:
            - type: 'null'
            - type: string
              enum:
                - does_not_undertake_activity
                - expected_first_assessment
          description: Indicates an exemption kind for this record.
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
      oneOf:
        - required:
            - expected_by
          properties:
            kind:
              const: expected_first_assessment
            expected_by:
              type: string
              format: date-time
        - properties:
            kind:
              not:
                const: expected_first_assessment
            expected_by:
              type: 'null'
    SchemeRegistrationRelationships:
      type: object
      description: Relationships for a scheme registration
      required:
        - user
        - skills_register_scheme
      properties:
        user:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        skills_register_scheme:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/SkillsRegisterSchemeRelationship'
        skills_register_scheme_categories:
          type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SkillsRegisterSchemeCategoryRelationship'
    CategoryRegistrationAttributes:
      type: object
      description: Attributes for a category registration
      properties:
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this registration expires. Null indicates no
            expiry.
        kind:
          type:
            - string
            - 'null'
          description: Indicates an exemption kind for this record.
          enum:
            - does_not_undertake_activity
            - expected_first_assessment
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
    CategoryRegistrationRelationships:
      type: object
      description: Relationships for a category registration
      required:
        - user
        - skills_register_scheme_category
      properties:
        user:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        skills_register_scheme_category:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/SkillsRegisterSchemeCategoryRelationship'
    AssessmentRecordAttributes:
      type: object
      description: Attributes for an assessment record
      required:
        - status
      properties:
        status:
          type: string
          description: The outcome of the assessment.
          enum:
            - passed
            - failed
        assessment_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the assessment was conducted.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when this record expires. Null indicates no
            expiry.
        risk_status:
          type: string
          description: The current risk level of this assessment record.
          enum:
            - none
            - low
            - medium
            - high
            - critical
        next_check:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time when the next risk check is scheduled. Null if no
            check is required.
        kind:
          oneOf:
            - type: 'null'
            - type: string
              enum:
                - does_not_undertake_activity
                - expected_first_assessment
          description: Indicates an exemption kind for this record.
        expected_by:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date by which the first assessment is expected. Only relevant
            when kind is expected_first_assessment.
      oneOf:
        - required:
            - expected_by
          properties:
            kind:
              const: expected_first_assessment
            expected_by:
              type: string
              format: date-time
        - properties:
            kind:
              not:
                const: expected_first_assessment
            expected_by:
              type: 'null'
    AssessmentRecordRelationships:
      type: object
      description: Relationships for an assessment record
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        user:
          type: object
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        assessment_definition:
          type: object
          properties:
            data:
              $ref: '#/components/schemas/AssessmentDefinitionRelationship'
        assessor:
          type: object
          description: The user who conducted the assessment.
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
        folder:
          type: object
          description: The folder containing evidence documents for this assessment record.
          properties:
            data:
              $ref: '#/components/schemas/FolderRelationship'
    ComplianceReportLeaf:
      type: object
      required:
        - satisfied
        - type
        - reference_id
      properties:
        satisfied:
          type: boolean
          description: >-
            Whether this node's specification is satisfied by the evaluated
            collection.
        type:
          type: string
          description: The requirement item type.
          example: qualifications
        reference_id:
          type: string
          format: uuid
          description: The UUID of the referenced requirement item.
          example: aaaaaaaa-0000-0000-0000-000000000001
    ComplianceReportLogicAndOr:
      type: object
      required:
        - satisfied
        - node_kind
        - children
      properties:
        satisfied:
          type: boolean
          description: >-
            Whether this node's specification is satisfied by the evaluated
            collection.
        node_kind:
          type: string
          enum:
            - and
            - or
          description: The logical combinator kind.
        children:
          type: array
          minItems: 1
          description: Child nodes.
          items:
            $ref: '#/components/schemas/ComplianceReportNode'
    ComplianceReportLogicNot:
      type: object
      required:
        - satisfied
        - node_kind
        - children
      properties:
        satisfied:
          type: boolean
          description: >-
            Whether this node's specification is satisfied by the evaluated
            collection.
        node_kind:
          type: string
          const: not
          description: The logical negation combinator.
        children:
          type: array
          minItems: 1
          maxItems: 1
          description: The single child node being negated.
          items:
            $ref: '#/components/schemas/ComplianceReportNode'
    AwardingBodyRelationship:
      type: object
      description: Represents a relationship to an awarding body
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the awarding body
        type:
          type: string
          const: awarding-bodies
    SkillsRegisterRelationship:
      type: object
      description: Represents a relationship to a skills register
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register
        type:
          type: string
          const: skills-registers
    SkillsRegisterSchemeCategoryRelationship:
      type: object
      description: Represents a relationship to a skills register scheme category
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register scheme category
        type:
          type: string
          const: skills-register-scheme-categories
    SkillsRegisterSchemeRelationship:
      type: object
      description: Represents a relationship to a skills register scheme
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the skills register scheme
        type:
          type: string
          const: skills-register-schemes
    StandardsBodyRelationship:
      type: object
      description: Represents a relationship to a standards body
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the standards body
        type:
          type: string
          const: standards-bodies
    TrainingStandardCategoryRelationship:
      type: object
      description: Represents a relationship to a training standard category
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the training standard category
        type:
          type: string
          const: training-standard-categories
    OrganisationRelationship:
      type: object
      description: Represents a relationship to an organisation
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the organisation
        type:
          type: string
          const: organisations
    QualificationAwardAssessmentRelationship:
      type: object
      description: Represents a relationship to a qualification award assessment
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification award assessment
        type:
          type: string
          const: qualification-award-assessments
    QualificationRelationship:
      type: object
      description: Represents a relationship to a qualification
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification
        type:
          type: string
          const: qualifications
    QualificationAwardRelationship:
      type: object
      description: Represents a relationship to a qualification award
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the qualification award
        type:
          type: string
          const: qualification-awards
    FolderRelationship:
      type: object
      description: Represents a relationship to a folder
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the folder
        type:
          type: string
          const: folders
    InductionRelationship:
      type: object
      description: Represents a relationship to an induction
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the induction
        type:
          type: string
          const: inductions
    AssessmentDefinitionRelationship:
      type: object
      description: Represents a relationship to an assessment definition
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the assessment definition
        type:
          type: string
          const: assessment-definitions
  securitySchemes:
    Session:
      description: |
        Session token for authentication.
      in: header
      name: X-Session-Token
      type: apiKey
    OAuth2:
      description: |
        OAuth2 token for authentication.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://auth.ctrl-hub.com/oauth2/token
      type: oauth2
    Cookie:
      description: |
        Cookie token for authentication.
      in: cookie
      name: ctrl_hub_session
      type: apiKey

````