openapi: 3.0.2
info:
  title: WCBS HUBmis
  description: |
    <a href="hubmis-open-api.yaml" target="_blank" id="download-btn">Download OpenAPI Specification In YAML Format</a>

    # Introduction
    >
      The HUBmis JSON API provides an easy-to-use and functionality-rich RESTful interface for developers to build their own
      solutions. Requests/responses are provided in JSON format.

      Once authenticated (see 'Authentication' for more details), requests are made for a selected 'Realm' ID,
      which corresponds to the school you wish to access the API on behalf of.

      Production Base URLs:
      - https://api.hubmis.com/api/v1
      - https://api.hubmis.com/api/v2

    If you would like to register to use the HUBmis API, please go to https://www.wcbs.co.uk/contact-us

    ## Authentication
    >
      After you have registered to use the HUBmis API, you will be sent an email to your registered email address with
      information about how to obtain your client credentials in order to generate an access token. Your client secret
      must be kept confidential and stored securely. Upon obtaining your client credentials, you can authenticate to the
      API as follows:

      1. Make a request to the OAuth > Token endpoint with the `client_credentials` OAuth grant and your `client_id`
         and `client_secret`:

        Request
        ```
        POST /api/v1/token HTTP/1.1
        Host: api.hubmis.com
        Content-Type: application/x-www-form-urlencoded
        Content-Length: 73

        grant_type=client_credentials&client_id=client123&client_secret=secret123
        ```

        Response
        ```
        {
            "token_type": "Bearer",
            "expires_in": 86400,
            "access_token": "123.abc.xyz"
        }
        ```
      2. The `access_token` in the response can then be sent in the `Authorization` header (alongside `Realm`) for all
         other API requests:

      ```
        Authorization: Bearer xyz123.abc
        Realm: xyz123
      ```

      Access tokens expire after 15 minutes. When expired, the API will respond with a HTTP status code of
      `401 (Unauthorized)`, after which you will need to obtain a new token.

    ## Usage Limits
    >
      The HUBmis API is rate-limited to 12 requests per minute per IP address and 500 requests per client, with a rate
      of one new request every 5 seconds. For example, if you make one request from the 500 available and after 5
      seconds make no other requests, the available number will increase back to 500.

      When the limit has been reached, the API will respond with a HTTP status code of `429 Too Many Requests` and you
      will need to wait at least 5 seconds to make a new request.

      The following 3 headers in the response provide information of the limit, how many requests are remaining and
      the date-time (as a Unix timestamp) after which the request can be retried:

      ```
      X-RateLimit-Limit: 500
      X-RateLimit-Remaining: 495
      X-RateLimit-Retry-After: 1615203774
      ```
  version: 1.2.0
  contact:
    name: HUBmis development team
    url: https://www.wcbs.co.uk/support
    email: support@wcbs.co.uk
  x-logo:
    url: https://www.wcbs.co.uk/wp-content/uploads/2019/08/HUB-logo-product-01-01-e1566986514462.png
servers:
  - url: https://api.hubmis.com/api
    description: Production
x-tagGroups:
  - name: OAuth
    tags:
      - Token
  - name: School
    tags:
      - Students
      - Academic Structure
      - Address
      - Learning Support
      - Staff
      - Contacts
      - Timetable
      - Person
      - School
      - Attendance
  - name: Module - Learning Support
    tags:
      - Learning Support
  - name: Module - Timetable
    tags:
      - Timetable Maintenance
      - Timetable Views
  - name: Module - Pastoral
    tags:
      - Pastoral
  - name: Global
    tags:
      - Data
      - Settings
tags:
  - name: Academic Structure
    description: 'Endpoints related to the academic structure: years, lessons etc'
  - name: Address
    description: Management of addresses
  - name: Contacts
    description: Contacts module - Contains all services that pertain to Contact Profile data.
  - name: Data
    description: Endpoints which affect central settings - includes any list maintenance services (e.g. Countries). Data services that belong to a certain module can be found under that module.
  - name: iCal
    description: Generation of formatted calendar feeds (ical and ics)
  - name: Learning Support
    description: Learning Support module - available as an extra purchase.
  - name: Pastoral
    description: Pastoral Records, associated notes and actions
  - name: Persons
    description: Operations pertaining to a Person but not specifically a Contact, Student or Staff
  - name: Relations
    description: Relating persons to other persons
  - name: School
    description: School configuration
  - name: Settings
    description: Settings configuration data central to the application.
  - name: Staff
    description: Staff module - Contains services that pertain to Staff Profile data.
  - name: Students
    description: Students module - Contains services that pertain to Student Profile data.
  - name: Timetable Maintenance
    description: Timetable module - Administration of timetables
  - name: Timetable Views
    description: Timetable module - Views and reporting of timetables, including calendar information
  - name: Token
    description: Token acquisition
paths:
  /v1/data/countries:
    get:
      operationId: getCountries
      tags:
        - Data
      summary: 'Countries: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Countries
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.Country'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/custom-fields/{userType}/groups:
    get:
      operationId: getCustomFieldsGroup
      tags:
        - Data
      summary: 'Custom Fields Group: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.UserType.Type'
      responses:
        '200':
          description: List of Custom Field Groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/custom-fields/fields:
    get:
      operationId: getCustomFieldsField
      tags:
        - Data
      summary: 'Custom Fields Field: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.CustomFields.Group.Id'
      responses:
        '200':
          description: List of Custom Fields Field
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.CustomFields.Field'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/custom-fields/fields/{id}/options:
    get:
      operationId: getCustomFieldsOption
      tags:
        - Data
      summary: 'Custom Fields Option: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Custom Fields Option
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Custom Field not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/data/ethnicities:
    get:
      operationId: getEthnicities
      tags:
        - Data
      summary: 'Ethnicities: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Ethnicities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.Ethnicity'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/faiths:
    get:
      operationId: getFaiths
      tags:
        - Data
      summary: 'Faiths: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Faiths
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.Faith'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/genders:
    get:
      operationId: getGenders
      tags:
        - Data
      summary: 'Gender: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Genders
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/languages:
    get:
      operationId: getLanguages
      tags:
        - Data
      summary: 'Languages: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Languages
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.Language'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/marital-statuses:
    get:
      operationId: getMaritalStatuses
      tags:
        - Data
      summary: 'Marital Statuses: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Marital Statuses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/nationalities:
    get:
      operationId: getNationalities
      tags:
        - Data
      summary: 'Nationalities: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Nationalities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.Nationality'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/qualifications:
    get:
      operationId: getQualifications
      tags:
        - Data
      summary: 'Qualifications: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Qualifications
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.KeyValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/data/titles:
    get:
      operationId: getTitles
      tags:
        - Data
      summary: 'Titles: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Titles
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/records:
    get:
      operationId: getLearningSupportRecords
      tags:
        - Learning Support
      summary: 'Learning Support Records: List'
      security:
        - OAuth:
            - learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.LearningSupport.Records.Sort'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Records fetched
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LearningSupport.Record'
  /v1/learning-support/records/{id}:
    get:
      operationId: getLearningSupportRecord
      tags:
        - Learning Support
      summary: 'LearningSupport Record: Get'
      description: Either of the listed scopes is required
      security:
        - OAuth:
            - learning-support.read
            - students.current.learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Record fetched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningSupport.Record'
        '404':
          description: Record not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/learning-support/records/statuses:
    get:
      operationId: getStatuses
      tags:
        - Learning Support
      summary: 'Learning Support Records: Get a list of Record statuses'
      security:
        - OAuth:
            - learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Learning Support Record statuses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
        '404':
          description: Learning Support Record Status not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/learning-support/data/severities:
    get:
      operationId: getSeverities
      tags:
        - Learning Support
      summary: 'Learning Support Severities: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Severities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/data/types:
    get:
      operationId: getLearningSupportTypes
      tags:
        - Learning Support
      summary: 'Learning Support Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Learning Support Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/data/authorities:
    get:
      operationId: getAuthorities
      tags:
        - Data
      summary: 'Authorities: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Authorities
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/data/authority-types:
    get:
      operationId: getAuthorityTypes
      tags:
        - Data
      summary: 'Authority Type: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Authority Type
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/data/review-types:
    get:
      operationId: getLearningSupportReviewTypes
      tags:
        - Learning Support
      summary: 'Learning Support Review Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Learning Support Review Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/learning-support/reviews/{id}:
    get:
      operationId: getLearningSupportReviewById
      tags:
        - Learning Support
      summary: 'Learning Support: Get Learning Support Review by Id'
      description: Either of the listed scopes is required
      security:
        - OAuth:
            - learning-support.read
            - students.current.learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: 'Learning Support: Get Review data'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LearningSupport.Review'
  /v1/pastoral/data/categories/{pastoralCategoryType}:
    get:
      operationId: getPastoralCategory
      tags:
        - Pastoral
      summary: 'Pastoral Category: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.PastoralCategory.Type'
      responses:
        '200':
          description: List of Pastoral Categories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pastoral.Category'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Pastoral Type not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/pastoral/data/categories/{pastoralCategoryType}/{id}:
    get:
      operationId: GetPastoralCategoryById
      summary: 'Pastoral Category: Get one'
      tags:
        - Pastoral
      security:
        - OAuth:
            - settings.modules.wellbeing.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.PastoralCategory.Type'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pastoral.Category'
        '404':
          description: Pastoral Category Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/pastoral/data/severity-levels/{module}:
    get:
      operationId: getSeverityLevels
      tags:
        - Pastoral
      summary: 'Pastoral Severity Levels: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Pastoral.Module'
      responses:
        '200':
          description: List of Severity Levels
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pastoral.Data.SeverityLevel'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/pastoral/events:
    get:
      deprecated: true
      description: Get list of Pastoral Events
      operationId: GetlistofPastoralEvents
      summary: 'Pastoral: Get list of Events'
      tags:
        - Pastoral
      security:
        - OAuth:
            - wellbeing.event.event.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventType'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Category'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventStatus'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Severity'
        - $ref: '#/components/parameters/Query.Global.FilterLastUpdated'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Pastoral.Events.Sort'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.AssignedTo'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.IncludePastStudents'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.WellbeingEvent'
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.Core'
  /v2/pastoral/events:
    get:
      description: Get list of Pastoral Events
      operationId: GetlistofPastoralEventsV2
      summary: 'Pastoral: Get list of Events'
      tags:
        - Pastoral
      security:
        - OAuth:
            - wellbeing.event.event.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventType'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Category'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventStatus'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Severity'
        - $ref: '#/components/parameters/Query.Global.FilterLastUpdated'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Pastoral.Events.Sort'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.AssignedTo'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.IncludePastStudents'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.WellbeingEvent.v2'
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.Core.v2'
  /v1/pastoral/events-summary:
    get:
      description: Get summary of Pastoral Events
      operationId: GetSummaryOfPastoralEvents
      summary: 'Pastoral: Get summary of Events'
      tags:
        - Pastoral
      security:
        - OAuth:
            - wellbeing.event.event
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventType'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Category'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventStatus'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Severity'
        - $ref: '#/components/parameters/Query.Global.FilterLastUpdated'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.AssignedTo'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.IncludePastStudents'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    category:
                      $ref: '#/components/schemas/Data.KeyColorValue'
                    event_count:
                      type: integer
  /v1/pastoral/events/{id}:
    get:
      description: Get Pastoral Event
      operationId: GetPastoralEvent
      summary: 'Pastoral: Get single Event'
      tags:
        - Pastoral
      security:
        - OAuth:
            - wellbeing.event.event.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/Pastoral.Events.EventDetail.WellbeingEvent'
                    - $ref: '#/components/schemas/Pastoral.Events.EventDetail.WellbeingPlan'
        '404':
          description: Event not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/pastoral/events/{id}/girfec-shanarri-items:
    get:
      operationId: getPastoralEventGirfecShanarriItems
      tags:
        - Pastoral
      summary: 'GIRFEC SHANARRI Items: Get List of SHANARRI Items by Pastoral Event Id'
      security:
        - OAuth:
            - wellbeing.event.girfec.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Pastoral Event - List of GIRFEC SHANARRI Items
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pastoral.Events.GirfecShanarriItem'
        '404':
          description: GIRFEC SHANARRI Items not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/pastoral/events/{id}/linked-items:
    get:
      operationId: getPastoralEventLinkedItems
      tags:
        - Pastoral
      summary: 'Linked Items: Get List of linked items by Pastoral Event Id'
      security:
        - OAuth:
            - wellbeing.event.linked-items.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Pastoral Event - List of Linked Items
          content:
            application/json:
              schema:
                type: array
                items:
                  oneOf:
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.Core'
                    - $ref: '#/components/schemas/Pastoral.Events.EventList.WellbeingEvent'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/pastoral/data/girfec-named-persons:
    get:
      operationId: getGirfecYearGroupNamedPersons
      tags:
        - Pastoral
      summary: 'GIRFEC Data: get year groups named persons'
      security:
        - OAuth:
            - settings.modules.wellbeing.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of year group named persons
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pastoral.Data.Girfec'
  /v1/school/{academicYearId}/departments:
    get:
      description: Get list of school Departments
      operationId: GetlistofschoolDepartments
      summary: 'Departments: Get list'
      deprecated: true
      tags:
        - Academic Structure
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.Department.DepartmentDetail'
  /v2/school/{academicYearId}/departments:
    get:
      description: Get list of school Departments
      operationId: GetlistofschoolDepartmentsV2
      summary: 'Departments: Get list'
      tags:
        - Academic Structure
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AcademicStructure.DepartmentListing.v2'
  /v1/school/{academicYearId}/departments/{id}:
    get:
      description: Get a Department
      operationId: GetaDepartment
      summary: 'Departments: Get one'
      deprecated: true
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.Department.DepartmentDetail'
        '404':
          description: Department Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v2/school/{academicYearId}/departments/{id}:
    get:
      description: Get a Department
      operationId: GetaDepartmentV2
      summary: 'Departments: Get one'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcademicStructure.Department.v2'
        '404':
          description: Department Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/extra-curricular:
    get:
      description: Get list of Extra Curricular Activities in an Academic Year
      summary: 'Extra Curricular Activity: Get list for an Academic Year'
      operationId: GetlistofExtraCurricularActivitiesinanAcademicYear
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.ExtraCurricularActivity'
        '404':
          description: Academic Year Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/extra-curricular/{id}:
    get:
      description: Get an Extra Curricular Activity in an Academic Year
      summary: 'Extra Curricular Activity: Get one in an Academic Year'
      operationId: GetanExtraCurricularActivityinanAcademicYear
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.ExtraCurricularActivity'
        '404':
          description: Extra Curricular Activity Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/forms:
    get:
      description: Get list of School Forms in an Academic Year
      summary: 'Form Group: Get list for Academic Year'
      operationId: GetlistofSchoolFormsinanAcademicYear
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Query.School.AcademicYearId.Forms.Sort'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.Form'
        '404':
          description: Academic Year Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/forms/{id}:
    get:
      description: Get a School Form in an Academic Year
      summary: 'Form Group: Get one in an Academic Year'
      operationId: GetaSchoolForminanAcademicYear
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.Form'
        '404':
          description: Form Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/forms/{id}/students:
    get:
      description: List Students for Form Group
      summary: 'Form Group: Get list of Students'
      operationId: GetListOfStudentsforFormGroup
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.Listing'
        '404':
          description: Form Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/sections:
    get:
      description: Get list of School Sections
      summary: 'Sections: Get list'
      operationId: GetlistofSchoolSections
      deprecated: true
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.School.Sections.Sort'
        - $ref: '#/components/parameters/Query.Global.Filter.OwnerGroupType'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.Section'
  /v2/school/sections:
    get:
      description: Get list of School Sections
      summary: 'Sections: Get list'
      operationId: GetlistofSchoolSectionsV2
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.School.Sections.Sort'
        - $ref: '#/components/parameters/Query.Global.Filter.OwnerGroupType'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
      responses:
        '200':
          description: OK
          headers:
            X-Total-Count:
              schema:
                type: integer
              description: The number of records in this dataset
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AcademicStructure.SectionListing.v2'
  /v1/school/sections/{id}:
    get:
      description: Get a School Section
      operationId: GetaSchoolSection
      summary: 'Sections: Get one'
      deprecated: true
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.Section'
        '404':
          description: Section Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/subjects:
    get:
      description: Get list of school Subjects
      operationId: GetlistofschoolSubjects
      deprecated: true
      summary: 'Subjects: Get list'
      tags:
        - Academic Structure
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterDepartment'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.Subject.SubjectList'
  /v2/school/{academicYearId}/subjects:
    get:
      description: Get list of school Subjects
      operationId: GetlistofschoolSubjectsV2
      summary: 'Subjects: Get list'
      tags:
        - Academic Structure
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterDepartment'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AcademicStructure.SubjectListing.v2'
              examples:
                List of Subjects:
                  value:
                    - id: 33
                      code: MATH
                      color_option: 1
                      department:
                        id: 1
                        name: Maths Department
                      name: Maths
                      subject_heads:
                        - id: 137
                          first_name: Bob
                          middle_name: null
                          name_in_local_language: null
                          last_name: Bobbington
                          preferred_name: null
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                          status: current
  /v1/school/{academicYearId}/subjects/{id}:
    get:
      description: Get a Subject
      operationId: GetaSubject
      deprecated: true
      summary: 'Subjects: Get one'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.Subject.SubjectDetail'
        '404':
          description: Subject Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v2/school/{academicYearId}/subjects/{id}:
    get:
      description: Get a Subject
      operationId: GetaSubjectV2
      summary: 'Subjects: Get one'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcademicStructure.Subject.v2'
              examples:
                Subject detail:
                  value:
                    id: 33
                    academic_year:
                      id: 1
                      description: 2021-22 Academic Year
                    alternative_name: null
                    code: MATH
                    department:
                      id: 1
                      name: Maths Department
                    name: Maths
                    can_copy: false
                    subject_heads:
                      - section:
                          id: 1
                          name: Whole School
                        section_heads:
                          - id: 137
                            first_name: Bob
                            middle_name: null
                            name_in_local_language: null
                            last_name: Bobbington
                            preferred_name: null
                            title:
                              id: 1
                              name: Mr
                            person_type: staff
                            status: current
                            job_title: Teacher
                            sections:
                              - id: 1
                                name: Whole School
                            departments:
                              - id: 1
                                name: Maths Department
                            subjects:
                              - id: 2
                                name: History
                            positions:
                              - id: 654
                                name: Some name
                            images:
                              - type: thumbnail
                                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                            gender:
                              id: 2
                              name: Male
        '404':
          description: Subject Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/subject-sets:
    get:
      deprecated: true
      description: Get list of Subject Sets in an Academic Year
      operationId: GetlistofSubjectSetsinanAcademicYear
      summary: 'Subject Sets: Get list for an Academic Year'
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Query.Global.FilterSubject'
        - $ref: '#/components/parameters/Query.School.AcademicYearId.SubjectSets.Sort'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.SubjectSet'
        '404':
          description: Academic Year Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v2/school/{academicYearId}/subject-sets:
    get:
      description: Get list of Subject Sets in an Academic Year
      operationId: get-api-v2-school-subject-sets
      summary: Get list of Subject Sets in an Academic Year
      tags:
        - Academic Structure
      externalDocs:
        description: Requirements covered in HUB-10619
        url: https://schoolkompanion.atlassian.net/browse/HUB-10619
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.SubjectSet.Listing.v2'
              examples:
                Subject Set item in listing:
                  value:
                    - type: subject_set
                      code: XYZ
                      max_students: 100
                      name: Future FR
                      rooms:
                        - id: 654
                          code: YR7
                      staff:
                        - id: 137
                          first_name: Bob
                          middle_name: null
                          name_in_local_language: null
                          last_name: Johnson
                          preferred_name: null
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                          status: current
                      student_count: 100
                      id: 1
                      credit_score: 25.75
                      section:
                        id: 654
                        name: Senior school
                      subject:
                        id: 14
                        name: Geography
                      year_group:
                        id: 7
                        name: Year 9
        '400':
          description: Bad Request
        '404':
          description: Academic Year Not Found
      parameters:
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Query.Global.FilterSubject'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - name: sort
          description: Sort records by given sort field, e.g. sort[field]=asc
          in: query
          style: deepObject
          explode: true
          required: false
          schema:
            type: object
            oneOf:
              - $ref: '#/components/schemas/Parameter.Sort.Code'
              - $ref: '#/components/schemas/Parameter.Sort.CreditScore'
              - $ref: '#/components/schemas/Parameter.Sort.MaxStudents'
              - $ref: '#/components/schemas/Parameter.Sort.Name'
              - $ref: '#/components/schemas/Parameter.Sort.Section'
              - $ref: '#/components/schemas/Parameter.Sort.StudentCount'
              - $ref: '#/components/schemas/Parameter.Sort.Subject'
              - $ref: '#/components/schemas/Parameter.Sort.YearGroup'
  /v1/school/{academicYearId}/subject-sets/{id}:
    get:
      description: Get a Subject Set in an Academic Year
      operationId: GetaSubjectSetinanAcademicYear
      summary: 'Subject Sets: Get one in an Academic Year'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.SubjectSet'
        '404':
          description: Subject Set Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/subject-sets/{id}/students:
    get:
      description: List Students for Subject Set
      operationId: GetListOfStudentsforSubjectSet
      summary: 'Subject Sets: Get list of Students for a Subject Set'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Student.Listing'
                    - type: object
                      properties:
                        other_sets_within_subject:
                          type: array
                          items:
                            $ref: '#/components/schemas/Data.KeyValue'
        '404':
          description: Subject Set Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/tutor-groups:
    get:
      description: Get list of Tutor Groups in an Academic Year
      operationId: GetlistofTutorGroupsinanAcademicYear
      summary: 'Tutor Groups: Get list for an Academic Year'
      tags:
        - Academic Structure
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Query.School.AcademicYearId.TutorGroups.Sort'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.TutorGroup'
        '404':
          description: Academic Year Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/tutor-groups/{id}:
    get:
      description: Get a Tutor Group in an Academic Year
      operationId: GetaTutorGroupinanAcademicYear
      summary: 'Tutor Groups: Get one in an Academic Year'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.TutorGroup'
        '404':
          description: Tutor Group Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/tutor-groups/{id}/students:
    get:
      description: List Students for Tutor Group
      operationId: GetListOfStudentsforTutorGroup
      summary: 'Tutor Groups: Get list of Students in a Tutor Group'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Student.Listing'
                    - type: object
                      properties:
                        tutor_group:
                          type: object
                          $ref: '#/components/schemas/School.Academic.TutorGroupList'
        '404':
          description: Tutor Group Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/year-groups:
    get:
      description: Get list of school Year Groups for this Academic Year
      operationId: GetlistofschoolYearGroupsforthisAcademicYear
      summary: 'Year Groups: Get list for an Academic Year'
      tags:
        - Academic Structure
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Query.School.AcademicYearId.YearGroups.Sort'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.YearGroup'
        '404':
          description: Academic Year Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/{academicYearId}/year-groups/{id}:
    get:
      description: Get a Year Group in an Academic Year
      operationId: GetaYearGroupinanAcademicYear
      summary: 'Year Groups: Get one in an Academic Year'
      tags:
        - Academic Structure
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Academic.YearGroup'
        '404':
          description: Year Group Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/academic-years:
    get:
      description: List all Academic Years for a school
      operationId: listAllAcademicYearsforaschool
      summary: 'Academic Years: Get list'
      tags:
        - School
        - Settings
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Academic.Year'
  /v1/school/academic-years/{academicYearId}/holidays:
    get:
      description: Get list of Holidays in an Academic Year
      operationId: GetlistofHolidaysinanAcademicYear
      summary: 'Holidays: List all in an Academic Year'
      tags:
        - School
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.DateRange'
        '404':
          description: Academic Year not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/academic-years/{academicYearId}/inset-days:
    get:
      description: Get list of Inset Days in an Academic Year
      operationId: GetlistofInsetDaysinanAcademicYear
      summary: 'Inset Days: Get list for an Academic Year'
      tags:
        - School
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Date'
        '404':
          description: Academic Year not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/academic-years/{academicYearId}/terms:
    get:
      description: Get list of Terms in an Academic Year
      operationId: GetlistofTermsinanAcademicYear
      summary: 'Terms: Get list for an Academic Year'
      tags:
        - School
        - Settings
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.DateRange'
        '404':
          description: Academic Year not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/academic-years/{academicYearId}/closure-dates:
    get:
      description: Get list of Closure Dates in an Academic Year
      operationId: GetlistofClosureDatesinanAcademicYear
      summary: 'Closure Dates: List all in an Academic Year'
      tags:
        - School
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.AcademicYear.Id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.DateRange'
        '404':
          description: Academic Year not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/data/locations:
    get:
      operationId: getLocations
      description: 'Locations: Get All'
      tags:
        - School
        - Data
      summary: 'Locations: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Locations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/school/data/rooms:
    get:
      operationId: getRooms
      description: 'Rooms: Get All'
      tags:
        - School
        - Data
      summary: 'Rooms: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.School.Rooms.Filter.Location'
      responses:
        '200':
          description: List of Rooms
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/School.Data.Room'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/school/data/rooms/{id}:
    get:
      operationId: getRoomById
      description: 'Rooms: Get one'
      tags:
        - School
        - Data
      summary: 'Room: Get One'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Room
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.Data.Room'
        '404':
          description: Room not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/school/group-types:
    get:
      operationId: getGroupTypes
      description: 'Group Types: Get All'
      tags:
        - School
      summary: 'Group Types: Get List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Group Types
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    value:
                      type: string
                      enum:
                        - subject_set
                        - form
                        - year_group
                        - tutor_group
                      example: subject_set
                    label:
                      type: string
                      enum:
                        - subject_set
                        - form
                        - year_group
                        - tutor_group
                      example: subject_set
  /v1/school/regional-settings:
    get:
      operationId: getRegionalSettings
      tags:
        - School
      summary: School regional default settings
      security:
        - OAuth:
            - settings.school-definition.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: School regional default settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.RegionalSettings'
  /v1/settings/learning-support/terminology:
    get:
      operationId: getLearningSupportTerminology
      tags:
        - Learning Support
      summary: Learning Support terminology - terms selected that describes Learning Support for current school
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: Learning Support terminology
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Data.KeyValue'
  /v1/settings/school/communication-details:
    get:
      operationId: getSchoolCommunicationDetails
      tags:
        - Data
      summary: School Communication Details
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: School Communication Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/School.CommunicationDetails'
  /v1/staff:
    get:
      operationId: getStaffList
      tags:
        - Staff
      summary: 'Staff: Get List'
      description: Get a collection of Staff records. Requires `staff.current.overview.name-details.read`, `staff.past.read` scopes for basic call, or each individual scope if filtering by `status` = 'current' or 'past' respectively
      security:
        - OAuth:
            - staff.current.overview.name-details.read
            - staff.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Global.FilterDepartment'
        - $ref: '#/components/parameters/Query.Global.FilterSection'
        - $ref: '#/components/parameters/Parameter.Global.FilterStatus'
        - $ref: '#/components/parameters/Query.Global.FilterSubject'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Global.FilterSubjectSet'
        - $ref: '#/components/parameters/Query.Global.FilterTutorGroup'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.Filter.Gender'
        - $ref: '#/components/parameters/Query.Staff.Sort'
        - $ref: '#/components/parameters/Parameter.Global.AssessmentCreation'
      responses:
        '200':
          description: List of Staff
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Staff.Listing'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/staff/{id}:
    get:
      operationId: getOneStaff
      tags:
        - Staff
      summary: 'Staff: Get One Staff'
      security:
        - OAuth:
            - staff.current.overview.name-details.read
            - staff.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff'
        '403':
          description: If staff is Past Staff and user doesn't have Past Staff scope, they cannot fetch this Staff
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/academic-structure:
    get:
      operationId: fetchAcademicStructureForStaff
      tags:
        - Academic Structure
      summary: Fetch Academic Structure Data For Staff
      security:
        - OAuth:
            - staff.current.class.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Academic Relevant Data
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/School.Academic.ExtraCurricularActivityList'
                    - $ref: '#/components/schemas/School.Academic.FormList'
                    - $ref: '#/components/schemas/School.Academic.TutorGroupList'
                    - $ref: '#/components/schemas/School.Academic.SubjectSetList'
  /v1/staff/{id}/academic-leadership:
    get:
      operationId: fetchAcademicLeadershipForStaff
      tags:
        - Academic Structure
      summary: Fetch Academic Leadership Data For Staff
      security:
        - OAuth:
            - staff.current.class.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Academic Leadership Data
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/School.Academic.Section'
                    - $ref: '#/components/schemas/School.Academic.YearGroup'
                    - $ref: '#/components/schemas/School.Academic.Department.DepartmentList'
                    - $ref: '#/components/schemas/School.Academic.Subject.SubjectList'
  /v1/staff/{id}/academic-leadership-classes:
    get:
      operationId: fetchAcademicLeadershipClassesForStaff
      tags:
        - Academic Structure
      summary: Fetch classes for which the staff member is a leader of
      security:
        - OAuth:
            - staff.current.class.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Academic Leadership Data
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/School.Academic.ExtraCurricularActivity'
                    - $ref: '#/components/schemas/School.Academic.Form'
                    - $ref: '#/components/schemas/School.Academic.TutorGroup'
                    - $ref: '#/components/schemas/School.Academic.SubjectSet'
  /v1/staff/{id}/addresses:
    get:
      operationId: getStaffAddresses
      tags:
        - Staff
        - Address
      summary: Get list of Address Mappings for a Staff
      security:
        - OAuth:
            - staff.current.contact-details.addresses.read
            - staff.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Address Mappings for Staff
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AddressMapping'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/addresses/{mappingId}:
    get:
      operationId: getOneAddressMappingForStaffMember
      tags:
        - Staff
        - Address
      summary: Get one Address Mapping for a staff member
      security:
        - OAuth:
            - staff.current.contact-details.addresses.read
            - staff.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Parameter.Address.MappingId'
      responses:
        '200':
          description: 'Single Staff - Single Address: Address Mapping data'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressMapping'
        '404':
          description: Address Mapping not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/contact-details:
    get:
      operationId: getStaffContactDetails
      tags:
        - Staff
      summary: 'Staff Contact Details: Get for Staff Member'
      description: Get contact detail information for a Staff member.
      security:
        - OAuth:
            - staff.current.contact-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Emergency Contact Details for Staff
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff.ContactDetails'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/email-addresses:
    get:
      operationId: getStaffEmailAddressesById
      tags:
        - Staff
      summary: 'Emails: Get List of Email Addresses by staff Id'
      security:
        - OAuth:
            - staff.current.contact-details.email.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Staff - List of Email Addresses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailAddress'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/employment-details:
    get:
      operationId: getStaffEmploymentDetails
      tags:
        - Staff
      summary: 'Staff: Get Staff Employment Details'
      security:
        - OAuth:
            - staff.current.overview.employment-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff Employment Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff.EmploymentDetails'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/further-details:
    get:
      operationId: getStaffFurtherDetails
      tags:
        - Staff
      summary: 'Staff: Get Staff Further Details'
      security:
        - OAuth:
            - staff.current.overview.further-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff Further Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff.FurtherDetails'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/personal-details:
    get:
      operationId: getStaffPersonalDetails
      tags:
        - Staff
      summary: 'Staff: Get Staff Personal Details'
      security:
        - OAuth:
            - staff.current.overview.personal-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff Personal Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff.PersonalDetails'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/phones:
    get:
      operationId: getStaffPhonesById
      tags:
        - Staff
      summary: 'Phones: Get List of Phones by Staff Id'
      security:
        - OAuth:
            - staff.current.contact-details.phone.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Staff - List of Phones
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PhoneNumber'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/{id}/timetable:
    get:
      operationId: fetchTimetableForStaff
      tags:
        - Timetable Views
      summary: 'Staff: Get Timetable'
      description: Fetch collection of Timetable Periods that the Staff member is allocated against
      security:
        - OAuth:
            - staff.current.timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Fixed Timetable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timetable.Person'
  /v1/staff/{id}/timetable/calendar:
    get:
      operationId: fetchTimetableCalendarForStaff
      tags:
        - Timetable Views
      summary: 'Staff: Fetch Timetable Calendar'
      security:
        - OAuth:
            - staff.current.timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.TimetableCalendar.DateFrom'
        - $ref: '#/components/parameters/Query.TimetableCalendar.DateTo'
        - $ref: '#/components/parameters/Query.Global.Date'
      responses:
        '200':
          description: Calendar Based Timetable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timetable.Calendar.Person'
  /v1/staff/{id}/working-hours:
    get:
      operationId: getStaffWorkingTimes
      tags:
        - Staff
      summary: 'Staff: Get a list of days and working times for a staff member'
      security:
        - OAuth:
            - staff.current.working-hours.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff working times
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Staff.WorkingHours'
        '404':
          description: Staff not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/staff/data/contract-types:
    get:
      operationId: getStaffContractTypes
      tags:
        - Staff
      summary: 'Staff Contract Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Staff Contract Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this data set
              schema:
                type: integer
  /v1/staff/data/positions:
    get:
      operationId: getStaffPositions
      tags:
        - Staff
      summary: 'Staff Positions: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Staff Positions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this data set
              schema:
                type: integer
  /v1/staff/data/working-hours:
    get:
      summary: 'Staff Default Working Hours: List'
      description: Get a list of the default working hours that a Staff member will have if no overrides have been set
      operationId: getStaffDefaultWorkingHours
      tags:
        - Settings
      security:
        - OAuth:
            - settings.modules
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of working hours of staff
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Staff.Data.DefaultWorkingHours'
  /v1/staff/{id}/school-details:
    get:
      operationId: getStaffSchoolDetails
      tags:
        - Staff
      summary: 'Staff: Get Staff School Details'
      security:
        - OAuth:
            - staff.current.overview.school-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Staff School Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Staff.SchoolDetails'
        '404':
          description: Staff not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/academic-structure:
    get:
      operationId: fetchClassesForStudent
      tags:
        - Academic Structure
      summary: 'Student: Fetch Academic Structure Data For Students'
      security:
        - OAuth:
            - students.current.class.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Academic Relevant Data
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - $ref: '#/components/schemas/School.Academic.ExtraCurricularActivityList'
                    - $ref: '#/components/schemas/School.Academic.FormList'
                    - $ref: '#/components/schemas/School.Academic.TutorGroupList'
                    - $ref: '#/components/schemas/School.Academic.SubjectSetList'
  /v1/students/{id}/email-addresses:
    get:
      operationId: getStudentEmailAddressesById
      tags:
        - Students
      summary: 'Email Addresses: Get List of Email Addresses by student Id'
      security:
        - OAuth:
            - students.current.contact-details.email.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - List of Email Addresses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailAddress'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/progress-reports:
    get:
      operationId: getStudentProgressReportsById
      tags:
        - Students
      summary: Get List of Progress Reports by student Id
      security:
        - OAuth:
            - students.current.overview.widget-progress-reports.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - List of Progress Reports
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.ProgressReport'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/timetable:
    get:
      operationId: fetchTimetableForStudent
      tags:
        - Timetable Views
      summary: 'Student: Get Timetable'
      description: Fetch collection of Timetable Periods that the Student is allocated against
      security:
        - OAuth:
            - students.current.timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Fixed Timetable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timetable.Person'
  /v1/students/{id}/timetable/calendar:
    get:
      operationId: fetchTimetableCalendarForStudent
      tags:
        - Timetable Views
      summary: 'Students: Fetch Timetable Calendar'
      security:
        - OAuth:
            - students.current.timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.TimetableCalendar.DateFrom'
        - $ref: '#/components/parameters/Query.TimetableCalendar.DateTo'
        - $ref: '#/components/parameters/Query.Global.Date'
      responses:
        '200':
          description: Calendar Based Timetable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timetable.Calendar.Person'
  /v1/students/{id}/wellbeing-plans:
    get:
      description: Get Student Wellbeing Plan
      operationId: GetStudentWellbeingPlan
      summary: 'Student: Get list of Wellbeing Plans for a specific Student'
      tags:
        - Students
      security:
        - OAuth:
            - students.current.wellbeing.plans.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.AssignedTo'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Category'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventStatus'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Severity'
        - $ref: '#/components/parameters/Query.Global.FilterLastUpdated'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.WellbeingPlan'
        '404':
          description: Student not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/wellbeing-events:
    get:
      description: Get Student Wellbeing Events
      operationId: GetStudentWellbeingEvent
      summary: 'Student: Get list of Wellbeing Events for a specific Student'
      tags:
        - Students
      security:
        - OAuth:
            - students.current.wellbeing.events.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.AssignedTo'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Category'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.EventStatus'
        - $ref: '#/components/parameters/Query.Pastoral.Filter.Severity'
        - $ref: '#/components/parameters/Query.Global.FilterLastUpdated'
        - $ref: '#/components/parameters/Parameter.Global.Search'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.WellbeingPlan'
        '404':
          description: Student not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts:
    get:
      operationId: getContacts
      tags:
        - Students
        - Contacts
      summary: 'Contacts: Get List'
      security:
        - OAuth:
            - students.contacts.overview.name-details.read
            - students.current.overview.name-details.read
            - students.current.overview.personal.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Parameter.Global.FilterStatus'
      responses:
        '200':
          description: List of Contacts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Contact.Listing'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/contacts/{id}:
    get:
      operationId: getContact
      tags:
        - Contacts
      summary: 'Contacts: Get Contact'
      security:
        - OAuth:
            - students.contacts.overview.name-details.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Contact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Contact'
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/students-relations:
    get:
      operationId: getContactStudentsRelations
      tags:
        - Students
      summary: 'Contact Students Relations: Get List'
      security:
        - OAuth:
            - students.contacts.students.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Students Relations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Contact.Student.Relation'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/email-addresses:
    get:
      operationId: getContactEmailAddressesById
      tags:
        - Students
      summary: 'Email Addresses: Get List of Email Addresses by contact Id'
      security:
        - OAuth:
            - students.contacts.contact-details.email.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Contact - List of Email Addresses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailAddress'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/phones:
    get:
      operationId: getContactPhonesById
      tags:
        - Students
      summary: 'Phones: Get List of Phones by contact Id'
      security:
        - OAuth:
            - students.contacts.contact-details.phone.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Contact - List of Phones
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PhoneNumber'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/communication-preferences:
    get:
      operationId: getContactCommunicationPreferencesById
      tags:
        - Students
      summary: 'Communication Preferences: Get List of Communication Preferences by contact Id'
      security:
        - OAuth:
            - students.contacts.contact-details.communication-preferences.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Contact - List of Students with Communication Preferences
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Contact.CommunicationPreferences'
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/consent:
    get:
      operationId: getConsent
      tags:
        - Contacts
      summary: 'Contacts: Get contact consent'
      security:
        - OAuth:
            - students.contacts.contact-details.consent.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Contact - consent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Contact.Consent'
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/houses:
    get:
      operationId: getHouses
      tags:
        - Students
      summary: 'Houses: Get Houses'
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Students.Houses.Filter.HouseType'
        - $ref: '#/components/parameters/Query.Students.Houses.Filter.isActive'
      responses:
        '200':
          description: Houses
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.House.Listing'
  /v1/students/houses/{id}:
    get:
      operationId: getHouse
      tags:
        - Students
      summary: 'Houses: Get House'
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.AcademicYearId'
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: House
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.House'
        '404':
          description: House not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/houses/{id}/students:
    get:
      operationId: getHouseStudents
      tags:
        - Students
      summary: 'House: Get Students'
      description: This call will provide currently enrolled students (enrolment status 'current')
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Header.AcademicYearId'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Global.Filter.Gender'
        - $ref: '#/components/parameters/Query.Students.Filter.BoardingType'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Students.Sort'
      responses:
        '200':
          description: Students
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.Listing'
        '400':
          description: Academic Year header not supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
        '404':
          description: House not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/houses-summary:
    get:
      operationId: getHousesSummary
      tags:
        - Students
      summary: 'Houses: Get Houses Summary'
      security:
        - OAuth:
            - settings.school-structure.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Students.Houses.Filter.HouseType'
        - $ref: '#/components/parameters/Query.AcademicYear.Id'
      responses:
        '200':
          description: Houses Summary
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.HouseSummary.Listing'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/boarding-types:
    get:
      operationId: getBoardingTypes
      tags:
        - Students
      summary: 'Boarding Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Boarding Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/schools-and-colleges/education-types:
    get:
      operationId: getEducationTypes
      tags:
        - Students
      summary: 'Education Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Education Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/schools-and-colleges/categories:
    get:
      operationId: getSchoolAndCollegeCategories
      tags:
        - Students
      summary: 'School & College Categories: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of School & College Categories
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Data.LookupTableValue'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/schools-and-colleges:
    get:
      operationId: getSchoolsAndColleges
      tags:
        - Students
      summary: 'Schools & Colleges: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Schools & Colleges
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Data.SchoolAndCollege'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/relationship-groups:
    get:
      operationId: getRelationshipGroups
      tags:
        - Students
      summary: 'Relationship Groups: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
      responses:
        '200':
          description: List of Relationship Groups
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Data.RelationshipGroup'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/data/relationship-types:
    get:
      operationId: getRelationshipTypes
      tags:
        - Students
      summary: 'Relationship Types: List'
      security:
        - OAuth: []
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
      responses:
        '200':
          description: List of Relationship Types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Data.RelationshipType'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/past:
    get:
      operationId: getStudentsPast
      tags:
        - Students
      summary: 'Students: Get Students Past List'
      security:
        - OAuth:
            - students.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Global.Filter.Gender'
        - $ref: '#/components/parameters/Parameter.Global.FilterDestinationSchool'
      responses:
        '200':
          description: List of Past Students
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.Listing.Past'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students:
    get:
      operationId: getStudents
      tags:
        - Students
      summary: 'Students: Get List'
      description: Get a collection of Student records. Requires `students.current.overview.name-details.read`, `students.current.overview.personal.read`, `students.past.read` and `students.admissions.admissions.read` scopes for basic call, `students.current.overview.name-details.read` & `students.current.overview.personal.read` if filtering `enrolmentStatus` by 'current', and `students.past.read` or `students.admissions.admissions.read` if filtering by 'past' or 'applicant' respectively
      security:
        - OAuth:
            - students.current.overview.name-details.read
            - students.current.overview.personal.read
            - students.admissions.admissions.read
            - students.past.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Header.AcademicYearId'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.Global.Filter.Gender'
        - $ref: '#/components/parameters/Parameter.Global.FilterAcademicYear'
        - $ref: '#/components/parameters/Query.Students.Filter.BoardingType'
        - $ref: '#/components/parameters/Query.Global.FilterForm'
        - $ref: '#/components/parameters/Query.Global.FilterYearGroup'
        - $ref: '#/components/parameters/Query.Global.FilterEnrolmentStatus'
        - $ref: '#/components/parameters/Query.Global.FilterHouse'
        - $ref: '#/components/parameters/Query.Global.FilterTutorGroup'
        - $ref: '#/components/parameters/Query.Students.Sort'
      responses:
        '200':
          description: List of Students
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.Listing'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/students/{id}/addresses:
    get:
      operationId: getStudentAddresses
      tags:
        - Students
        - Address
      summary: Get list of Address Mappings for a Student
      security:
        - OAuth:
            - students.current.contact-details.addresses.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Address Mappings for Student
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.AddressMapping.List'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}:
    get:
      operationId: getStudent
      tags:
        - Students
      summary: 'Students: Get Student'
      security:
        - OAuth:
            - students.current.overview.personal.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Header.AcademicYearId'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Student
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/address-relations:
    get:
      operationId: getStudentAddressesRelations
      tags:
        - Students
        - Address
        - Relations
      summary: Get a list of related records/addresses for a student
      security:
        - OAuth:
            - students.current.contact-details.addresses.read
            - students.contacts.contact-details.addresses.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Addresses and related records for these Addresses for a Student
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.AddressRelation'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/consent:
    get:
      operationId: getStudentConsentById
      tags:
        - Students
      summary: 'Students: Get consent data by student Id'
      security:
        - OAuth:
            - students.current.school.consent.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - Consent Data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student.Consent'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/destination:
    get:
      operationId: getStudentDestinationById
      tags:
        - Students
      summary: 'Students: Get destination data by student Id'
      security:
        - OAuth:
            - students.current.school.destination.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - Destination Data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student.Destination'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/enrolment:
    get:
      operationId: getStudentEnrolmentById
      tags:
        - Students
      summary: 'Students: Get enrolment data by student Id'
      security:
        - OAuth:
            - students.current.school.enrolment.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - Enrolment Data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student.Enrolment'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/learning-support:
    get:
      operationId: getStudentLearningSupportDataById
      tags:
        - Students
        - Learning Support
      summary: 'Students: Get Learning Support fields by student Id'
      security:
        - OAuth:
            - students.current.learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - Learning Support Field Data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student.LearningSupport'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/learning-support/reviews:
    get:
      operationId: getLearningSupportReviewsForSpecificStudent
      tags:
        - Students
        - Learning Support
      summary: 'Learning Support: Get List of Learning Support Reviews by student Id'
      description: Requires either one of the listed scopes
      security:
        - OAuth:
            - learning-support.read
            - students.current.learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.LearningSupport.Reviews.Sort'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.Status'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.ReviewType'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.StudentPresent'
      responses:
        '200':
          description: Single Student - List of Learning Support Reviews
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LearningSupport.Review'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/learning-support/records:
    get:
      operationId: getSenRecordsForSpecificStudent
      tags:
        - Students
        - Learning Support
      summary: 'Learning Support: Get List of Learning Support Records by student Id'
      description: Requires either one of the listed scopes
      security:
        - OAuth:
            - learning-support.read
            - students.current.learning-support.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Query.LearningSupport.Records.Sort'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.Status'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.Ehcp'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.Severity'
        - $ref: '#/components/parameters/Query.LearningSupport.Filter.Category'
      responses:
        '200':
          description: Single Student - List of Learning Support Records
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LearningSupport.Record'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/medical/doctor:
    get:
      operationId: getStudentMedicalById
      tags:
        - Students
      summary: 'Students: Get doctor information by student Id'
      security:
        - OAuth:
            - students.current.medical.doctor.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: Single Student - Doctor Data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Students.Student.Medical.Doctor'
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/students-relations:
    get:
      operationId: getStudentToStudentsRelationsById
      tags:
        - Students
        - Relations
      summary: 'Students to Students Relations: Get list by student id'
      security:
        - OAuth:
            - students.current.relations.siblings.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of siblings for a student
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Student.Student.Relation'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/{id}/contacts-relations:
    get:
      operationId: getStudentContactsRelations
      tags:
        - Students
      summary: 'Student Contacts Relations: Get List'
      security:
        - OAuth:
            - students.current.relations.contacts.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Contacts Relations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Student.Contact.Relation'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
        '404':
          description: Student not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/students/contacts/{id}/address-relations:
    get:
      operationId: getContactAddressesRelations
      tags:
        - Students
        - Contacts
        - Address
        - Relations
      summary: Get a list of related records/addresses for a contact
      security:
        - OAuth:
            - students.current.contact-details.addresses.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: List of Addresses and related records for these Addresses for a Contact
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Students.Contacts.AddressRelation'
        '404':
          description: Contact not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/timetable:
    get:
      operationId: getTimetableList
      tags:
        - Timetable Maintenance
      summary: 'Timetables: Get List'
      security:
        - OAuth:
            - timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.PageNumber'
        - $ref: '#/components/parameters/Parameter.Global.PageSize'
        - $ref: '#/components/parameters/Parameter.Global.Search'
        - $ref: '#/components/parameters/Parameter.Global.FilterAcademicYear'
      responses:
        '200':
          description: List of Timetables
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Timetable.Listing'
          headers:
            X-Total-Count:
              description: The number of records in this dataset
              schema:
                type: integer
  /v1/timetable/{id}:
    get:
      operationId: getTimetable
      tags:
        - Timetable Maintenance
      summary: 'Timetables: Get single Timetable'
      security:
        - OAuth:
            - timetable.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Parameter.Global.Id'
      responses:
        '200':
          description: A single Timetable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Timetable.TimetableDetail'
        '404':
          description: Timetable not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Api.Error'
  /v1/attendance/attendance-codes:
    get:
      operationId: getAttendanceCodes
      summary: Get all attendance codes
      description: 'Attendance: get all attendance codes'
      tags:
        - Attendance
      security:
        - OAuth:
            - settings.modules.attendance.read
            - attendance.take-attendance.read
            - students.current.attendance-new.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Attendance.Filter.Display'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attendance.Code'
  /v2/attendance/students/{id}:
    get:
      operationId: getAttendanceRecordsByStudentId
      summary: Get a list of student session attendance records
      description: 'Student attendance records: Get by student id'
      tags:
        - Attendance
      security:
        - OAuth:
            - students.current.attendance-new.read
      parameters:
        - $ref: '#/components/parameters/Parameter.Global.Id'
        - $ref: '#/components/parameters/Parameter.Header.Realm'
        - $ref: '#/components/parameters/Query.Attendance.Filter.Code'
        - $ref: '#/components/parameters/Query.Attendance.Filter.Session'
        - $ref: '#/components/parameters/Parameter.Global.FilterDateTimeFrom'
        - $ref: '#/components/parameters/Parameter.Global.FilterDateTimeTo'
        - $ref: '#/components/parameters/Query.Attendance.StudentRecords.Sort'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attendance.Student.Summary.v2'
        '404':
          description: Not Found
  /v1/token:
    post:
      operationId: postToken
      tags:
        - Token
      summary: Get access token
      description: Get an access token with the client_credentials grant
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                client_id:
                  type: string
                  example: abc123XYZ
                client_secret:
                  type: string
                  example: Secret123
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                    example: 900
                  access_token:
                    type: string
                    example: abc123.xyz
        '401':
          description: Invalid Credentials/token expired
        '403':
          description: No School Access for application, either application access has been suspended or the school has a locked account.
components:
  securitySchemes:
    OAuth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.hubmis.com/api/v1/token
          scopes:
            admissions.interest.read: admissions.interest.read
            learning-support.read: learning-support.read
            staff.current.overview.employment-details.read: staff.current.overview.employment-details.read
            staff.current.overview.further-details.read: staff.current.overview.further-details.read
            staff.current.overview.personal-details.read: staff.current.overview.personal-details.read
            staff.current.overview.name-details.read: staff.current.overview.name-details.read
            staff.current.overview.school-details.read: staff.current.overview.school-details.read
            staff.addresses.read: staff.addresses.read
            staff.current.working-hours.read: staff.current.working-hours.read
            staff.current.class.read: staff.current.class.read
            staff.current.contact-details.addresses.read: staff.current.contact-details.addresses.read
            staff.current.contact-details.phone.read: staff.current.contact-details.phone.read
            staff.current.contact-details.email.read: staff.current.contact-details.email.read
            staff.current.contact-details.personal.read: staff.current.contact-details.personal.read
            staff.current.timetable.read: staff.current.timetable.read
            staff.past.read: staff.past.read
            settings.modules.wellbeing.read: settings.modules.wellbeing.read
            settings.school-definition.read: settings.school-definition.read
            settings.school-structure.read: settings.school-structure.read
            students.past.read: students.past.read
            students.current.contact-details.addresses.read: students.current.contact-details.addresses.read
            students.current.contact-details.email.read: students.current.contact-details.email.read
            students.current.contact-details.phone.read: students.current.contact-details.phone.read
            students.current.overview.widget-progress-reports.read: students.current.overview.widget-progress-reports.read
            students.current.school.application.read: students.current.school.application.read
            students.current.school.consent.read: students.current.school.consent.read
            students.current.school.destination.read: students.current.school.destination.read
            students.current.school.enrolment.read: students.current.school.enrolment.read
            students.current.class.read: students.current.class.read
            students.current.learning-support.read: students.current.learning-support.read
            students.current.medical.doctor.read: students.current.medical.doctor.read
            students.current.overview.name-details.read: students.current.overview.name-details.read
            students.current.overview.personal.read: students.current.overview.personal.read
            students.pastoral.read: students.pastoral.read
            students.current.timetable.read: students.current.timetable.read
            students.contacts.contact-details.addresses.read: students.contacts.contact-details.addresses.read
            students.contacts.contact-details.communication-preferences.read: students.contacts.contact-details.communication-preferences.read
            students.contacts.contact-details.consent.read: students.contacts.contact-details.consent.read
            students.contacts.contact-details.email.read: students.contacts.contact-details.email.read
            students.contacts.contact-details.phone.read: students.contacts.contact-details.phone.read
            students.contacts.overview.name-details.read: students.contacts.overview.name-details.read
            students.contacts.students.read: students.contacts.students.read
            students.current.relations.read: students.current.relations.read
            students.current.relations.contacts.read: students.current.relations.contacts.read
            students.current.relations.siblings.read: students.current.relations.siblings.read
            students.current.wellbeing.events.read: students.current.wellbeing.events.read
            students.current.wellbeing.plans.read: students.current.wellbeing.plans.read
            timetable.read: timetable.read
            wellbeing.event.read: wellbeing.event.read
            wellbeing.event.event.read: wellbeing.event.event.read
            wellbeing.event.girfec.read: wellbeing.event.girfec.read
            wellbeing.event.linked-items.read: wellbeing.event.linked-items.read
            wellbeing.plan.plan.read: wellbeing.plan.plan.read
            wellbeing.plan.girfec.read: wellbeing.plan.girfec.read
            wellbeing.plan.linked-items.read: wellbeing.plan.linked-items.read
  parameters:
    Parameter.Header.Realm:
      name: realm
      description: Realm ID
      in: header
      required: true
      example: S999
      schema:
        type: string
      style: simple
    Parameter.UserType.Type:
      name: userType
      description: User type
      in: path
      required: true
      schema:
        type: string
        enum:
          - student
          - staff
          - contact
      style: simple
    Query.CustomFields.Group.Id:
      name: groupId
      description: ID of the Custom Fields Group
      in: query
      required: true
      schema:
        type: integer
        format: int32
    Parameter.Global.Id:
      name: id
      description: Integer ID of record
      in: path
      required: true
      schema:
        type: integer
      style: simple
      example: 1
    Parameter.Global.PageNumber:
      name: page[number]
      description: Number of page of recordset
      in: query
      schema:
        type: integer
    Parameter.Global.PageSize:
      name: page[size]
      description: Number of records in recordset
      in: query
      schema:
        type: integer
    Query.Global.FilterYearGroup:
      name: filter[yearGroup]
      description: Filter the results by YearGroup ID
      in: query
      required: false
      schema:
        type: integer
    Parameter.Global.Search:
      name: search
      description: API Query Search
      in: query
      required: false
      schema:
        type: string
    Query.LearningSupport.Records.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              learningSupportType:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              description:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              severity:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              ehcp:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              status:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              learningSupportDate:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              yearGroup:
                type: string
                enum:
                  - asc
                  - desc
    Parameter.PastoralCategory.Type:
      name: pastoralCategoryType
      description: Pastoral category type
      in: path
      required: true
      schema:
        type: string
        enum:
          - wellbeing_event
          - wellbeing_plan
      style: simple
    Parameter.Pastoral.Module:
      name: module
      description: Pastoral module
      in: path
      required: true
      schema:
        type: string
        enum:
          - wellbeing
      style: simple
    Query.Pastoral.Filter.EventType:
      name: filter[type]
      description: Filter results by Pastoral Event Type
      in: query
      required: false
      schema:
        type: string
        enum:
          - wellbeing_plan
          - wellbeing_event
    Query.Global.FilterForm:
      name: filter[form]
      description: Filter the results by Form ID
      in: query
      required: false
      schema:
        type: integer
    Query.Pastoral.Filter.Category:
      name: filter[category]
      description: Filter the table results by Category ID
      in: query
      required: false
      schema:
        type: integer
    Query.Pastoral.Filter.EventStatus:
      name: filter[status]
      description: Filter the table results by Status
      in: query
      required: false
      schema:
        type: string
        enum:
          - active
          - inactive
    Query.Pastoral.Filter.Severity:
      name: filter[severity]
      description: Filter the table results by Severity ID
      in: query
      required: false
      schema:
        type: integer
    Query.Global.FilterLastUpdated:
      name: filter[lastUpdated]
      description: Range filter for date/time
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        allOf:
          - type: object
            properties:
              from:
                description: Date/time to search from
                type: string
                format: date-time
          - type: object
            properties:
              to:
                description: Date/time to search to
                type: string
                format: date-time
    Query.Pastoral.Events.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              form:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              status:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              category:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              subCategory:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              title:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              severity:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              lastUpdated:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              yearGroup:
                type: string
                enum:
                  - asc
                  - desc
    Query.Pastoral.Filter.AssignedTo:
      name: filter[assignedTo]
      description: Filter results by assigned Staff ID
      in: query
      required: false
      schema:
        type: integer
    Query.Pastoral.Filter.IncludePastStudents:
      name: filter[includePastStudents]
      description: Include Past Students in the query results (false if not passed)
      in: query
      required: false
      schema:
        type: boolean
    Parameter.AcademicYear.Id:
      name: academicYearId
      description: Integer ID of Academic Year
      in: path
      required: true
      schema:
        type: integer
      style: simple
    Query.Global.FilterSection:
      name: filter[section]
      description: Filter the results by Section ID
      in: query
      required: false
      schema:
        type: integer
    Query.School.AcademicYearId.Forms.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              yearGroup:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              section:
                type: string
                enum:
                  - asc
                  - desc
    Query.School.Sections.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              position:
                type: string
                enum:
                  - asc
                  - desc
    Query.Global.Filter.OwnerGroupType:
      name: filter[groupType]
      description: Filter the results by group type, applied only for `owner/teacher` permissions
      in: query
      required: false
      schema:
        type: string
        enum:
          - form
          - subject_set
          - tutor_group
          - year_group
    Parameter.Global.AssessmentCreation:
      name: assessmentCreation
      description: Parameter used to enable in api v1 assessment creation functionality
      in: query
      required: false
      schema:
        type: boolean
    Query.Global.FilterDepartment:
      name: filter[department]
      description: Filter the results by Department ID
      in: query
      required: false
      schema:
        type: integer
    Query.Global.FilterSubject:
      name: filter[subject]
      description: Filter the results by Subject ID
      in: query
      required: false
      schema:
        type: integer
    Query.School.AcademicYearId.SubjectSets.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              yearGroup:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              section:
                type: string
                enum:
                  - asc
                  - desc
    Query.School.AcademicYearId.TutorGroups.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              section:
                type: string
                enum:
                  - asc
                  - desc
    Query.School.AcademicYearId.YearGroups.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              position:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              section:
                type: string
                enum:
                  - asc
                  - desc
    Query.School.Rooms.Filter.Location:
      name: filter[location]
      description: Filter the table results by Location ID
      in: query
      required: false
      schema:
        type: integer
    Parameter.Global.FilterStatus:
      name: filter[status]
      description: Filter the table results by Status ID
      in: query
      required: false
      schema:
        type: integer
    Query.Global.FilterSubjectSet:
      name: filter[subjectSet]
      description: Filter the results by Subject Set ID
      in: query
      required: false
      schema:
        type: integer
    Query.Global.FilterTutorGroup:
      name: filter[tutorGroup]
      description: Filter the results by Tutor Group ID
      in: query
      required: false
      schema:
        type: integer
    Query.Global.Filter.Gender:
      name: filter[gender]
      description: Filter the results by gender ID
      in: query
      required: false
      schema:
        type: integer
      style: form
    Query.Staff.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              name:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              gender:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              roles:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              jobTitle:
                type: string
                enum:
                  - asc
                  - desc
    Parameter.Address.MappingId:
      name: mappingId
      description: Represents the ID of an address mapping
      in: path
      required: true
      schema:
        type: integer
      style: simple
    Query.TimetableCalendar.DateFrom:
      name: filter[dateFrom]
      description: Filter - Date Start
      in: query
      required: true
      schema:
        type: string
        format: date
    Query.TimetableCalendar.DateTo:
      name: filter[dateTo]
      description: Filter - Date End
      in: query
      required: true
      schema:
        type: string
        format: date
    Query.Global.Date:
      name: filter[date]
      description: Filter - Date
      in: query
      required: true
      schema:
        type: string
        format: date
    Query.Students.Houses.Filter.HouseType:
      name: filter[houseType]
      description: Filter the results by the type of House
      in: query
      required: false
      schema:
        type: string
        enum:
          - academic
          - boarding
    Query.Students.Houses.Filter.isActive:
      name: filter[isActive]
      description: Filter the Houses list by the Active status
      in: query
      required: false
      schema:
        type: boolean
    Parameter.Header.AcademicYearId:
      name: academic-year-id
      description: By default, the active year is used. Use this optional header to override
      in: header
      required: false
      schema:
        type: integer
      style: simple
    Query.Students.Filter.BoardingType:
      name: filter[boardingType]
      description: Filter the table results by Boarding Type of the Student
      in: query
      required: false
      schema:
        type: integer
    Query.Students.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              name:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              gender:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              yearGroup:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              form:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              dateOfBirth:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              boardingType:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              academicHouse:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              boardingHouse:
                type: string
                enum:
                  - asc
                  - desc
    Query.AcademicYear.Id:
      name: academicYearId
      description: Integer ID of Academic Year
      in: query
      required: false
      schema:
        type: integer
    Parameter.Global.FilterDestinationSchool:
      name: filter[destinationSchool]
      description: Filter the table results by DestinationSchool ID
      in: query
      required: false
      schema:
        type: integer
    Parameter.Global.FilterAcademicYear:
      name: filter[academicYear]
      description: Filter the table results by academic year ID
      in: query
      required: false
      schema:
        type: string
      style: form
    Query.Global.FilterEnrolmentStatus:
      name: filter[enrolmentStatus]
      description: Filter the results by enrolment status
      in: query
      required: false
      schema:
        type: string
    Query.Global.FilterHouse:
      name: filter[house]
      description: Filter the students being within academic house or boarding house via house ID
      in: query
      required: false
      schema:
        type: string
      style: form
    Query.LearningSupport.Reviews.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        oneOf:
          - type: object
            properties:
              reviewDateTime:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              reviewStatus:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              reviewType:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              description:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              isStudentAttending:
                type: string
                enum:
                  - asc
                  - desc
          - type: object
            properties:
              nextReview:
                type: string
                enum:
                  - asc
                  - desc
    Query.LearningSupport.Filter.Status:
      name: filter[status]
      description: Filter the results based on Record's 'Status' ID value
      in: query
      required: false
      schema:
        type: integer
    Query.LearningSupport.Filter.ReviewType:
      name: filter[reviewType]
      description: Filter the results based on Record's Review Type ID value
      in: query
      required: false
      schema:
        type: integer
    Query.LearningSupport.Filter.StudentPresent:
      name: filter[isStudentAttending]
      description: Filter the results based on Review's 'Is Student Attending' value
      in: query
      required: false
      schema:
        type: boolean
    Query.LearningSupport.Filter.Ehcp:
      name: filter[ehcp]
      description: Filter the results based on boolean 'EHCP' value
      in: query
      required: false
      schema:
        type: boolean
    Query.LearningSupport.Filter.Severity:
      name: filter[severity]
      description: Filter the results based on Record's Severity ID value
      in: query
      required: false
      schema:
        type: integer
    Query.LearningSupport.Filter.Category:
      name: filter[learningSupportType]
      description: Filter the results based on Record's Learning Support Type ID value
      in: query
      required: false
      schema:
        type: integer
    Query.Attendance.Filter.Display:
      name: filter[display]
      description: Filter the results based on boolean 'display' value
      in: query
      required: false
      schema:
        type: boolean
    Query.Attendance.Filter.Code:
      name: filter[attendanceCode]
      in: query
      required: false
      schema:
        type: integer
      description: Filter by Attendance Code
    Query.Attendance.Filter.Session:
      name: filter[attendanceSession]
      in: query
      required: false
      schema:
        type: string
        enum:
          - am
          - pm
        example: am
      description: Filter by Attendance Session Type
    Parameter.Global.FilterDateTimeFrom:
      name: filter[dateTime][from]
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: Filter - Date Start
    Parameter.Global.FilterDateTimeTo:
      name: filter[dateTime][to]
      in: query
      required: false
      schema:
        type: string
        format: date-time
      description: Filter - Date End
    Query.Attendance.StudentRecords.Sort:
      name: sort
      description: Sort records by given sort field, e.g. sort[field]=asc
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        anyOf:
          - $ref: '#/components/schemas/Parameter.Sort.Description'
          - $ref: '#/components/schemas/Parameter.Sort.Date'
          - $ref: '#/components/schemas/Parameter.Sort.AttendanceCode'
          - $ref: '#/components/schemas/Parameter.Sort.AttendanceSession'
  schemas:
    Data.Country:
      title: Data Country response
      description: Data Country response schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        code:
          type: string
        code_alpha2:
          type: string
          description: Either NULL or a 2 letter string representing the country's 2 letter code
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
        display:
          type: boolean
      example:
        id: 14
        name: Australia
        code: AUS
        code_alpha2: AU
        position: 14
        deleted_at: null
        system_value: true
        display: true
    Data.LookupTableValue:
      title: Root Type for LookupTable
      description: Normal form for lookup data
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
      example:
        id: 2
        name: Mrs
        position: 1
        deleted_at: null
        system_value: true
    Data.CustomFields.Field:
      title: Custom Fields field data
      description: Custom Fields field data
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
        type:
          type: string
          enum:
            - checkbox
            - date
            - largeText
            - list
            - number
            - text
        group:
          type: object
          properties:
            id:
              type: integer
              format: int32
            name:
              type: string
            position:
              type: integer
            type:
              type: string
              enum:
                - student
                - staff
                - contact
        position:
          type: integer
          format: int32
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
      example:
        id: 2
        name: Some bit of text data
        type: text
        group:
          id: 1
          name: A field group
          position: 1
          type: student
        position: 1
        deleted_at: null
        system_value: false
    Api.Error:
      title: Error Message Response
      description: Structure for returning RFC-7807 errors from API
      type: object
      properties:
        detail:
          description: Human-readable summary of the error
          type: string
          example: Data validation failed
        errors:
          description: Array of specific items pertaining to multiple errors in a call
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Machine-readable error code
              property:
                type: string
                description: A clue as to what object property this error relates to
              message:
                type: string
                description: Human-readable summary of the error
            example:
              code: name_missing
              property: name
              message: Name must be provided
        status:
          description: HTTP Status code returned from API - included in case proxies manipulate the Response
          type: integer
          example: 400
        title:
          description: Human-readable summary of the error (same value as Detail)
          type: string
          example: invalid-api-request-contents
        type:
          description: Machine-readable error code in the form of a URI
          type: string
          example: https://www.wcbshub.com/api-errors/json-payload-error
      example:
        detail: Data validation failed
        errors:
          - code: name_missing
            property: name
            message: Name must be provided
        status: 400
        title: invalid-api-request-contents
        type: https://www.wcbshub.com/api-errors/json-payload-error
    Data.Ethnicity:
      title: Data Ethnicity response
      description: Data Ethnicity response schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        code:
          type: string
        position:
          format: int32
          type: integer
        display:
          type: boolean
      example:
        id: 75
        name: Chinese
        code: CHNE
        position: 28
        display: true
    Data.Faith:
      title: Data Faith response
      description: Data Faith response schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
        display:
          type: boolean
      example:
        id: 14
        name: Quaker
        position: 4
        deleted_at: null
        system_value: true
        display: true
    Data.Language:
      title: Data Language response
      description: Data Language schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
        display:
          type: boolean
      example:
        id: 4
        name: Afrikaans
        position: 5
        deleted_at: null
        system_value: true
        display: true
    Data.Nationality:
      title: Data Nationality response
      description: Data Nationality schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
        display:
          type: boolean
      example:
        id: 34
        name: Cameroonian
        position: 34
        deleted_at: null
        system_value: true
        display: true
    Data.KeyValue:
      title: Key Value Pair
      description: Response shape for a single lookup item in a non-settings response
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
      example:
        id: 1
        name: A string value
    Data.File:
      title: File
      description: File Metadata object
      type: object
      nullable: true
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        size:
          format: int32
          type: integer
          description: Size in Bytes
        mime_type:
          type: string
        purpose:
          type: string
          enum:
            - from_header
            - form_background
            - student_note
            - student_medical_note
            - staff_note
            - contact_note
            - learning_support_record
            - learning_support_review
            - staff_profile_signature_image
            - staff_profile_image
            - student_profile_image
            - contact_profile_image
            - house_profile_image
            - import
            - school_logo
            - staff_check
            - full_timetable_report
            - individual_timetable_report
            - group_timetable_report
            - room_timetable_report
            - wellbeing_resources
            - staff_scr_report
            - pastoral_note
            - student_information_card_report
            - student_admission_register_report
            - student_form_list_report
            - student_isc_census_data_report
        uploaded_by_id:
          format: int32
          type: integer
        created_at:
          type: string
          format: date-time
        deleted_at:
          type: string
          format: date-time
          nullable: true
      example:
        id: 68d75310-d858-4d75-b47b-3e7089cceca8
        name: example.doc
        size: 306691
        mime_type: application/msword
        purpose: learning_support_record
        uploaded_by_id: 163
        created_at: '2019-08-24T14:15:22Z'
        deleted_at: null
    Data.KeyValueNullable:
      title: Nullable Key Value Pair
      description: Response shape for a single lookup item in a non-settings response. Allows the value to be NULL
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Data.KeyValue'
      example:
        id: 1
        name: A non-null lookup value
    AccessStatus:
      title: Access Status
      description: Describes a user's access to the system (internal use only)
      type: string
      nullable: true
      enum:
        - no_access
        - awaiting_invite
        - invited
        - suspended
        - access
      example: no_access
    Data.ImageKeyValue:
      title: Key Value Pair for Image object
      description: Response shape for a single image item
      type: object
      properties:
        type:
          type: string
        url:
          type: string
      example:
        type: thumbnail
        url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
    Students.Tag.Summary:
      title: Student Tag Summary
      description: A summary of a Student Tag to be used in Student lists
      type: object
      properties:
        id:
          type: integer
        color_option:
          type: integer
          description: The color option of the associated TagType
        content:
          type: string
          description: The Date/Number/Text value of the Tag
        name:
          type: string
          description: The name of the Tag
        data_type:
          type: string
          description: The data type of the Tag (from the TagType)
          enum:
            - number
            - text
            - date
      example:
        id: 1
        color_option: 8
        content: late
        name: Attendance Issues
        data_type: text
    Staff.Listing:
      title: Root Type for Staff
      description: Information about Staff
      type: object
      properties:
        departments:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
          nullable: true
        employment_leave_date:
          type: string
          format: date
          nullable: true
        external_id:
          type: string
          nullable: true
        first_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        id:
          format: int32
          type: integer
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        job_title:
          type: string
          nullable: true
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        person_type:
          type: string
        positions:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValueNullable'
        preferred_name:
          type: string
          nullable: true
        previous_last_name:
          type: string
          nullable: true
        sections:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
          nullable: true
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
          nullable: true
        status:
          type: string
        timetable_code:
          type: string
          nullable: true
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        report_writer:
          type: boolean
          description: Whether this staff member is a report writer (when listed for a class)
      example:
        departments:
          - id: 1
            name: Science
        employment_leave_date: null
        external_id: ST9344
        first_name: Mary
        gender:
          id: 2
          name: Female
        id: 5
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
        job_title: Teacher
        last_name: McMahnamahna
        middle_name: null
        person_type: staff
        positions:
          - id: 1
            name: Teacher
        preferred_name: Mary
        previous_last_name: Mulvihill
        sections:
          - id: 1
            name: Lower School
        subjects:
          - id: 1
            name: Physics
        status: current
        timetable_code: STMMSP
        roles:
          - id: 1
            name: Teacher
        title:
          id: 4
          name: Ms
        report_writer: false
    Data.KeyPositionValue:
      title: Key Value Pair with a position property
      description: Response shape for a single lookup item in a non-settings response that needs to have position especially in listings for sorting purpose
      type: object
      allOf:
        - $ref: '#/components/schemas/Data.KeyValue'
        - type: object
          properties:
            position:
              type: integer
              format: int32
      example:
        id: 1
        name: A lookup value
        position: 3
    Student.Listing:
      title: List Type for Students
      description: List View for a Student
      type: object
      properties:
        id:
          format: int32
          type: integer
        academic_house:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        access_status:
          $ref: '#/components/schemas/AccessStatus'
        boarding_house:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        boarding_type:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        date_of_birth:
          format: date
          type: string
        enrolment_status:
          type: string
        external_id:
          type: string
          nullable: true
        first_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValue'
        last_login:
          type: string
          format: date-time
          nullable: true
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        name_in_local_language:
          type: string
          nullable: true
        person_type:
          type: string
        preferred_name:
          type: string
          nullable: true
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        learning_support_record_summary:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        learning_support_summary:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        tag_summary:
          type: array
          items:
            $ref: '#/components/schemas/Students.Tag.Summary'
        has_global_note:
          type: boolean
        form:
          type: object
          nullable: true
          properties:
            id:
              format: int32
              type: integer
            name:
              type: string
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            staff:
              type: array
              items:
                $ref: '#/components/schemas/Staff.Listing'
            year_group:
              $ref: '#/components/schemas/Data.KeyPositionValue'
        current_admission:
          type: object
          nullable: true
          properties:
            admission_year:
              $ref: '#/components/schemas/Data.KeyValue'
            admission_year_group:
              $ref: '#/components/schemas/Data.KeyValue'
        medical_condition_severity:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Data.KeyPositionValue'
      example:
        id: 145
        academic_house:
          id: 1
          name: Green House
        access_status: invited
        boarding_house:
          id: 1
          name: A non-null lookup value
        boarding_type:
          id: 1
          name: Full time boarder
        date_of_birth: '2010-08-24'
        enrolment_status: current
        external_id: X12332
        first_name: Mervyn
        gender:
          id: 1
          name: Male
        last_login: '2019-08-24T14:15:22Z'
        last_name: Kirwan
        middle_name: Davin
        name_in_local_language: null
        person_type: student
        preferred_name: Merv
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
        learning_support_record_summary:
          - id: 1
            name: The short description from the LS Record
        learning_support_summary: []
        tag_summary:
          - id: 1
            color_option: 8
            content: late
            name: Attendance Issues
        has_global_note: true
        form:
          id: 6
          name: Form 9A
          section:
            id: 1
            name: Middle School
          staff:
            - departments:
                - id: 9
                  name: Science
              employment_leave_date: null
              external_id: ST9087
              first_name: Peter
              gender:
                id: 1
                name: Male
              id: 68
              images:
                - type: thumbnail
                  url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
              job_title: Teacher
              last_name: Treacher
              middle_name: null
              person_type: staff
              positions:
                - id: 1
                  name: Teacher
              preferred_name: null
              previous_last_name: null
              sections:
                - id: 1
                  name: Middle school
              subjects:
                - id: 13
                  name: Chemistry
              status: current
              timetable_code: PTSC
              roles:
                - id: 5
                  name: Teacher
              title:
                id: 1
                name: Mr
          year_group:
            id: 6
            name: Year 9
            position: 3
          current_admission:
            admission_year:
              id: 12
              name: 2020/2021 Academic Year
            admission_year_group:
              id: 51
              name: Year 2
        medical_condition_severity:
          id: 1
          name: High
          position: 1
    LearningSupport.Record:
      title: Root Type for Learning Support Record
      description: Learning Support Record
      type: object
      properties:
        id:
          format: int32
          type: integer
        description:
          type: string
        ehcp:
          type: boolean
        ehcp_date:
          type: string
          format: date
          nullable: true
        files:
          type: array
          items:
            $ref: '#/components/schemas/Data.File'
        learning_support_date:
          type: string
          format: date
        learning_support_type:
          $ref: '#/components/schemas/Data.KeyValue'
        severity:
          $ref: '#/components/schemas/Data.KeyValue'
        status:
          $ref: '#/components/schemas/Data.KeyValue'
        student:
          $ref: '#/components/schemas/Student.Listing'
        inactive_date:
          description: Required field IF status is set to Inactive, otherwise will be set to NULL internally
          type: string
          format: date
          nullable: true
      example:
        id: 15
        description: Mild ADHD
        ehcp: true
        ehcp_date: '2019-08-24'
        files:
          - id: 68d75310-d858-4d75-b47b-3e7089cceca8
            name: example.doc
            size: 306691
            mime_type: application/msword
            purpose: learning_support_record
            uploaded_by_id: 163
            created_at: '2019-08-24T14:15:22Z'
            deleted_at: null
        learning_support_date: '2019-08-24'
        learning_support_type:
          id: 2
          name: Moderate Learning Difficulty (MLD)
        severity:
          id: 2
          name: Mild
        status:
          id: 2
          name: active
        student:
          id: 145
          academic_house:
            id: 1
            name: Green House
          access_status: invited
          boarding_house:
            id: 1
            name: Green House
          boarding_type:
            id: 1
            name: Full time boarder
          date_of_birth: '2010-08-24'
          enrolment_status: current
          external_id: X12332
          first_name: Mervyn
          gender:
            id: 1
            name: Male
          last_login: '2019-08-24T14:15:22Z'
          last_name: Kirwan
          middle_name: Davin
          name_in_local_language: null
          person_type: student
          preferred_name: Merv
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          learning_support_record_summary:
            - id: 1
              name: The short description from the LS Record
          learning_support_summary: []
          tag_summary:
            - id: 1
              color_option: 8
              content: late
              name: Attendance Issues
          has_global_note: true
          form:
            id: 6
            name: Form 9A
            section:
              id: 1
              name: Middle School
            staff:
              - departments:
                  - id: 9
                    name: Science
                employment_leave_date: null
                external_id: ST9087
                first_name: Peter
                gender:
                  id: 1
                  name: Male
                id: 68
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                job_title: Teacher
                last_name: Treacher
                middle_name: null
                person_type: staff
                positions:
                  - id: 1
                    name: Teacher
                preferred_name: null
                previous_last_name: null
                sections:
                  - id: 1
                    name: Middle school
                subjects:
                  - id: 13
                    name: Chemistry
                status: current
                timetable_code: PTSC
                roles:
                  - id: 5
                    name: Teacher
                title:
                  id: 1
                  name: Mr
            year_group:
              id: 6
              name: Year 9
              position: 3
          medical_condition_severity:
            id: 1
            name: High
            position: 1
        inactive_date: null
    Students.Contact.Listing:
      title: Root Type for Contacts (List view)
      description: Information about Contact (e.g. mother/father of the student)
      type: object
      properties:
        access_status:
          $ref: '#/components/schemas/AccessStatus'
        students_access:
          type: array
          items:
            type: object
            properties:
              relation_id:
                type: integer
              access_to_student:
                type: boolean
                description: Indicates whether the contact has access to the student
              student:
                $ref: '#/components/schemas/Student.Listing'
        deleted_at:
          format: date-time
          type: string
          nullable: true
        external_id:
          type: string
          nullable: true
        first_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        id:
          format: int32
          type: integer
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        primary_email:
          type: string
          format: email
          nullable: true
        profile_image:
          $ref: '#/components/schemas/Data.File'
        status:
          type: string
          enum:
            - active
            - inactive
            - deceased
        students:
          type: array
          items:
            $ref: '#/components/schemas/Student.Listing'
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
      example:
        access_status: no_access
        students_access:
          - relation_id: 34
            access_to_student: true
            student:
              id: 145
              academic_house:
                id: 1
                name: Green House
              access_status: invited
              boarding_house:
                id: 1
                name: Green House
              boarding_type:
                id: 1
                name: Full time boarder
              date_of_birth: '2010-08-24'
              enrolment_status: current
              external_id: X12332
              first_name: Mervyn
              gender:
                id: 1
                name: Male
              last_login: '2019-08-24T14:15:22Z'
              last_name: Kirwan
              middle_name: Davin
              name_in_local_language: null
              person_type: student
              preferred_name: Merv
              images:
                - type: thumbnail
                  url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
              learning_support_record_summary:
                - id: 1
                  name: The short description from the LS Record
              medical_condition_severity:
                id: 1
                name: High
                position: 1
              learning_support_summary: []
              tag_summary:
                - id: 1
                  color_option: 8
                  content: late
                  name: Attendance Issues
              has_global_note: true
              form:
                id: 6
                name: Form 9A
                section:
                  id: 1
                  name: Middle School
                staff:
                  - departments:
                      - id: 9
                        name: Science
                    employment_leave_date: null
                    external_id: ST9087
                    first_name: Peter
                    gender:
                      id: 1
                      name: Male
                    id: 68
                    images:
                      - type: thumbnail
                        url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                    job_title: Teacher
                    last_name: Treacher
                    middle_name: null
                    person_type: staff
                    positions:
                      - id: 1
                        name: Teacher
                    preferred_name: null
                    previous_last_name: null
                    sections:
                      - id: 1
                        name: Middle school
                    subjects:
                      - id: 13
                        name: Chemistry
                    status: current
                    timetable_code: PTSC
                    roles:
                      - id: 5
                        name: Teacher
                    title:
                      id: 1
                      name: Mr
                year_group:
                  id: 6
                  name: Year 9
                  position: 3
        deleted_at: '2019-08-24T14:15:22Z'
        external_id: null
        first_name: Sarah
        gender:
          id: 2
          name: Female
        id: 37
        last_name: Shmyth
        middle_name: null
        primary_email: user@example.com
        profile_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: example.jpg
          size: 306691
          mime_type: image/jpg
          purpose: contact_profile_image
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        status: active
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        title:
          id: 5
          name: Miss
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/contact_profile_image/36/123123.jpg
    Students.Contact:
      title: Root Type for Contacts
      description: Information about Contact (e.g. mother/father of the student)
      type: object
      allOf:
        - $ref: '#/components/schemas/Students.Contact.Listing'
        - properties:
            multi_realm:
              type: boolean
              description: Indicates whether the user has a multi-realm login
      example:
        access_status: no_access
        multi_realm: false
        students_access:
          - relation_id: 34
            access_to_student: true
            student:
              id: 145
              academic_house:
                id: 1
                name: Green House
              access_status: invited
              boarding_house:
                id: 1
                name: Green House
              boarding_type:
                id: 1
                name: Full time boarder
              date_of_birth: '2010-08-24'
              enrolment_status: current
              external_id: X12332
              first_name: Mervyn
              gender:
                id: 1
                name: Male
              last_login: '2019-08-24T14:15:22Z'
              last_name: Kirwan
              middle_name: Davin
              name_in_local_language: null
              person_type: student
              preferred_name: Merv
              images:
                - type: thumbnail
                  url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
              learning_support_record_summary:
                - id: 1
                  name: The short description from the LS Record
              learning_support_summary: []
              tag_summary:
                - id: 1
                  color_option: 8
                  content: late
                  name: Attendance Issues
              has_global_note: true
              form:
                id: 6
                name: Form 9A
                section:
                  id: 1
                  name: Middle School
                staff:
                  - departments:
                      - id: 9
                        name: Science
                    employment_leave_date: null
                    external_id: ST9087
                    first_name: Peter
                    gender:
                      id: 1
                      name: Male
                    id: 68
                    images:
                      - type: thumbnail
                        url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                    job_title: Teacher
                    last_name: Treacher
                    middle_name: null
                    person_type: staff
                    positions:
                      - id: 1
                        name: Teacher
                    preferred_name: null
                    previous_last_name: null
                    sections:
                      - id: 1
                        name: Middle school
                    subjects:
                      - id: 13
                        name: Chemistry
                    status: current
                    timetable_code: PTSC
                    roles:
                      - id: 5
                        name: Teacher
                    title:
                      id: 1
                      name: Mr
                year_group:
                  id: 6
                  name: Year 9
                  position: 3
        deleted_at: '2019-08-24T14:15:22Z'
        external_id: null
        first_name: Sarah
        gender:
          id: 2
          name: Female
        id: 37
        last_name: Shmyth
        middle_name: null
        primary_email: user@example.com
        profile_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: example.jpg
          size: 306691
          mime_type: image/jpg
          purpose: contact_profile_image
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        status: active
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        title:
          id: 5
          name: Miss
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/contact_profile_image/36/123123.jpg
    LearningSupport.Review:
      title: Root Type for Learning Support Review
      description: Learning Support Review
      type: object
      properties:
        id:
          format: int32
          type: integer
        agreed_actions:
          type: string
        attending_contacts:
          type: array
          items:
            $ref: '#/components/schemas/Students.Contact'
        attending_contact_text:
          type: string
        attending_staff:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        is_student_attending:
          type: boolean
        description:
          type: string
        ehcp_notes:
          type: string
        files:
          type: array
          items:
            $ref: '#/components/schemas/Data.File'
        meeting_aims:
          type: string
        next_review:
          type: string
          format: date-time
        review_type:
          $ref: '#/components/schemas/Data.KeyValue'
        review_date_time:
          type: string
          format: date-time
        special_needs_coordinators:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        review_status:
          $ref: '#/components/schemas/Data.KeyValue'
      example:
        id: 18
        agreed_actions: It was decided to monitor the situation and for another meeting to be held in 6 months' time.
        attending_contacts:
          - access_status: no_access
            students_access:
              - relation_id: 1
                access_to_student: true
                student:
                  id: 145
                  academic_house:
                    id: 1
                    name: Green House
                  access_status: invited
                  boarding_house:
                    id: 1
                    name: A non-null lookup value
                  boarding_type:
                    id: 1
                    name: Full time boarder
                  date_of_birth: '2010-08-24'
                  enrolment_status: current
                  external_id: X12332
                  first_name: Mervyn
                  gender:
                    id: 1
                    name: Male
                  last_login: '2019-08-24T14:15:22Z'
                  last_name: Kirwan
                  middle_name: Davin
                  name_in_local_language: null
                  person_type: student
                  preferred_name: Merv
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  learning_support_record_summary:
                    - id: 1
                      name: The short description from the LS Record
                  learning_support_summary: []
                  tag_summary:
                    - id: 1
                      color_option: 8
                      content: late
                      name: Attendance Issues
                  has_global_note: true
                  form:
                    id: 6
                    name: Form 9A
                    section:
                      id: 1
                      name: Middle School
                    staff:
                      - departments:
                          - id: 9
                            name: Science
                        employment_leave_date: null
                        external_id: ST9087
                        first_name: Peter
                        gender:
                          id: 1
                          name: Male
                        id: 68
                        images:
                          - type: thumbnail
                            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                        job_title: Teacher
                        last_name: Treacher
                        middle_name: null
                        person_type: staff
                        positions:
                          - id: 1
                            name: Teacher
                        preferred_name: null
                        previous_last_name: null
                        sections:
                          - id: 1
                            name: Middle school
                        subjects:
                          - id: 13
                            name: Chemistry
                        status: current
                        timetable_code: PTSC
                        roles:
                          - id: 5
                            name: Teacher
                        title:
                          id: 1
                          name: Mr
                    year_group:
                      id: 6
                      name: Year 9
                      position: 3
            deleted_at: '2019-08-24T14:15:22Z'
            external_id: null
            first_name: Sarah
            gender:
              id: 1
              name: Female
            id: 10
            last_name: Uumelmahay
            middle_name: null
            primary_email: user@example.com
            profile_image: null
            status: active
            students:
              - id: 0
                access_status: no_access
                academic_house:
                  id: 1
                  name: A non-null lookup value
                boarding_type:
                  id: 1
                  name: A non-null lookup value
                boarding_house:
                  id: 1
                  name: A non-null lookup value
                country_of_birth:
                  id: 1
                  name: A non-null lookup value
                date_of_birth: '2019-08-24'
                deleted_at: '2019-08-24T14:15:22Z'
                ethnicity:
                  id: 1
                  name: A string value
                enrolment_status: string
                external_id: string
                faith:
                  id: 1
                  name: A string value
                first_name: string
                gender:
                  id: 1
                  name: A string value
                has_global_note: true
                form:
                  id: 0
                  name: string
                  staff:
                    - departments:
                        - id: 1
                          name: Science
                      employment_leave_date: null
                      external_id: ST9344
                      first_name: Mary
                      gender:
                        id: 2
                        name: Female
                      id: 5
                      images:
                        - type: thumbnail
                          url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                      job_title: Teacher
                      last_name: McMahnamahna
                      middle_name: null
                      person_type: staff
                      positions:
                        - id: 1
                          name: Teacher
                      preferred_name: Mary
                      previous_last_name: Mulvihill
                      sections:
                        - id: 1
                          name: Lower School
                      subjects:
                        - id: 1
                          name: Physics
                      status: current
                      timetable_code: STMMSP
                      roles:
                        - id: 1
                          name: Teacher
                      title:
                        id: 4
                        name: Ms
                  section:
                    id: 1
                    name: A string value
                  year_group:
                    id: 1
                    name: A string value
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                language_first:
                  id: 1
                  name: A non-null lookup value
                language_second:
                  id: 1
                  name: A non-null lookup value
                last_login: '2019-08-24T14:15:22Z'
                last_name: string
                learning_support_record_summary:
                  - id: 1
                    name: A string value
                medical_condition_severity:
                  id: 1
                  name: High
                  position: 1
                middle_name: string
                name_in_local_language: string
                national_identity: string
                nationalities:
                  - id: 1
                    name: A string value
                person_type: string
                preferred_name: string
                primary_email: user@example.com
                profile_image:
                  id: 68d75310-d858-4d75-b47b-3e7089cceca8
                  name: example.doc
                  size: 306691
                  mime_type: application/msword
                  purpose: learning_support_record
                  uploaded_by_id: 163
                  created_at: '2019-08-24T14:15:22Z'
                  deleted_at: null
                tags:
                  - id: 5
                    type:
                      id: 4
                      name: Attendance Issues
                      type: text
                      color_option: 8
                    text: Often missing from morning roll call
                    number: null
                    date: '2019-08-24'
            title:
              id: 4
              name: Miss
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
        attending_contact_text: Also attending was the student's doctor, Dr Malthouse
        attending_staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        is_student_attending: true
        description: Review of the student's use of tinted glasses to attempt to address issues.
        ehcp_notes: None
        files:
          - id: 68d75310-d858-4d75-b47b-3e7089cceca8
            name: example.doc
            size: 306691
            mime_type: application/msword
            purpose: learning_support_record
            uploaded_by_id: 163
            created_at: '2019-08-24T14:15:22Z'
            deleted_at: null
        meeting_aims: Recording of any observations on whether there is any change in the student's behaviour & learning outcomes
        next_review: '2019-08-24T14:15:22Z'
        review_type:
          id: 1
          name: School action
        review_date_time: '2019-04-24T14:15:22Z'
        special_needs_coordinators:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        review_status:
          id: 1
          name: active
    Pastoral.Category:
      title: Pastoral Category
      type: object
      description: Pastoral Category response object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          type: integer
          nullable: true
        system_value:
          type: boolean
        category:
          type: object
          nullable: true
          properties:
            id:
              format: int32
              type: integer
            name:
              type: string
            position:
              type: integer
              nullable: true
            system_value:
              type: boolean
            category:
              type: object
              nullable: true
            color:
              type: integer
              nullable: true
            sections:
              type: array
              nullable: true
            deleted_at:
              type: string
              format: date-time
              nullable: true
        color:
          type: integer
          nullable: true
        sections:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
          nullable: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
      example:
        id: 54
        name: Example category
        position: 2
        system_value: false
        category:
          id: 1
          name: Parent category
          position: 1
          system_value: false
          category: null
          color: 3
          sections: null
          deleted_at: '2019-08-24T14:15:22Z'
        color: 0
        sections:
          - id: 1
            name: Lower school
        deleted_at: '2019-08-24T14:15:22Z'
    Pastoral.Data.SeverityLevel:
      title: Pastoral Severity Level data element
      description: Field makeup for settings Pastoral Severity Levels
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        color:
          format: int32
          type: integer
      example:
        id: 4
        name: Severe
        color: 2
    Data.KeyColorValue:
      title: Key Value Pair with a color property - because grid listings seem to be sneaking them in
      description: Response shape for a single lookup item in a non-settings response that needs to have color
      type: object
      allOf:
        - $ref: '#/components/schemas/Data.KeyValue'
        - type: object
          properties:
            color:
              type: integer
              nullable: true
      example:
        id: 1
        name: Orange
        color: 8
    Pastoral.Events.EventList.Core:
      title: Pastoral Event Base Listing Object
      type: object
      description: Base listing response object for Pastoral Events
      properties:
        id:
          type: integer
        title:
          type: string
          maxLength: 100
        event_type:
          type: string
          enum:
            - wellbeing_event
            - wellbeing_plan
        severity:
          $ref: '#/components/schemas/Data.KeyColorValue'
        category:
          $ref: '#/components/schemas/Data.KeyColorValue'
        status:
          type: string
          enum:
            - active
            - inactive
        students:
          type: array
          items:
            $ref: '#/components/schemas/Student.Listing'
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        last_updated_at:
          type: string
          format: date-time
      example:
        id: 55
        title: Disrupted morning assembly
        event_type: wellbeing_event
        severity:
          id: 4
          name: Minor
          color: 8
        category:
          id: 4
          name: Disruption
          color: 8
        status: active
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        assignees:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        last_updated_at: '2019-08-24T14:15:22Z'
    Pastoral.Events.EventList.WellbeingEvent:
      title: Pastoral Events Listing format
      type: object
      allOf:
        - $ref: '#/components/schemas/Pastoral.Events.EventList.Core'
        - type: object
          properties:
            subcategory:
              $ref: '#/components/schemas/Data.KeyValue'
      example:
        id: 55
        title: Disrupted morning assembly
        event_type: wellbeing_event
        severity:
          id: 4
          name: Minor
          color: 8
        category:
          id: 4
          name: Disruption
          color: 8
        status: active
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        assignees:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        last_updated_at: '2019-08-24T14:15:22Z'
        subcategory:
          id: 4
          name: Recording only
    Data.KeyValue.Color.v2:
      title: Data.KeyValue.Color.v2
      type: object
      nullable: true
      properties:
        id:
          type: integer
          minimum: 1
          maximum: 4294967295
          example: 654
          format: int32
          description: ID of item
        name:
          type: string
          minLength: 1
          maxLength: 50
          example: Some name
          description: Relevant text data, e.g. name
        color_option:
          type: integer
          minimum: 1
          maximum: 4294967295
          example: 1
          format: int32
          description: Color option
    Person.Minimal.v2:
      title: Minimal information for a person
      description: Name data from person sufficient to work with Naming Convention & Person Lozenge - literally, the minimal
      type: object
      example:
        id: 137
        first_name: Bob
        middle_name: null
        name_in_local_language: null
        last_name: Bobbington
        preferred_name: null
        title:
          id: 1
          name: Mr
        person_type: staff
        status: current
      properties:
        first_name:
          type: string
        id:
          format: int32
          type: integer
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        name_in_local_language:
          type: string
          nullable: true
        preferred_name:
          type: string
          nullable: true
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        person_type:
          type: string
        status:
          type: string
          description: Status of the Person (past/current/etc)
        status_indicator:
          type: string
          description: Secondary status for Admissions and possibly others
          nullable: true
    Data.ImageKeyValue.v2:
      title: Data.ImageKeyValue.v2
      type: object
      description: Response shape for a single image item
      x-examples:
        Thumbnail:
          type: thumbnail
          url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
      properties:
        type:
          type: string
          example: thumbnail
        url:
          type: string
          example: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
    Students.Tag.Summary.v2:
      title: Students.Tag.Summary.v2
      type: object
      description: A summary of a Student Tag to be used in Student lists
      x-examples:
        Tag one:
          id: 1
          color_option: 44
          content: test
          name: Tag one
      properties:
        id:
          type: integer
          example: 1
          minimum: 1
          maximum: 4294967295
          format: int32
        color_option:
          type: integer
          description: The color option of the associated TagType
          format: int32
          minimum: 1
          maximum: 4294967295
          example: 44
        content:
          type: string
          description: The Date/Number/Text of the Tag
          example: test
        name:
          type: string
          example: Tag one
    Data.KeyValue.v2:
      title: Data.KeyValue.v2
      type: object
      nullable: true
      properties:
        id:
          type: integer
          minimum: 1
          maximum: 4294967295
          example: 654
          format: int32
          description: ID of item
        name:
          type: string
          minLength: 1
          maxLength: 50
          example: Some name
          description: Relevant text data, e.g. name
    Student.Display.v2:
      title: Student.Display.v2
      allOf:
        - $ref: '#/components/schemas/Person.Minimal.v2'
        - type: object
          properties:
            images:
              type: array
              items:
                $ref: '#/components/schemas/Data.ImageKeyValue.v2'
            tag_summary:
              type: array
              items:
                $ref: '#/components/schemas/Students.Tag.Summary.v2'
            learning_support_record_summary:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue.v2'
            medical_condition_severity:
              type: object
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Data.KeyPositionValue'
            has_global_note:
              type: boolean
      description: Response object for enough Student information to supply the Student Name Display component
    Data.Wellbeing.StudentApplications:
      title: Student Wellbeing list Applicants response
      description: Student Wellbeing list Applicants response
      type: object
      properties:
        admission_year:
          $ref: '#/components/schemas/Data.KeyValue.v2'
        admission_year_group:
          $ref: '#/components/schemas/Data.KeyValue.v2'
    Data.Wellbeing.AcademicStructure:
      title: Student Wellbeing list Academic Structure response
      description: Student Wellbeing list Academic Structure response
      type: object
      properties:
        form:
          $ref: '#/components/schemas/Data.KeyValue.v2'
        year_group:
          $ref: '#/components/schemas/Data.KeyValue.v2'
    Pastoral.Events.EventList.Core.v2:
      title: Pastoral.Events.EventList.Core.v2
      type: object
      description: Base listing response object for Pastoral Events v2
      properties:
        id:
          type: integer
        title:
          type: string
          maxLength: 100
        event_type:
          type: string
          enum:
            - wellbeing_event
            - wellbeing_plan
        severity:
          $ref: '#/components/schemas/Data.KeyValue.Color.v2'
        category:
          $ref: '#/components/schemas/Data.KeyValue.Color.v2'
        status:
          type: string
          enum:
            - active
            - inactive
        students:
          type: array
          items:
            $ref: '#/components/schemas/Student.Display.v2'
        admissions_application:
          $ref: '#/components/schemas/Data.Wellbeing.StudentApplications'
        academic_structure:
          $ref: '#/components/schemas/Data.Wellbeing.AcademicStructure'
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/Person.Minimal.v2'
        last_updated_at:
          type: string
          format: date-time
      example:
        id: 15
        title: wellbeing core example
        event_type: wellbeing_plan
        severity: null
        category:
          id: 6
          name: Additional Support
          color_option: 9
        status: active
        student:
          id: 441
          title: null
          first_name: Jon
          middle_name: null
          last_name: Don
          preferred_name: null
          name_in_local_language: null
          person_type: student
          status: current
          status_indicator: current
          images: []
          tag_summary: []
          learning_support_record_summary: []
          medical_condition_severity:
            id: 1
            name: High
            position: 1
          has_global_note: false
        assignees: []
        academic_structure:
          form:
            id: 505
            name: Form 1A
          year_group:
            id: 41
            name: Year 1
        last_updated_at: '2021-12-22T13:47:00+00:00'
        admissions_application:
          admission_year:
            id: 6
            name: 2019-2020
          admission_year_group:
            id: 1
            name: Kindergarten 1
    Pastoral.Events.EventList.WellbeingEvent.v2:
      title: Pastoral.Events.EventList.WellbeingEvent.v2
      type: object
      allOf:
        - $ref: '#/components/schemas/Pastoral.Events.EventList.Core.v2'
        - type: object
          properties:
            subcategory:
              $ref: '#/components/schemas/Data.KeyValue.Color.v2'
      example:
        id: 14
        title: Wellbeing Event Example
        event_type: wellbeing_event
        severity: null
        category:
          id: 8
          name: Health
          color_option: 9
        status: active
        student:
          id: 441
          title: null
          first_name: Jon
          middle_name: null
          last_name: Don
          preferred_name: null
          name_in_local_language: null
          person_type: student
          status: current
          status_indicator: current
          images: []
          tag_summary: []
          learning_support_record_summary: []
          medical_condition_severity:
            id: 1
            name: High
            position: 1
          has_global_note: false
        assignees: []
        academic_structure:
          form:
            id: 505
            name: Form 1A
          year_group:
            id: 41
            name: Year 1
        last_updated_at: '2021-12-22T12:29:26+00:00'
        admissions_application:
          admission_year:
            id: 6
            name: 2019-2020
          admission_year_group:
            id: 1
            name: Kindergarten 1
        subcategory:
          id: 3
          name: Eating Disorder
          color_option: null
    Pastoral.Events.EventDetail.Core:
      title: Pastoral Event Base Object
      type: object
      description: Base response object for Pastoral Events
      properties:
        id:
          type: integer
        title:
          type: string
          maxLength: 100
        event_type:
          type: string
          enum:
            - wellbeing_event
            - wellbeing_plan
        description:
          type: string
          maxLength: 1000
          nullable: true
        severity:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        category:
          $ref: '#/components/schemas/Data.KeyColorValue'
        status:
          type: string
          enum:
            - active
            - inactive
        datetime:
          type: string
          format: date-time
        students:
          type: array
          items:
            $ref: '#/components/schemas/Student.Listing'
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        last_updated_at:
          type: string
          format: date-time
        last_updated_by:
          $ref: '#/components/schemas/Staff.Listing'
      example:
        id: 55
        title: Disrupted morning assembly
        event_type: wellbeing_event
        description: Morning assembly was disrupted by shouting
        severity:
          id: 3
          name: Minor
        category:
          id: 6
          name: Disturbance
          color: 8
        status: active
        datetime: '2019-08-24T14:15:22Z'
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
            medical_condition_severity:
              id: 1
              name: High
              position: 1
        assignees:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        last_updated_at: '2019-08-24T14:15:22Z'
        last_updated_by:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
    Pastoral.Events.EventDetail.WellbeingEvent:
      title: Pastoral Events Wellbeing Event
      type: object
      allOf:
        - $ref: '#/components/schemas/Pastoral.Events.EventDetail.Core'
        - type: object
          properties:
            recorder:
              $ref: '#/components/schemas/Staff.Listing'
            subcategory:
              $ref: '#/components/schemas/Data.KeyValueNullable'
      example:
        id: 55
        title: Disrupted morning assembly
        event_type: wellbeing_event
        description: Morning assembly was disrupted by shouting
        severity:
          id: 3
          name: Minor
        category:
          id: 6
          name: Disturbance
          color: 8
        status: active
        datetime: '2019-08-24T14:15:22Z'
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        assignees:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        last_updated_at: '2019-08-24T14:15:22Z'
        last_updated_by:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
        recorder:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
        subcategory:
          id: 14
          name: Reportable only
    Pastoral.Wellbeing.Professional:
      title: Pastoral Wellbeing Professional
      type: object
      properties:
        name:
          type: string
          nullable: true
        agency:
          type: string
          nullable: true
      example:
        name: Trevor Budd
        agency: Random Consulting Limited
    Pastoral.Events.EventDetail.WellbeingPlan:
      title: Pastoral Events Wellbeing Plan
      type: object
      allOf:
        - $ref: '#/components/schemas/Pastoral.Events.EventDetail.Core'
        - type: object
          properties:
            recorder:
              $ref: '#/components/schemas/Staff.Listing'
            lead_professional_name:
              type: string
              nullable: true
            lead_professional_agency:
              type: string
              nullable: true
            other_professionals:
              type: array
              items:
                $ref: '#/components/schemas/Pastoral.Wellbeing.Professional'
      example:
        id: 59
        title: Initial starter plan
        event_type: wellbeing_plan
        description: Initial plan to deal with first incidence of disruptive behaviour
        severity:
          id: 3
          name: Minor
        category:
          id: 4
          name: Upper School Plan
          color: 8
        status: active
        datetime: '2019-08-24T14:15:22Z'
        students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        assignees:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        last_updated_at: '2019-08-24T14:15:22Z'
        last_updated_by:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
        recorder:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
        lead_professional_name: Chris Pyne
        lead_professional_agency: Repair Consulting
        other_professionals:
          - name: Trevor Budd
            agency: Random Consulting Limited
    Pastoral.Events.GirfecShanarriItem:
      title: Pastoral Event, GIRFEC SHANARRI Item
      description: GIRFEC SHANARRI Item linked with Pastoral Event
      type: object
      properties:
        id:
          format: int32
          type: integer
        type:
          type: string
        description:
          type: string
      example:
        id: 1
        type: healthy
        description: Healthy Item description
    PersonMinimal:
      title: Minimal information for a person
      description: Information about person
      type: object
      properties:
        first_name:
          type: string
        id:
          format: int32
          type: integer
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        name_in_local_language:
          type: string
          nullable: true
        preferred_name:
          type: string
          nullable: true
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        person_type:
          type: string
      example:
        first_name: John
        id: 33
        last_name: Smith
        middle_name: Smyth
        name_in_local_language: Johan
        preferred_name: Jon
        title:
          id: 1
          name: Mr
        person_type: staff
    Pastoral.Data.Girfec:
      title: GIRFEC Data
      description: Year groups named persons object
      type: object
      properties:
        id:
          format: int32
          type: integer
        year_group_uuid:
          type: string
          format: uuid
          nullable: true
        staff:
          $ref: '#/components/schemas/PersonMinimal'
      example:
        id: 35
        year_group_uuid: a901d1a0-d1f1-4761-92bf-6c8192c4352b
        staff:
          first_name: Trevor
          id: 93
          last_name: Staple
          middle_name: null
          preferred_name: Trev
          title:
            id: 1
            name: Mr
          person_type: staff
    School.Academic.HeadBySection:
      title: Head of item by Section
      type: object
      description: Head of item by Section
      properties:
        section:
          $ref: '#/components/schemas/Data.KeyValue'
        section_heads:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
      example:
        section:
          id: 1
          name: Lower School
        section_heads:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
    School.Academic.Department.DepartmentDetail:
      title: Academic Department
      type: object
      description: Academic Department
      properties:
        id:
          type: integer
        academic_year:
          $ref: '#/components/schemas/Data.KeyValue'
        code:
          type: string
        department_heads:
          type: array
          items:
            $ref: '#/components/schemas/School.Academic.HeadBySection'
        name:
          type: string
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
      example:
        id: 3
        academic_year:
          id: 1
          name: 2020/21 Academic Year
        code: SCI
        department_heads:
          - section:
              id: 1
              name: Lower School
            section_heads:
              - departments:
                  - id: 1
                    name: Science
                employment_leave_date: null
                external_id: ST9344
                first_name: Mary
                gender:
                  id: 2
                  name: Female
                id: 5
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                job_title: Teacher
                last_name: McMahnamahna
                middle_name: null
                person_type: staff
                positions:
                  - id: 1
                    name: Teacher
                preferred_name: Mary
                previous_last_name: Mulvihill
                sections:
                  - id: 1
                    name: Lower School
                subjects:
                  - id: 1
                    name: Physics
                status: current
                timetable_code: STMMSP
                roles:
                  - id: 1
                    name: Teacher
                title:
                  id: 4
                  name: Ms
        name: Science
        subjects:
          - id: 1
            name: Physics
    School.AcademicYear.v2:
      title: Academic Year Response
      type: object
      description: Academic Year Response
      x-tags:
        - School
      x-examples:
        2020-2021:
          id: 45
          description: 2020-2021
          date_start: '2020-09-01'
          date_end: '2021-08-31'
      properties:
        id:
          type: integer
          description: Academic Year ID
          minimum: 1
          maximum: 4294967295
          example: 24
          format: int32
        description:
          type: string
          description: Academic year name
          maxLength: 50
          example: 2020-2021
          minLength: 1
        date_start:
          type: string
          description: Academic year start date
          format: date
          example: '2020-09-01'
        date_end:
          type: string
          description: Academic year end date
          format: date
          example: '2021-08-31'
      required:
        - id
        - description
        - date_start
        - date_end
    AcademicStructure.DepartmentListing.v2:
      description: A listing of a Department of a school in its Academic Structure
      type: object
      properties:
        id:
          type: number
        academic_year:
          $ref: '#/components/schemas/School.AcademicYear.v2'
        code:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        subjects:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        department_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Person.Minimal.v2'
        position:
          type: number
      required:
        - id
        - code
        - name
        - subjects
        - department_heads
        - position
    Staff.SelectorListing.v2:
      title: Staff.SelectorListing.v2
      allOf:
        - $ref: '#/components/schemas/Person.Minimal.v2'
        - type: object
          properties:
            job_title:
              type: string
              example: Teacher
              nullable: true
            sections:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            departments:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            subjects:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            positions:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            images:
              type: array
              items:
                $ref: '#/components/schemas/Data.ImageKeyValue.v2'
            gender:
              $ref: '#/components/schemas/Data.KeyValueNullable'
      description: Response object for use in Staff Selector
    AcademicStructure.DepartmentSectionListing.v2:
      description: A Section of a school plus its Section Heads - used in the Department Detail
      type: object
      properties:
        section:
          $ref: '#/components/schemas/Data.KeyValue'
        section_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Staff.SelectorListing.v2'
      required:
        - section_heads
        - section
    AcademicStructure.Department.v2:
      description: Detail of a Department of a school in its Academic Structure
      type: object
      properties:
        id:
          type: number
        academic_year:
          $ref: '#/components/schemas/School.AcademicYear.v2'
        code:
          type: string
          minLength: 1
        department_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/AcademicStructure.DepartmentSectionListing.v2'
        name:
          type: string
          minLength: 1
        subjects:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        can_copy:
          type: boolean
      required:
        - id
        - code
        - name
        - subjects
        - department_heads
    School.Data.Room.Minimal:
      title: Room response minimal object
      type: object
      description: Room in a school (minimal)
      properties:
        id:
          type: integer
        room_code:
          type: string
      example:
        id: 1
        room_code: 6A
    School.Academic.ClassFields:
      title: Academic Class
      type: object
      description: Common Academic Class fields for administering Form, SubjectSet, TutorGroup, ECA
      example:
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: string
        max_students: 40
        name: English 9A
        rooms:
          - id: 1
            room_code: 6A
        short_description: English class year 6 group A
        staff:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        staff_report_writers:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        student_count: 30
        timetable_code: 6AEng
      properties:
        academic_year:
          $ref: '#/components/schemas/Data.KeyValue'
        code:
          type: string
        max_students:
          type: integer
        name:
          type: string
          nullable: true
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room.Minimal'
        short_description:
          type: string
          nullable: true
        staff:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        staff_report_writers:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
          deprecated: true
        student_count:
          type: integer
        timetable_code:
          type: string
          nullable: true
    School.Academic.ExtraCurricularActivity:
      title: Academic Extra Curricular Activity
      type: object
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFields'
        - type: object
          properties:
            id:
              type: integer
            date_start:
              type: string
              format: date
            date_end:
              type: string
              format: date
            year_groups:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
      example:
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: ORCH
        max_students: 40
        name: Orchestra
        rooms:
          - id: 14
            room_code: Music Studio 2
        short_description: School Orchestra
        staff:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        staff_report_writers:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        student_count: 30
        timetable_code: Orch
        id: 54
        date_start: '2019-01-24'
        date_end: '2019-11-24'
        year_groups: []
    School.Academic.Form:
      title: Academic Form
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFields'
        - properties:
            id:
              type: integer
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue'
            student_representatives:
              type: array
              items:
                $ref: '#/components/schemas/Student.Listing'
      type: object
      example:
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: 9A
        max_students: 40
        name: Form 9A
        rooms:
          - id: 12
            room_code: Upper 44
        short_description: Year 9 form group A
        staff:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        staff_report_writers:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        student_count: 30
        timetable_code: 9A
        id: 93
        section:
          id: 2
          name: Middle school
        year_group:
          id: 6
          name: Year 9
        student_representatives:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
    School.Academic.Section:
      title: Academic Section
      type: object
      description: Academic Section
      properties:
        id:
          type: integer
        code:
          type: string
        name:
          type: string
        section_heads:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        year_groups:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        position:
          type: integer
      example:
        id: 5
        code: MS
        name: Middle School
        section_heads:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        year_groups:
          - id: 1
            name: Year 10
        position: 1
    AcademicStructure.SectionListing.v2:
      description: A Section of a school in its Academic Structure
      type: object
      properties:
        id:
          type: number
        code:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        section_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Person.Minimal.v2'
        position:
          type: number
      required:
        - id
        - code
        - name
        - section_heads
        - position
    School.Academic.Subject.SubjectList:
      title: Academic Subject
      type: object
      description: Academic Subject
      properties:
        id:
          type: integer
        code:
          type: string
        department:
          $ref: '#/components/schemas/Data.KeyValue'
        name:
          type: string
        color_option:
          type: integer
        subject_heads:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
      example:
        id: 7
        code: CH
        department:
          id: 1
          name: Science
        name: Chemistry
        color_option: 7
        subject_heads:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
    AcademicStructure.SubjectListing.v2:
      description: A Subject of a school in its Academic Structure
      type: object
      properties:
        id:
          type: number
        code:
          type: string
          minLength: 1
        color_option:
          type: number
        department:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        name:
          type: string
          minLength: 1
        subject_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Person.Minimal.v2'
      required:
        - id
        - code
        - name
        - subject_heads
    School.Academic.Subject.SubjectDetail:
      title: Academic Subject
      type: object
      description: Academic Subject
      properties:
        id:
          type: integer
        academic_year:
          $ref: '#/components/schemas/Data.KeyValue'
        alternative_name:
          type: string
        code:
          type: string
        color_option:
          type: integer
        department:
          $ref: '#/components/schemas/Data.KeyValue'
        name:
          type: string
        subject_heads:
          type: array
          items:
            $ref: '#/components/schemas/School.Academic.HeadBySection'
      example:
        id: 88
        academic_year:
          id: 1
          name: 2020/21 Academic Year
        alternative_name: Life Science
        code: BY
        color_option: 3
        department:
          id: 1
          name: Science
        name: Biology
        subject_heads:
          - section:
              id: 1
              name: Lower School
            section_heads:
              - departments:
                  - id: 1
                    name: Science
                employment_leave_date: null
                external_id: ST9344
                first_name: Mary
                gender:
                  id: 2
                  name: Female
                id: 5
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                job_title: Teacher
                last_name: McMahnamahna
                middle_name: null
                person_type: staff
                positions:
                  - id: 1
                    name: Teacher
                preferred_name: Mary
                previous_last_name: Mulvihill
                sections:
                  - id: 1
                    name: Lower School
                subjects:
                  - id: 1
                    name: Physics
                status: current
                timetable_code: STMMSP
                roles:
                  - id: 1
                    name: Teacher
                title:
                  id: 4
                  name: Ms
    AcademicStructure.SectionHeadListing.v2:
      description: A Section of a school plus its Section Heads - used in the Department Detail
      type: object
      properties:
        section:
          $ref: '#/components/schemas/Data.KeyValue'
        section_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Staff.SelectorListing.v2'
      required:
        - section
        - section_heads
    AcademicStructure.Subject.v2:
      description: A Section of a school in its Academic Structure
      type: object
      properties:
        id:
          type: number
        academic_year:
          type: object
          properties:
            id:
              type: integer
              minimum: 1
              maximum: 4294967295
              example: 654
              format: int32
              description: ID of item
            description:
              type: string
              minLength: 1
              maxLength: 50
              example: 2021-22 Academic Year
              description: Text label for academic year
        alternative_name:
          type: string
          nullable: true
        code:
          type: string
          minLength: 1
        department:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        name:
          type: string
          minLength: 1
        subject_heads:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/AcademicStructure.SectionHeadListing.v2'
        can_copy:
          type: boolean
      required:
        - id
        - academic_year
        - code
        - name
        - subject_heads
    School.Academic.SubjectSet:
      title: Academic Subject Set
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFields'
        - properties:
            id:
              format: int32
              type: integer
            credit_score:
              type: number
              nullable: true
            date_start:
              type: string
              format: date
              nullable: true
            date_end:
              type: string
              format: date
              nullable: true
            qualification:
              $ref: '#/components/schemas/Data.KeyValueNullable'
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            subject:
              $ref: '#/components/schemas/Data.KeyValue'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue'
      type: object
      example:
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: ENG9A
        max_students: 40
        name: English 9A
        rooms:
          - id: 13
            room_code: L12
        short_description: English class year 9 group A
        staff:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        staff_report_writers:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        student_count: 30
        timetable_code: 9AEng
        id: 25
        credit_score: 12
        date_start: '2019-04-24'
        date_end: '2019-09-24'
        qualification:
          id: 1
          name: GCSE
        section:
          id: 2
          name: Middle school
        subject:
          id: 21
          name: English
        year_group:
          id: 6
          name: Year 9
    Parameter.Sort.Code:
      title: Code
      type: object
      description: Sort a list by the code column
      properties:
        code:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.CreditScore:
      title: Credit Score
      type: object
      properties:
        creditScore:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.MaxStudents:
      title: Max Students
      type: object
      properties:
        maxStudents:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.Name:
      title: Name
      type: object
      properties:
        name:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.Section:
      title: Section
      type: object
      properties:
        section:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.StudentCount:
      title: StudentCount
      type: object
      properties:
        studentCount:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.Subject:
      title: Subject
      type: object
      description: Sort a list by subject column
      properties:
        subject:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.YearGroup:
      title: Year Group
      type: object
      description: Sort a list by year group
      properties:
        yearGroup:
          type: string
          enum:
            - asc
            - desc
    School.Data.Room.Listing.v2:
      title: School.Data.Room.Listing.v2
      type: object
      properties:
        id:
          type: integer
          minimum: 1
          maximum: 4294967295
          example: 654
          format: int32
          description: ID of Room item
        code:
          type: string
          minLength: 1
          maxLength: 20
          example: YR7
          description: Code of Room item
    School.Academic.ClassFields.Listing.v2:
      title: School.Academic.ClassFields.Listing.v2
      description: Common Academic Class fields for administering Form, SubjectSet, TutorGroup, ECA - for listing view
      type: object
      properties:
        type:
          type: string
          enum:
            - subject_set
            - form
            - tutor_group
            - eca
          example: subject_set
        code:
          type: string
          example: XYZ
        id:
          type: integer
          example: 100
          format: int32
          minimum: 1
          maximum: 4294967295
        max_students:
          type: integer
          format: int32
          minimum: 0
          nullable: true
          example: 100
        name:
          type: string
          example: Class One
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room.Listing.v2'
        staff:
          type: array
          items:
            $ref: '#/components/schemas/Person.Minimal.v2'
        student_count:
          type: integer
          format: int32
          minimum: 0
          example: 100
      required:
        - type
        - code
        - max_students
        - name
        - rooms
        - staff
        - student_count
    School.Academic.SubjectSet.Listing.v2:
      title: School.Academic.SubjectSet.Listing.v2
      description: Academic Subject Set reduced for listing
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFields.Listing.v2'
        - type: object
          properties:
            credit_score:
              type: number
              format: float
              nullable: true
              example: 25.75
            section:
              $ref: '#/components/schemas/Data.KeyValue.v2'
            subject:
              $ref: '#/components/schemas/Data.KeyValue.v2'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue.v2'
          required:
            - id
            - credit_score
            - section
            - subject
            - year_group
    School.Academic.TutorGroup:
      title: Academic Tutor Group
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFields'
        - properties:
            id:
              type: integer
            section:
              $ref: '#/components/schemas/Data.KeyValueNullable'
      type: object
      example:
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: TG09X
        max_students: 40
        name: Year 9 Tutor Group X
        rooms:
          - id: 4
            room_code: Lobby Lounge
        short_description: Year 9 Tutor Group X
        staff:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        staff_report_writers:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        student_count: 10
        timetable_code: TG9X
        id: 98
        section:
          id: 2
          name: Middle school
    School.Academic.ClassFieldsList:
      title: Academic Class reduced for listing
      type: object
      description: Common Academic Class fields for administering Form, SubjectSet, TutorGroup, ECA - for listing view
      properties:
        class_type:
          type: string
          enum:
            - subject_set
            - form
            - tutor_group
            - eca
        code:
          type: string
        max_students:
          type: integer
        name:
          type: string
          nullable: true
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room.Minimal'
        staff:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        student_count:
          type: integer
      example:
        class_type: subject_set
        code: 06S1/ENGA
        max_students: 40
        name: English 06S1
        rooms:
          - id: 1
            room_code: 6A
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        student_count: 22
    School.Academic.TutorGroupList:
      title: Academic Tutor Group reduced for listing
      type: object
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFieldsList'
        - type: object
          properties:
            id:
              type: integer
            section:
              $ref: '#/components/schemas/Data.KeyValueNullable'
      example:
        class_type: tutor_group
        code: TG09A
        max_students: 40
        name: Year 9 Tutor Group A
        rooms:
          - id: 22
            room_code: Upper 10
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        student_count: 10
        id: 10
        section:
          id: 2
          name: Middle school
    School.Academic.YearGroup:
      title: Academic Year Group
      type: object
      description: Academic Year Group
      properties:
        id:
          type: integer
        academic_year:
          $ref: '#/components/schemas/Data.KeyValue'
        code:
          type: string
        dfe_year:
          type: string
          enum:
            - '0'
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '10'
            - '11'
            - '12'
            - '13'
          nullable: true
        final_year:
          type: boolean
        form_count:
          type: integer
        key_stage:
          type: string
          enum:
            - KS0
            - KS1
            - KS2
            - KS3
            - KS4
            - KS5
          nullable: true
        max_students:
          type: integer
          nullable: true
        name:
          type: string
        position:
          type: integer
        section:
          $ref: '#/components/schemas/Data.KeyPositionValue'
        status:
          type: string
        total_student_count:
          type: integer
        year_group_heads:
          type: array
          items:
            $ref: '#/components/schemas/PersonMinimal'
        uuid:
          type: string
          format: uuid
      example:
        id: 8
        academic_year:
          id: 1
          name: 2020-21 Academic Year
        code: Y9
        dfe_year: '1'
        final_year: false
        form_count: 4
        key_stage: KS5
        max_students: 500
        name: Year 9
        position: 5
        section:
          id: 1
          name: Middle School
          position: 3
        status: active
        total_student_count: 400
        uuid: 28db8526-dc32-4d18-9093-cde010d15b0b
        year_group_heads:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
    Data.Description:
      title: Description Object
      type: object
      properties:
        id:
          type: integer
        description:
          type: string
      example:
        id: 1
        description: Term 1
    School.Academic.Year:
      title: Academic Year
      type: object
      properties:
        id:
          type: integer
        date_start:
          type: string
        date_end:
          type: string
        description:
          type: string
        terms:
          type: array
          items:
            $ref: '#/components/schemas/Data.Description'
        tense:
          description: Field that describes whether the academic year is current, past or in the future
          type: string
      example:
        id: 6
        date_start: '2020-09-01'
        date_end: '2021-08-31'
        description: 2020-21 Academic Year
        terms:
          - id: 1
            description: Term 1
        tense: current
    School.DateRange:
      title: School Config Date Range
      description: A representation of a date range, used to define an Academic Year, a Term, a Holiday, an Inset Day or a Closure Date
      type: object
      properties:
        id:
          type: integer
        description:
          type: string
        date_start:
          type: string
          format: date
        date_end:
          type: string
          format: date
      example:
        id: 4
        description: August bank holiday weekend
        date_start: '2019-08-24'
        date_end: '2019-08-28'
    School.Date:
      title: School Config Single Date
      description: A representation of a single date, used to define an Inset Day
      type: object
      properties:
        id:
          type: integer
        description:
          type: string
        date_value:
          type: string
          format: date
      example:
        id: 44
        description: August inset day
        date_value: '2019-08-24'
    School.Data.Room:
      title: Room response object
      type: object
      description: Room in a school
      properties:
        id:
          type: integer
        description:
          type: string
          nullable: true
        location:
          $ref: '#/components/schemas/Data.LookupTableValue'
        room_capacity:
          type: integer
        room_code:
          type: string
        telephone_extension:
          type: string
          nullable: true
        timetable_code:
          type: string
          nullable: true
      example:
        id: 123
        description: Standard room assigned to Maths department
        location:
          id: 1
          name: Ground floor
          position: 2
          deleted_at: null
          system_value: false
        room_capacity: 50
        room_code: Maths room
        telephone_extension: x123
        timetable_code: 12355AAXP4
    School.RegionalSettings:
      title: Response object for regional settings
      description: Response object for school regional default settings
      type: object
      properties:
        regional_country_id:
          type: integer
          format: int32
        start_day_week:
          type: string
        timezone:
          type: string
      example:
        regional_country_id: 34
        start_day_week: monday
        timezone: Europe/London
    School.CommunicationDetails:
      title: School Communication Details
      description: School Communication and other Details
      type: object
      properties:
        school_name:
          type: string
        school_sms_name:
          type: string
        address:
          type: string
        country:
          $ref: '#/components/schemas/Data.KeyValue'
        phone:
          type: string
        email:
          type: string
        website:
          type: string
        logo:
          $ref: '#/components/schemas/Data.File'
        logo_urls:
          description: School logo urls with defined sizes
          type: object
          properties:
            large:
              type: string
            large-2x:
              type: string
      example:
        school_name: St Hubbins Boys Grammar
        school_sms_name: StHubBoys
        address: 1234 Mockingbird Lane
        country:
          id: 1
          name: United Kingdom
        phone: 555-8575
        email: enquiries@sthubbins.ac.uk
        website: https://www.sthubbins.ac.uk
        logo:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: cormorant.png
          size: 30663
          mime_type: image/png
          purpose: school_logo
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        logo_urls:
          large: https://tempstorage/cormorant.png
          large-2x: https://tempstorage/cormorant-large.png
    Staff:
      title: Root Type for Staff
      description: Information about Staff
      type: object
      properties:
        access_status:
          $ref: '#/components/schemas/AccessStatus'
        multi_realm:
          type: boolean
          description: Indicates whether the user has a multi-realm login
        academic_houses:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        boarding_houses:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        departments:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        email:
          type: string
          format: email
        external_id:
          type: string
          nullable: true
        first_name:
          type: string
        forms:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        id:
          format: int32
          type: integer
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        job_title:
          type: string
          nullable: true
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        person_type:
          type: string
        preferred_name:
          type: string
          nullable: true
        profile_image:
          $ref: '#/components/schemas/Data.File'
          nullable: true
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room.Minimal'
        sections:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        status:
          type: string
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
      example:
        access_status: invited
        multi_realm: false
        academic_houses:
          - id: 1
            name: Green House
        boarding_houses:
          - id: 1
            name: Green House
        departments:
          - id: 4
            name: Drama
        email: user@example.com
        external_id: ST5466X
        first_name: Benjamin
        forms:
          - id: 10
            name: Standard 9
        gender:
          id: 1
          name: Male
        id: 12
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
        job_title: Head of Drama
        last_name: Kakistos
        middle_name: null
        person_type: staff
        preferred_name: Ben
        profile_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: example.jpg
          size: 306691
          mime_type: image/jpg
          purpose: staff_profile_image
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        roles:
          - id: 4
            name: Teacher
        rooms: []
        sections:
          - id: 2
            name: Upper School
        status: current
        title:
          id: 1
          name: Mr
    School.Academic.ExtraCurricularActivityList:
      title: Academic Extra Curricular Activity reduced for listing
      type: object
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFieldsList'
        - type: object
          properties:
            id:
              type: integer
            year_groups:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
      example:
        class_type: eca
        code: ORCH
        max_students: 50
        name: Orchestra
        rooms:
          - id: 88
            room_code: Music Suite
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        student_count: 22
        id: 353
        year_groups: []
    School.Academic.FormList:
      title: Academic Form reduced for listing
      type: object
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFieldsList'
        - type: object
          properties:
            id:
              type: integer
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue'
            student_representatives:
              type: array
              items:
                $ref: '#/components/schemas/PersonMinimal'
      example:
        class_type: form
        code: 09A
        max_students: 40
        name: Form Group 9A
        rooms:
          - id: 1
            room_code: 6A
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        student_count: 22
        id: 33
        section:
          id: 2
          name: Middle school
        year_group:
          id: 3
          name: Year 9
        student_representatives:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
    School.Academic.SubjectSetList:
      title: Academic Subject Set reduced for listing
      type: object
      allOf:
        - $ref: '#/components/schemas/School.Academic.ClassFieldsList'
        - type: object
          properties:
            id:
              format: int32
              type: integer
            credit_score:
              type: number
              nullable: true
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            subject:
              $ref: '#/components/schemas/Data.KeyValue'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue'
            color_option:
              type: integer
      example:
        class_type: subject_set
        code: 06S1/ENGA
        max_students: 40
        name: English 06S1
        rooms:
          - id: 1
            room_code: 6A
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        student_count: 22
        id: 36
        credit_score: 100
        section:
          id: 1
          name: Lower School
        subject:
          id: 5
          name: English
        year_group:
          id: 4
          name: Year 6
        color_option: 5
    School.Academic.Department.DepartmentList:
      title: Academic Department
      type: object
      description: Academic Department
      properties:
        id:
          type: integer
        code:
          type: string
        department_heads:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        name:
          type: string
        position:
          type: integer
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
      example:
        id: 4
        code: IT
        department_heads:
          - departments:
              - id: 4
                name: Information Technology
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        name: Information Technology
        position: 1
        subjects:
          - id: 1
            name: Computing
          - id: 2
            name: Databases
          - id: 3
            name: Web Design
    Address:
      title: Address output object
      description: Output object containing an address
      type: object
      properties:
        id:
          format: int32
          type: integer
        country:
          $ref: '#/components/schemas/Data.KeyValue'
        organization:
          type: string
          maxLength: 128
        address_line_1:
          type: string
          maxLength: 128
        address_line_2:
          type: string
          maxLength: 128
        locality:
          type: string
          maxLength: 128
        administrative_area:
          type: string
          maxLength: 128
        postal_code:
          type: string
          maxLength: 32
      example:
        id: 123
        country:
          id: 257
          name: UK
        organization: BBC News
        address_line_1: 123 Sesame Street
        address_line_2: ''
        locality: North End
        administrative_area: Avon
        postal_code: BS4 EV4
    AddressMapping:
      title: Root type for person/address mapping
      description: Address information about a person/address mapping
      type: object
      properties:
        id:
          format: int32
          type: integer
        address_types:
          type: array
          items:
            $ref: '#/components/schemas/Data.LookupTableValue'
        position:
          format: int32
          type: integer
        address:
          $ref: '#/components/schemas/Address'
        formatted_address:
          type: string
      example:
        id: 147
        address_types:
          - id: 2
            name: Billing
            position: 1
            deleted_at: null
            system_value: true
        position: 1
        address:
          id: 123
          country:
            id: 257
            name: UK
          organization: BBC News
          address_line_1: 123 Sesame Street
          address_line_2: ''
          locality: North End
          administrative_area: Avon
          postal_code: BS4 EV4
        formatted_address: BBC News, 123 Sesame Street, North End, Avon, BS4 EV4
    Staff.ContactDetails:
      title: Staff emergency contact details
      description: A single staff member's emergency contact details not otherwise covered in Communications
      type: object
      properties:
        emergency_contact:
          type: string
      example:
        emergency_contact: Mr Hercules Jones, 2045 Carpet Avenue, Pittsburgh. Call 1-800-LABRADOR after 4pm.
    Data.Communication:
      title: Data Communication response
      description: Data Communication response schema
      type: object
      properties:
        id:
          format: int32
          type: integer
        type:
          type: string
        category:
          type: string
          enum:
            - email
            - phone
        deleted_at:
          type: string
          format: date-time
          nullable: true
        system_value:
          type: boolean
      example:
        id: 11
        type: Mobile
        category: phone
        deleted_at: null
        system_value: true
    EmailAddress:
      title: Email Address
      description: Email addresses for Student or Contact user
      type: object
      properties:
        id:
          format: int32
          type: integer
        email:
          type: string
        communication:
          $ref: '#/components/schemas/Data.Communication'
        position:
          format: int32
          type: integer
      example:
        id: 9
        email: contact@wcbs.co.uk
        communication:
          id: 15
          type: Email
          category: email
          deleted_at: null
          system_value: true
        position: 2
    Staff.EmploymentDetails:
      title: Root Type for Staff Employment Details
      description: Information about Staff Employment Details
      type: object
      properties:
        employment_contract:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        employment_start_date:
          format: date
          type: string
          nullable: true
        employment_leave_date:
          format: date
          type: string
          nullable: true
        graduate:
          type: boolean
        nqt:
          type: boolean
        nqt_expire_date:
          format: date
          type: string
          nullable: true
        payroll_reference:
          type: string
          nullable: true
        personal_summary:
          type: string
          nullable: true
        qualifications:
          type: string
          nullable: true
        reference:
          type: boolean
        reference_number:
          type: string
          nullable: true
      example:
        employment_contract:
          id: 1
          name: Full time
        employment_start_date: '2010-08-24'
        employment_leave_date: '2019-08-24'
        graduate: true
        nqt: true
        nqt_expire_date: '2019-08-24'
        payroll_reference: 27B/6
        personal_summary: Diligent worker
        qualifications: PhD Marine Sport
        reference: true
        reference_number: OO2332x/wasp
    Staff.FurtherDetails:
      title: Staff Further Details
      description: Information about Staff Further Details
      type: object
      properties:
        site_resident:
          type: boolean
        children:
          type: array
          items:
            $ref: '#/components/schemas/PersonMinimal'
        consent_photo:
          type: boolean
        first_aider:
          type: boolean
        first_aid_qualified:
          type: string
          maxLength: 2000
          nullable: true
        first_aid_expire_date:
          format: date
          type: string
          nullable: true
      example:
        site_resident: true
        children:
          - first_name: Kevin
            id: 3
            last_name: Smoot
            middle_name: null
            name_in_local_language: null
            preferred_name: null
            person_type: student
        consent_photo: true
        first_aider: false
        first_aid_qualified: null
        first_aid_expire_date: null
    Staff.PersonalDetails:
      title: Root Type for Staff Personal Details
      description: Information about Staff Personal Details
      type: object
      properties:
        date_of_birth:
          format: date
          type: string
          nullable: true
        ethnicity:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        nationality:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        previous_last_name:
          type: string
          nullable: true
        marital_status:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        profile_signature_image:
          $ref: '#/components/schemas/Data.File'
          nullable: true
        signature_images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
      example:
        date_of_birth: '1979-08-24'
        ethnicity:
          id: 100
          name: Other
        gender:
          id: 1
          name: Male
        nationality:
          id: 89
          name: British
        previous_last_name: null
        marital_status:
          id: 3
          name: Single
        profile_signature_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: staff_sig.jpg
          size: 50669
          mime_type: image/jpg
          purpose: staff_profile_signature_image
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        signature_images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
    PhoneNumber:
      title: Phone Number
      description: Phone number for Student or Contact user
      type: object
      properties:
        id:
          format: int32
          type: integer
        phone:
          type: string
        communication:
          $ref: '#/components/schemas/Data.Communication'
        position:
          format: int32
          type: integer
      example:
        id: 1
        phone: 01782 555 555
        communication:
          id: 11
          type: Home phone
          category: phone
          deleted_at: null
          system_value: true
        position: 1
    Students.House:
      title: Root Type for House
      description: Information about House
      type: object
      properties:
        id:
          format: int32
          type: integer
        address:
          type: string
          nullable: true
        code:
          type: string
        genders:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        house_parents:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Staff.Listing'
        house_type:
          type: string
          enum:
            - boarding
            - academic
            - both
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        max_students:
          format: int32
          type: integer
          nullable: true
        name:
          type: string
        note:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        profile_image:
          $ref: '#/components/schemas/Data.File'
        staff:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        system_profile_image:
          type: string
          nullable: true
        is_active:
          type: boolean
      example:
        id: 9
        address: null
        code: GH
        genders:
          - id: 1
            name: Male
        house_parents:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        house_type: boarding
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
        max_students: 100
        name: Green House
        note: null
        phone: null
        profile_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: example.jpg
          size: 306691
          mime_type: image/jpg
          purpose: house_profile_image
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        staff:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        system_profile_image: aqua
        is_active: true
    Timetable.TimetableWarning:
      title: Timetable Warning
      description: Timetable warning object
      type: object
      example:
        id: 111
        warning_type: room_in_use
        room:
          id: 123
          description: Standard room assigned to Maths department
          location:
            id: 1
            name: Ground floor
            position: 2
            deleted_at: null
            system_value: false
          room_capacity: 50
          room_code: Maths room
          telephone_extension: x123
          timetable_code: 12355AAXP4
        staff:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        student:
          first_name: Mary
          id: 56
          last_name: Mulvihill
          middle_name: null
          name_in_local_language: null
          preferred_name: null
          title:
            id: 4
            name: Ms
          person_type: student
        permitted: true
        class:
          academic_year:
            id: 1
            name: 2020-21 Academic Year
          code: ORCH
          max_students: 40
          name: Orchestra
          rooms:
            - id: 14
              room_code: Music Studio 2
          short_description: School Orchestra
          staff:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          staff_report_writers:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          student_count: 30
          timetable_code: Orch
          id: 54
          date_start: '2019-01-24'
          date_end: '2019-11-24'
          year_groups: []
        house:
          id: 9
          address: null
          code: GH
          genders:
            - id: 1
              name: Male
          house_parents:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          house_type: boarding
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
          max_students: 100
          name: Green House
          note: null
          phone: null
          profile_image:
            id: 68d75310-d858-4d75-b47b-3e7089cceca8
            name: example.jpg
            size: 306691
            mime_type: image/jpg
            purpose: house_profile_image
            uploaded_by_id: 163
            created_at: '2019-08-24T14:15:22Z'
            deleted_at: null
          staff:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          system_profile_image: aqua
      properties:
        id:
          type: integer
        warning_type:
          type: string
          enum:
            - room_in_use
            - room_over_capacity
            - room_not_assigned
            - staff_unavailable
            - staff_already_assigned
            - student_already_assigned
            - staff_not_assigned
            - lesson_duplicated
        room:
          $ref: '#/components/schemas/School.Data.Room'
        staff:
          $ref: '#/components/schemas/PersonMinimal'
        student:
          $ref: '#/components/schemas/PersonMinimal'
        permitted:
          type: boolean
        class:
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/School.Academic.ExtraCurricularActivity'
            - $ref: '#/components/schemas/School.Academic.Form'
            - $ref: '#/components/schemas/School.Academic.SubjectSet'
            - $ref: '#/components/schemas/School.Academic.TutorGroup'
        house:
          $ref: '#/components/schemas/Students.House'
    Timetable.TimetableAllocation:
      title: Timetable Allocation
      description: Timetable allocation object
      type: object
      example:
        id: 657
        class:
          academic_year:
            id: 1
            name: 2020-21 Academic Year
          code: ORCH
          max_students: 40
          name: Orchestra
          rooms:
            - id: 14
              room_code: Music Studio 2
          short_description: School Orchestra
          staff:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          staff_report_writers:
            - first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
          student_count: 30
          timetable_code: Orch
          id: 54
          date_start: '2019-01-24'
          date_end: '2019-11-24'
          year_groups: []
        period_span: single
        period_span_parent_id: 33
        rooms:
          - id: 123
            description: Standard room assigned to Maths department
            location:
              id: 1
              name: Ground floor
              position: 2
              deleted_at: null
              system_value: false
            room_capacity: 50
            room_code: Maths room
            telephone_extension: x123
            timetable_code: 12355AAXP4
        allocated_persons:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
        duty: true
        warnings:
          - id: 111
            warning_type: room_in_use
            room:
              id: 123
              description: Standard room assigned to Maths department
              location:
                id: 1
                name: Ground floor
                position: 2
                deleted_at: null
                system_value: false
              room_capacity: 50
              room_code: Maths room
              telephone_extension: x123
              timetable_code: 12355AAXP4
            staff:
              first_name: John
              id: 33
              last_name: Smith
              middle_name: Smyth
              name_in_local_language: Johan
              preferred_name: Jon
              title:
                id: 1
                name: Mr
              person_type: staff
            student:
              first_name: Mary
              id: 56
              last_name: Mulvihill
              middle_name: null
              name_in_local_language: null
              preferred_name: null
              title:
                id: 4
                name: Ms
              person_type: student
            permitted: true
            class:
              academic_year:
                id: 1
                name: 2020-21 Academic Year
              code: ORCH
              max_students: 40
              name: Orchestra
              rooms:
                - id: 14
                  room_code: Music Studio 2
              short_description: School Orchestra
              staff:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              staff_report_writers:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              student_count: 30
              timetable_code: Orch
              id: 54
              date_start: '2019-01-24'
              date_end: '2019-11-24'
              year_groups: []
            house:
              id: 9
              address: null
              code: GH
              genders:
                - id: 1
                  name: Male
              house_parents:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              house_type: boarding
              images:
                - type: thumbnail
                  url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
              max_students: 100
              name: Green House
              note: null
              phone: null
              profile_image:
                id: 68d75310-d858-4d75-b47b-3e7089cceca8
                name: example.jpg
                size: 306691
                mime_type: image/jpg
                purpose: house_profile_image
                uploaded_by_id: 163
                created_at: '2019-08-24T14:15:22Z'
                deleted_at: null
              staff:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              system_profile_image: aqua
      properties:
        id:
          type: integer
        class:
          anyOf:
            - $ref: '#/components/schemas/School.Academic.ExtraCurricularActivity'
            - $ref: '#/components/schemas/School.Academic.Form'
            - $ref: '#/components/schemas/School.Academic.TutorGroup'
            - $ref: '#/components/schemas/School.Academic.SubjectSet'
        period_span:
          type: string
          enum:
            - single
            - double
            - triple
        period_span_parent_id:
          type: integer
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room'
        allocated_persons:
          type: array
          items:
            $ref: '#/components/schemas/PersonMinimal'
        duty:
          type: boolean
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Timetable.TimetableWarning'
    Timetable.TimetablePeriod:
      title: Timetable Period
      description: Timetable Period object
      type: object
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - period
            - break
        time_from:
          type: string
          format: time
        time_to:
          type: string
          format: time
        timetable_import_number:
          type: integer
        label:
          type: string
        group_restriction_subject_set:
          type: integer
        group_restriction_form:
          type: integer
        group_restriction_tutor_group:
          type: integer
        group_restriction_eca:
          type: integer
        group_restriction_house:
          type: integer
        group_restriction_duty:
          type: integer
        attendance_period:
          type: integer
        attendance_session:
          type: string
          enum:
            - am
            - pm
          nullable: true
        allocation:
          type: array
          items:
            $ref: '#/components/schemas/Timetable.TimetableAllocation'
      example:
        id: 455
        type: period
        time_from: '08:00:00'
        time_to: '09:00:00'
        timetable_import_number: 1
        label: New Slot
        group_restriction_subject_set: 0
        group_restriction_form: 0
        group_restriction_tutor_group: 0
        group_restriction_eca: 1
        group_restriction_house: 0
        group_restriction_duty: 0
        attendance_period: 0
        attendance_session: am
        allocation:
          - id: 657
            class:
              academic_year:
                id: 1
                name: 2020-21 Academic Year
              code: ORCH
              max_students: 40
              name: Orchestra
              rooms:
                - id: 14
                  room_code: Music Studio 2
              short_description: School Orchestra
              staff:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              staff_report_writers:
                - first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
              student_count: 30
              timetable_code: Orch
              id: 54
              date_start: '2019-01-24'
              date_end: '2019-11-24'
              year_groups: []
            period_span: single
            period_span_parent_id: 33
            rooms:
              - id: 123
                description: Standard room assigned to Maths department
                location:
                  id: 1
                  name: Ground floor
                  position: 2
                  deleted_at: null
                  system_value: false
                room_capacity: 50
                room_code: Maths room
                telephone_extension: x123
                timetable_code: 12355AAXP4
            allocated_persons:
              - first_name: John
                id: 33
                last_name: Smith
                middle_name: Smyth
                name_in_local_language: Johan
                preferred_name: Jon
                title:
                  id: 1
                  name: Mr
                person_type: staff
            duty: true
            warnings:
              - id: 111
                warning_type: room_in_use
                room:
                  id: 123
                  description: Standard room assigned to Maths department
                  location:
                    id: 1
                    name: Ground floor
                    position: 2
                    deleted_at: null
                    system_value: false
                  room_capacity: 50
                  room_code: Maths room
                  telephone_extension: x123
                  timetable_code: 12355AAXP4
                staff:
                  first_name: John
                  id: 33
                  last_name: Smith
                  middle_name: Smyth
                  name_in_local_language: Johan
                  preferred_name: Jon
                  title:
                    id: 1
                    name: Mr
                  person_type: staff
                student:
                  first_name: Mary
                  id: 56
                  last_name: Mulvihill
                  middle_name: null
                  name_in_local_language: null
                  preferred_name: null
                  title:
                    id: 4
                    name: Ms
                  person_type: student
                permitted: true
                class:
                  academic_year:
                    id: 1
                    name: 2020-21 Academic Year
                  code: ORCH
                  max_students: 40
                  name: Orchestra
                  rooms:
                    - id: 14
                      room_code: Music Studio 2
                  short_description: School Orchestra
                  staff:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  staff_report_writers:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  student_count: 30
                  timetable_code: Orch
                  id: 54
                  date_start: '2019-01-24'
                  date_end: '2019-11-24'
                  year_groups: []
                house:
                  id: 9
                  address: null
                  code: GH
                  genders:
                    - id: 1
                      name: Male
                  house_parents:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  house_type: boarding
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
                  max_students: 100
                  name: Green House
                  note: null
                  phone: null
                  profile_image:
                    id: 68d75310-d858-4d75-b47b-3e7089cceca8
                    name: example.jpg
                    size: 306691
                    mime_type: image/jpg
                    purpose: house_profile_image
                    uploaded_by_id: 163
                    created_at: '2019-08-24T14:15:22Z'
                    deleted_at: null
                  staff:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  system_profile_image: aqua
    Timetable.TimetableDay:
      title: Timetable Day
      description: Timetable Day object
      type: object
      properties:
        day_number:
          type: integer
        label_week:
          type: string
        label_day:
          type: string
        periods:
          type: array
          items:
            $ref: '#/components/schemas/Timetable.TimetablePeriod'
      example:
        day_number: 1
        label_week: Week A
        label_day: Monday
        periods:
          - id: 455
            type: period
            time_from: '08:00:00'
            time_to: '09:00:00'
            timetable_import_number: 1
            label: New Slot
            group_restriction_subject_set: 0
            group_restriction_form: 0
            group_restriction_tutor_group: 0
            group_restriction_eca: 1
            group_restriction_house: 0
            group_restriction_duty: 0
            attendance_period: 0
            attendance_session: am
            allocation:
              - id: 657
                class:
                  academic_year:
                    id: 1
                    name: 2020-21 Academic Year
                  code: ORCH
                  max_students: 40
                  name: Orchestra
                  rooms:
                    - id: 14
                      room_code: Music Studio 2
                  short_description: School Orchestra
                  staff:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  staff_report_writers:
                    - first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                  student_count: 30
                  timetable_code: Orch
                  id: 54
                  date_start: '2019-01-24'
                  date_end: '2019-11-24'
                  year_groups: []
                period_span: single
                period_span_parent_id: 33
                rooms:
                  - id: 123
                    description: Standard room assigned to Maths department
                    location:
                      id: 1
                      name: Ground floor
                      position: 2
                      deleted_at: null
                      system_value: false
                    room_capacity: 50
                    room_code: Maths room
                    telephone_extension: x123
                    timetable_code: 12355AAXP4
                allocated_persons:
                  - first_name: John
                    id: 33
                    last_name: Smith
                    middle_name: Smyth
                    name_in_local_language: Johan
                    preferred_name: Jon
                    title:
                      id: 1
                      name: Mr
                    person_type: staff
                duty: true
                warnings:
                  - id: 111
                    warning_type: room_in_use
                    room:
                      id: 123
                      description: Standard room assigned to Maths department
                      location:
                        id: 1
                        name: Ground floor
                        position: 2
                        deleted_at: null
                        system_value: false
                      room_capacity: 50
                      room_code: Maths room
                      telephone_extension: x123
                      timetable_code: 12355AAXP4
                    staff:
                      first_name: John
                      id: 33
                      last_name: Smith
                      middle_name: Smyth
                      name_in_local_language: Johan
                      preferred_name: Jon
                      title:
                        id: 1
                        name: Mr
                      person_type: staff
                    student:
                      first_name: Mary
                      id: 56
                      last_name: Mulvihill
                      middle_name: null
                      name_in_local_language: null
                      preferred_name: null
                      title:
                        id: 4
                        name: Ms
                      person_type: student
                    permitted: true
                    class:
                      academic_year:
                        id: 1
                        name: 2020-21 Academic Year
                      code: ORCH
                      max_students: 40
                      name: Orchestra
                      rooms:
                        - id: 14
                          room_code: Music Studio 2
                      short_description: School Orchestra
                      staff:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      staff_report_writers:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      student_count: 30
                      timetable_code: Orch
                      id: 54
                      date_start: '2019-01-24'
                      date_end: '2019-11-24'
                      year_groups: []
                    house:
                      id: 9
                      address: null
                      code: GH
                      genders:
                        - id: 1
                          name: Male
                      house_parents:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      house_type: boarding
                      images:
                        - type: thumbnail
                          url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
                      max_students: 100
                      name: Green House
                      note: null
                      phone: null
                      profile_image:
                        id: 68d75310-d858-4d75-b47b-3e7089cceca8
                        name: example.jpg
                        size: 306691
                        mime_type: image/jpg
                        purpose: house_profile_image
                        uploaded_by_id: 163
                        created_at: '2019-08-24T14:15:22Z'
                        deleted_at: null
                      staff:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      system_profile_image: aqua
    Timetable.Person:
      title: Detail view of a Timetable (will be extended long term to include other events within the system such as exams and events)
      description: Timetable details
      type: object
      properties:
        timetables:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              time_from:
                type: string
                format: time
              time_to:
                type: string
                format: time
              days:
                type: array
                items:
                  $ref: '#/components/schemas/Timetable.TimetableDay'
      example:
        timetables:
          - id: 4
            name: Base Timetable
            time_from: '08:00:00'
            time_to: '16:30:00'
            days:
              - day_number: 1
                label_week: Week A
                label_day: Monday
                periods:
                  - id: 455
                    type: period
                    time_from: '08:00:00'
                    time_to: '09:00:00'
                    timetable_import_number: 1
                    label: New Slot
                    group_restriction_subject_set: 0
                    group_restriction_form: 0
                    group_restriction_tutor_group: 0
                    group_restriction_eca: 1
                    group_restriction_house: 0
                    group_restriction_duty: 0
                    attendance_period: 0
                    attendance_session: am
                    allocation:
                      - id: 657
                        class:
                          academic_year:
                            id: 1
                            name: 2020-21 Academic Year
                          code: ORCH
                          max_students: 40
                          name: Orchestra
                          rooms:
                            - id: 14
                              room_code: Music Studio 2
                          short_description: School Orchestra
                          staff:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          staff_report_writers:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          student_count: 30
                          timetable_code: Orch
                          id: 54
                          date_start: '2019-01-24'
                          date_end: '2019-11-24'
                          year_groups: []
                        period_span: single
                        period_span_parent_id: 33
                        rooms:
                          - id: 123
                            description: Standard room assigned to Maths department
                            location:
                              id: 1
                              name: Ground floor
                              position: 2
                              deleted_at: null
                              system_value: false
                            room_capacity: 50
                            room_code: Maths room
                            telephone_extension: x123
                            timetable_code: 12355AAXP4
                        allocated_persons:
                          - access_status: invited
                            academic_houses:
                              - id: 1
                                name: Green House
                            boarding_houses:
                              - id: 1
                                name: Green House
                            departments:
                              - id: 4
                                name: Drama
                            email: user@example.com
                            external_id: ST5466X
                            first_name: Benjamin
                            forms:
                              - id: 10
                                name: Standard 9
                            gender:
                              id: 1
                              name: Male
                            id: 12
                            images:
                              - type: thumbnail
                                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                            job_title: Head of Drama
                            last_name: Kakistos
                            middle_name: null
                            person_type: staff
                            preferred_name: Ben
                            profile_image:
                              id: 68d75310-d858-4d75-b47b-3e7089cceca8
                              name: example.jpg
                              size: 306691
                              mime_type: image/jpg
                              purpose: staff_profile_image
                              uploaded_by_id: 163
                              created_at: '2019-08-24T14:15:22Z'
                              deleted_at: null
                            roles:
                              - id: 4
                                name: Teacher
                            rooms: []
                            sections:
                              - id: 2
                                name: Upper School
                            status: current
                            title:
                              id: 1
                              name: Mr
                        duty: true
                        warnings:
                          - id: 111
                            warning_type: room_in_use
                            room:
                              id: 123
                              description: Standard room assigned to Maths department
                              location:
                                id: 1
                                name: Ground floor
                                position: 2
                                deleted_at: null
                                system_value: false
                              room_capacity: 50
                              room_code: Maths room
                              telephone_extension: x123
                              timetable_code: 12355AAXP4
                            staff:
                              access_status: invited
                              academic_houses:
                                - id: 1
                                  name: Green House
                              boarding_houses:
                                - id: 1
                                  name: Green House
                              departments:
                                - id: 4
                                  name: Drama
                              email: user@example.com
                              external_id: ST5466X
                              first_name: Benjamin
                              forms:
                                - id: 10
                                  name: Standard 9
                              gender:
                                id: 1
                                name: Male
                              id: 12
                              images:
                                - type: thumbnail
                                  url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                              job_title: Head of Drama
                              last_name: Kakistos
                              middle_name: null
                              person_type: staff
                              preferred_name: Ben
                              profile_image:
                                id: 68d75310-d858-4d75-b47b-3e7089cceca8
                                name: example.jpg
                                size: 306691
                                mime_type: image/jpg
                                purpose: staff_profile_image
                                uploaded_by_id: 163
                                created_at: '2019-08-24T14:15:22Z'
                                deleted_at: null
                              roles:
                                - id: 4
                                  name: Teacher
                              rooms: []
                              sections:
                                - id: 2
                                  name: Upper School
                              status: current
                              title:
                                id: 1
                                name: Mr
                            student:
                              id: 56
                              access_status: invited
                              academic_house:
                                id: 1
                                name: Green House
                              boarding_type:
                                id: 1
                                name: Full Time Boarder
                              boarding_house:
                                id: 1
                                name: Green House
                              country_of_birth:
                                id: 22
                                name: Barbados
                              date_of_birth: '2010-08-24'
                              deleted_at: null
                              ethnicity:
                                id: 8
                                name: Other
                              enrolment_status: current
                              external_id: MX99328
                              faith:
                                id: 1
                                name: Christian
                              first_name: Miles
                              gender:
                                id: 1
                                name: Male
                              has_global_note: false
                              form:
                                id: 8
                                name: Form 4
                                staff:
                                  - departments:
                                      - id: 1
                                        name: Science
                                    employment_leave_date: null
                                    external_id: ST9344
                                    first_name: Mary
                                    gender:
                                      id: 2
                                      name: Female
                                    id: 5
                                    images:
                                      - type: thumbnail
                                        url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                                    job_title: Teacher
                                    last_name: McMahnamahna
                                    middle_name: null
                                    person_type: staff
                                    positions:
                                      - id: 1
                                        name: Teacher
                                    preferred_name: Mary
                                    previous_last_name: Mulvihill
                                    sections:
                                      - id: 1
                                        name: Lower School
                                    subjects:
                                      - id: 1
                                        name: Physics
                                    status: current
                                    timetable_code: STMMSP
                                    roles:
                                      - id: 1
                                        name: Teacher
                                    title:
                                      id: 4
                                      name: Ms
                                section:
                                  id: 1
                                  name: Lower School
                                year_group:
                                  id: 1
                                  name: Year 4
                              images:
                                - type: thumbnail
                                  url: https://wcbs-hub.imgix.net/S999/student_profile_image/36/123123.jpg
                              language_first:
                                id: 1
                                name: English
                              language_second:
                                id: 13
                                name: Farsi
                              last_login: '2019-08-24T14:15:22Z'
                              last_name: Whyde
                              learning_support_record_summary: []
                              medical_condition_severity:
                                id: 1
                                name: High
                                position: 1
                              middle_name: null
                              name_in_local_language: null
                              national_identity: null
                              nationalities:
                                - id: 22
                                  name: British
                              person_type: stduent
                              preferred_name: null
                              primary_email: user@example.com
                              profile_image:
                                id: 68d75310-d858-4d75-b47b-3e7089cceca8
                                name: example.doc
                                size: 306691
                                mime_type: application/msword
                                purpose: learning_support_record
                                uploaded_by_id: 163
                                created_at: '2019-08-24T14:15:22Z'
                                deleted_at: null
                              tags:
                                - id: 5
                                  type:
                                    id: 4
                                    name: Attendance Issues
                                    type: text
                                    color_option: 8
                                  text: Often missing from morning roll call
                                  number: null
                                  date: '2019-08-24'
                            permitted: true
                            class:
                              academic_year:
                                id: 1
                                name: 2020-21 Academic Year
                              code: ORCH
                              max_students: 40
                              name: Orchestra
                              rooms:
                                - id: 14
                                  room_code: Music Studio 2
                              short_description: School Orchestra
                              staff:
                                - first_name: John
                                  id: 33
                                  last_name: Smith
                                  middle_name: Smyth
                                  name_in_local_language: Johan
                                  preferred_name: Jon
                                  title:
                                    id: 1
                                    name: Mr
                                  person_type: staff
                              staff_report_writers:
                                - first_name: John
                                  id: 33
                                  last_name: Smith
                                  middle_name: Smyth
                                  name_in_local_language: Johan
                                  preferred_name: Jon
                                  title:
                                    id: 1
                                    name: Mr
                                  person_type: staff
                              student_count: 30
                              timetable_code: Orch
                              id: 54
                              date_start: '2019-01-24'
                              date_end: '2019-11-24'
                              year_groups: []
                            house:
                              id: 9
                              address: null
                              code: GH
                              genders:
                                - id: 1
                                  name: Male
                              house_parents:
                                - departments:
                                    - id: 1
                                      name: Science
                                  employment_leave_date: null
                                  external_id: ST9344
                                  first_name: Mary
                                  gender:
                                    id: 2
                                    name: Female
                                  id: 5
                                  images:
                                    - type: thumbnail
                                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                                  job_title: Teacher
                                  last_name: McMahnamahna
                                  middle_name: null
                                  person_type: staff
                                  positions:
                                    - id: 1
                                      name: Teacher
                                  preferred_name: Mary
                                  previous_last_name: Mulvihill
                                  sections:
                                    - id: 1
                                      name: Lower School
                                  subjects:
                                    - id: 1
                                      name: Physics
                                  status: current
                                  timetable_code: STMMSP
                                  roles:
                                    - id: 1
                                      name: Teacher
                                  title:
                                    id: 4
                                    name: Ms
                              house_type: boarding
                              images:
                                - type: thumbnail
                                  url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
                              max_students: 100
                              name: Green House
                              note: null
                              phone: null
                              profile_image:
                                id: 68d75310-d858-4d75-b47b-3e7089cceca8
                                name: example.jpg
                                size: 306691
                                mime_type: image/jpg
                                purpose: house_profile_image
                                uploaded_by_id: 163
                                created_at: '2019-08-24T14:15:22Z'
                                deleted_at: null
                              staff:
                                - departments:
                                    - id: 1
                                      name: Science
                                  employment_leave_date: null
                                  external_id: ST9344
                                  first_name: Mary
                                  gender:
                                    id: 2
                                    name: Female
                                  id: 5
                                  images:
                                    - type: thumbnail
                                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                                  job_title: Teacher
                                  last_name: McMahnamahna
                                  middle_name: null
                                  person_type: staff
                                  positions:
                                    - id: 1
                                      name: Teacher
                                  preferred_name: Mary
                                  previous_last_name: Mulvihill
                                  sections:
                                    - id: 1
                                      name: Lower School
                                  subjects:
                                    - id: 1
                                      name: Physics
                                  status: current
                                  timetable_code: STMMSP
                                  roles:
                                    - id: 1
                                      name: Teacher
                                  title:
                                    id: 4
                                    name: Ms
                              system_profile_image: aqua
    Timetable.Calendar.Person:
      title: Detail view of a Calendar
      description: Calendar Event details
      type: object
      properties:
        calendar:
          type: array
          items:
            anyOf:
              - properties:
                  entry_type:
                    enum:
                      - timetable
                  timetable:
                    type: object
                    properties:
                      id:
                        type: integer
                      description:
                        type: string
                  period:
                    type: object
                    properties:
                      id:
                        type: integer
                      type:
                        type: string
                        enum:
                          - break
                          - period
                      time_from:
                        type: string
                        format: time
                      time_to:
                        type: string
                        format: time
                      label:
                        type: string
                      attendance_period:
                        type: integer
                        minimum: 1
                        maximum: 1
                        nullable: true
                      attendance_session:
                        nullable: true
                        anyOf:
                          - enum:
                              - am
                              - pm
                        type: string
                  allocation:
                    nullable: true
                    anyOf:
                      - $ref: '#/components/schemas/Timetable.TimetableAllocation'
                  student_count:
                    nullable: true
                    type: integer
                  color_option:
                    type: integer
              - properties:
                  event_type:
                    enum:
                      - inset
                  id:
                    type: integer
                  description:
                    type: string
                  date_value:
                    type: string
                    format: date
              - properties:
                  event_type:
                    enum:
                      - holiday
                      - closure
                  id:
                    type: integer
                  description:
                    type: string
                  date_start:
                    type: string
                    format: date
                  date_end:
                    type: string
                    format: date
            type: object
      example:
        calendar:
          - entry_type: timetable
            timetable:
              id: 1
              description: Base Timetable
            period:
              id: 44
              type: break
              time_from: '10:00:00'
              time_to: '10:20:00'
              label: recess
              attendance_period: 4
              attendance_session: null
            allocation:
              id: 657
              class:
                academic_year:
                  id: 1
                  name: 2020-21 Academic Year
                code: ORCH
                max_students: 40
                name: Orchestra
                rooms:
                  - id: 14
                    room_code: Music Studio 2
                short_description: School Orchestra
                staff:
                  - first_name: John
                    id: 33
                    last_name: Smith
                    middle_name: Smyth
                    name_in_local_language: Johan
                    preferred_name: Jon
                    title:
                      id: 1
                      name: Mr
                    person_type: staff
                staff_report_writers:
                  - first_name: John
                    id: 33
                    last_name: Smith
                    middle_name: Smyth
                    name_in_local_language: Johan
                    preferred_name: Jon
                    title:
                      id: 1
                      name: Mr
                    person_type: staff
                student_count: 30
                timetable_code: Orch
                id: 54
                date_start: '2019-01-24'
                date_end: '2019-11-24'
                year_groups: []
              period_span: single
              period_span_parent_id: 33
              rooms:
                - id: 123
                  description: Standard room assigned to Maths department
                  location:
                    id: 1
                    name: Ground floor
                    position: 2
                    deleted_at: null
                    system_value: false
                  room_capacity: 50
                  room_code: Maths room
                  telephone_extension: x123
                  timetable_code: 12355AAXP4
              allocated_persons:
                - access_status: invited
                  academic_houses:
                    - id: 1
                      name: Green House
                  boarding_houses:
                    - id: 1
                      name: Green House
                  departments:
                    - id: 4
                      name: Drama
                  email: user@example.com
                  external_id: ST5466X
                  first_name: Benjamin
                  forms:
                    - id: 10
                      name: Standard 9
                  gender:
                    id: 1
                    name: Male
                  id: 12
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Head of Drama
                  last_name: Kakistos
                  middle_name: null
                  person_type: staff
                  preferred_name: Ben
                  profile_image:
                    id: 68d75310-d858-4d75-b47b-3e7089cceca8
                    name: example.jpg
                    size: 306691
                    mime_type: image/jpg
                    purpose: staff_profile_image
                    uploaded_by_id: 163
                    created_at: '2019-08-24T14:15:22Z'
                    deleted_at: null
                  roles:
                    - id: 4
                      name: Teacher
                  rooms: []
                  sections:
                    - id: 2
                      name: Upper School
                  status: current
                  title:
                    id: 1
                    name: Mr
              duty: true
              warnings: []
            color_option: 6
    Staff.WorkingHours:
      title: Root type for Staff work time data
      description: Describes the start and end times on a given day
      type: object
      properties:
        id:
          format: int32
          type: integer
        staff_id:
          format: int32
          type: integer
        time_from:
          type: string
          format: time
        time_to:
          type: string
          format: time
        day:
          type: string
          enum:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
            - sunday
      example:
        id: 1
        staff_id: 123
        time_from: '08:15:00'
        time_to: '16:30:00'
        day: wednesday
    Staff.Data.DefaultWorkingHours:
      title: Staff Working Hours response
      description: Staff Working Hours response
      type: object
      properties:
        day:
          type: string
          enum:
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
            - sunday
        day_start:
          type: string
          format: time
        day_end:
          type: string
          format: time
      example:
        day: monday
        day_start: '08:00:00'
        day_end: '15:30:00'
    Staff.SchoolDetails:
      title: Root Type for Staff School Details
      description: Information about Staff School Details
      type: object
      properties:
        departments:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        id:
          format: int32
          type: integer
        job_title:
          type: string
          nullable: true
        learning_support_coordinator:
          type: boolean
        positions:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/School.Data.Room.Minimal'
        sections:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        subjects:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        timetable_code:
          type: string
          nullable: true
      example:
        departments:
          - id: 1
            name: Science
          - id: 44
            name: Physical Education
        id: 54
        job_title: Teacher
        learning_support_coordinator: false
        positions:
          - id: 5
            name: Teacher
        rooms: []
        sections:
          - id: 4
            name: Upper school
        subjects:
          - id: 9
            name: Sport & nutrition
          - id: 88
            name: Rocket science
        timetable_code: PK3
    Students.ProgressReport:
      title: Legacy Progress Report
      description: Enough data to craft a row in the Legacy Progress Reports widget on the Student Profile
      type: object
      properties:
        id:
          format: int32
          type: integer
        academic_year:
          $ref: '#/components/schemas/Data.KeyValue'
        i:
          format: int32
          type: integer
          description: Nobody in their right mind would call a property 'i', but in the context of Progress Reports it sort of makes sense, and I didn't know what else to call it
        html_path:
          type: string
        lesson_id:
          format: int32
          type: integer
          nullable: true
          description: If this was not LegacyLand, you'd fetch back the class (Tutor Group / ECA / Subject Set / Form) with the lesson id, but as we are only using it to build a link
        pdf_path:
          type: string
          nullable: true
        title:
          type: string
        reportarchive_id:
          format: int32
          type: integer
        v3_year:
          type: string
          description: In V3 the academic year is referenced as the 4 digit Year - this is to be used for building a link
        year_group:
          $ref: '#/components/schemas/Data.KeyValueNullable'
    Student.WellbeingPlan:
      title: Student Wellbeing Plan
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
          maxLength: 100
        status:
          type: string
          enum:
            - active
            - inactive
        severity:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        category:
          $ref: '#/components/schemas/Data.KeyColorValue'
        last_updated_at:
          type: string
          format: date-time
        assignees:
          type: array
          items:
            $ref: '#/components/schemas/PersonMinimal'
      example:
        id: 44
        title: Initial plan
        status: active
        severity:
          id: 1
          name: Minor
        category:
          id: 1
          name: Initial Plan - lower school
          color: 8
        last_updated_at: '2019-08-24T14:15:22Z'
        assignees:
          - first_name: John
            id: 33
            last_name: Smith
            middle_name: Smyth
            name_in_local_language: Johan
            preferred_name: Jon
            title:
              id: 1
              name: Mr
            person_type: staff
    Students.Data.RelationshipGroup.Simplified:
      title: Simplified Relationship Group
      description: Simplified Relationship Group - beside of id and name it contains also the rank attribute
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        rank:
          format: int32
          type: integer
      example:
        id: 1
        name: Primary
        rank: 1
    Students.Data.TagType:
      title: Student Tag data element
      description: Field makeup for settings Student Tags
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        type:
          type: string
        color_option:
          format: int32
          type: integer
      example:
        id: 4
        name: Attendance Issues
        type: text
        color_option: 8
    Students.Tag:
      title: Input object for to create Tags for Student
      description: Input format to create a Tag
      type: object
      properties:
        id:
          format: int32
          type: integer
        type:
          $ref: '#/components/schemas/Students.Data.TagType'
        text:
          type: string
          nullable: true
        number:
          format: int32
          type: integer
          nullable: true
        date:
          type: string
          format: date
          nullable: true
      example:
        id: 5
        type:
          id: 4
          name: Attendance Issues
          type: text
          color_option: 8
        text: Often missing from morning roll call
        number: null
        date: '2019-08-24'
    Data.KeyPositionValueNullable:
      title: Nullable Key Value Pair with a position property
      description: Response shape for a single lookup item in a non-settings response that needs to have position especially in listings for sorting purpose. Allows the value to be NULL
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Data.KeyPositionValue'
      example:
        id: 1
        name: A non-null lookup value
        position: 3
    Students.Student:
      title: Root Type for Students
      description: Student details
      type: object
      properties:
        id:
          format: int32
          type: integer
        access_status:
          $ref: '#/components/schemas/AccessStatus'
        multi_realm:
          type: boolean
          description: Indicates whether the user has a multi-realm login
        academic_house:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        boarding_type:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        boarding_house:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        country_of_birth:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        date_of_birth:
          format: date
          type: string
        deleted_at:
          type: string
          format: date-time
          nullable: true
        ethnicity:
          $ref: '#/components/schemas/Data.KeyValue'
        enrolment_status:
          type: string
        external_id:
          type: string
          nullable: true
        faith:
          $ref: '#/components/schemas/Data.KeyValue'
        first_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValue'
        has_global_note:
          type: boolean
        form:
          type: object
          nullable: true
          properties:
            id:
              format: int32
              type: integer
            name:
              type: string
            staff:
              type: array
              items:
                $ref: '#/components/schemas/Staff.Listing'
            section:
              $ref: '#/components/schemas/Data.KeyValue'
            year_group:
              $ref: '#/components/schemas/Data.KeyValue'
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        language_first:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        language_second:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        last_login:
          type: string
          format: date-time
          nullable: true
        last_name:
          type: string
        learning_support_record_summary:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        middle_name:
          type: string
          nullable: true
        name_in_local_language:
          type: string
          nullable: true
        national_identity:
          type: string
          nullable: true
        nationalities:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        person_type:
          type: string
        preferred_name:
          type: string
          nullable: true
        primary_email:
          type: string
          format: email
        profile_image:
          $ref: '#/components/schemas/Data.File'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Students.Tag'
        medical_condition_severity:
          $ref: '#/components/schemas/Data.KeyPositionValueNullable'
      example:
        id: 56
        access_status: invited
        multi_realm: false
        academic_house:
          id: 1
          name: Green House
        boarding_type:
          id: 1
          name: Full Time Boarder
        boarding_house:
          id: 1
          name: Green House
        country_of_birth:
          id: 22
          name: Barbados
        date_of_birth: '2010-08-24'
        deleted_at: null
        ethnicity:
          id: 8
          name: Other
        enrolment_status: current
        external_id: MX99328
        faith:
          id: 1
          name: Christian
        first_name: Miles
        gender:
          id: 1
          name: Male
        has_global_note: false
        form:
          id: 8
          name: Form 4
          staff:
            - departments:
                - id: 1
                  name: Science
              employment_leave_date: null
              external_id: ST9344
              first_name: Mary
              gender:
                id: 2
                name: Female
              id: 5
              images:
                - type: thumbnail
                  url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
              job_title: Teacher
              last_name: McMahnamahna
              middle_name: null
              person_type: staff
              positions:
                - id: 1
                  name: Teacher
              preferred_name: Mary
              previous_last_name: Mulvihill
              sections:
                - id: 1
                  name: Lower School
              subjects:
                - id: 1
                  name: Physics
              status: current
              timetable_code: STMMSP
              roles:
                - id: 1
                  name: Teacher
              title:
                id: 4
                name: Ms
          section:
            id: 1
            name: Lower School
          year_group:
            id: 1
            name: Year 4
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/student_profile_image/36/123123.jpg
        language_first:
          id: 1
          name: English
        language_second:
          id: 13
          name: Farsi
        last_login: '2019-08-24T14:15:22Z'
        last_name: Whyde
        learning_support_record_summary: []
        middle_name: null
        name_in_local_language: null
        national_identity: null
        nationalities:
          - id: 22
            name: British
        person_type: stduent
        preferred_name: null
        primary_email: user@example.com
        profile_image:
          id: 68d75310-d858-4d75-b47b-3e7089cceca8
          name: example.doc
          size: 306691
          mime_type: application/msword
          purpose: learning_support_record
          uploaded_by_id: 163
          created_at: '2019-08-24T14:15:22Z'
          deleted_at: null
        tags:
          - id: 5
            type:
              id: 4
              name: Attendance Issues
              type: text
              color_option: 8
            text: Often missing from morning roll call
            number: null
            date: '2019-08-24'
        medical_condition_severity:
          - id: 1
            name: High
            position: 1
    Students.Contact.Student.Relation:
      title: Root Type for Contacts Students Relations
      description: Information about relations between Contacts and Students
      type: object
      properties:
        id:
          format: int32
          type: integer
        contact_student_relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
        student_contact_relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
        relationship_group:
          $ref: '#/components/schemas/Students.Data.RelationshipGroup.Simplified'
        student:
          $ref: '#/components/schemas/Students.Student'
        access_to_student:
          type: boolean
      example:
        id: 62
        contact_student_relationship_type:
          id: 1
          name: Mother
        student_contact_relationship_type:
          id: 41
          name: Son
        relationship_group:
          id: 1
          name: Primary
          rank: 1
        student:
          id: 14
          access_status: no_access
          academic_house:
            id: 1
            name: Green House
          boarding_type:
            id: 1
            name: Full Time Boarder
          boarding_house:
            id: 1
            name: Green House
          country_of_birth:
            id: 1
            name: Azerbaijan
          date_of_birth: '2019-08-24'
          deleted_at: null
          ethnicity:
            id: 15
            name: Other
          enrolment_status: current
          external_id: null
          faith:
            id: 1
            name: Atheist
          first_name: Richard
          gender:
            id: 1
            name: Male
          has_global_note: true
          form: null
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/student_profile_image/16/123123.jpg
          language_first:
            id: 1
            name: English
          language_second: null
          last_login: '2019-08-24T14:15:22Z'
          last_name: Pritchard
          learning_support_record_summary: []
          medical_condition_severity:
            id: 1
            name: High
            position: 1
          middle_name: null
          name_in_local_language: null
          national_identity: null
          nationalities:
            - id: 1
              name: Azerbaijani
          person_type: student
          preferred_name: null
          primary_email: user@example.com
          profile_image: null
          tags: []
        access_to_student: true
    Contact.CommunicationPreferences:
      title: Contact Communication Preferences
      description: Information about Contact communication preferences with students
      type: object
      properties:
        access_to_student:
          type: boolean
        student:
          type: object
          properties:
            id:
              format: int32
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            middle_name:
              type: string
            name_in_local_language:
              type: string
              nullable: true
            preferred_name:
              type: string
            images:
              type: array
              items:
                $ref: '#/components/schemas/Data.ImageKeyValue'
            learning_support_record_summary:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            tag_summary:
              type: array
              items:
                $ref: '#/components/schemas/Students.Tag.Summary'
            has_global_note:
              type: boolean
            person_type:
              type: string
            status_indicator:
              type: string
        preference_emergency:
          type: boolean
        preference_medical:
          type: boolean
        preference_billing:
          type: boolean
        court_order:
          type: boolean
      example:
        access_to_student: true
        student:
          id: 15
          first_name: Harry
          last_name: DeCarre
          middle_name: Barry
          name_in_local_language: null
          preferred_name: Barry
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          learning_support_record_summary: []
          tag_summary:
            - id: 1
              color_option: 8
              content: late
              name: Attendance Issues
          has_global_note: false
          person_type: student
          status_indicator: current
        preference_emergency: true
        preference_medical: true
        preference_billing: false
        court_order: false
    Students.Contact.Consent:
      title: Contact consent
      description: 'Contact: consent for 3rd party data sharing'
      type: object
      properties:
        consent:
          type: boolean
      example:
        consent: true
    Students.House.Listing:
      title: Root Type for House Listing
      description: Information about House
      type: object
      properties:
        id:
          format: int32
          type: integer
        code:
          type: string
        genders:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        house_parents:
          type: array
          items:
            $ref: '#/components/schemas/Staff.Listing'
        house_type:
          type: string
          enum:
            - boarding
            - academic
            - both
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        max_students:
          format: int32
          type: integer
        name:
          type: string
        phone:
          type: string
          nullable: true
        student_count:
          format: int32
          type: integer
        system_profile_image:
          type: string
          nullable: true
        is_active:
          type: boolean
      example:
        id: 8
        code: BHR
        genders:
          - id: 2
            name: Female
        house_parents:
          - departments:
              - id: 1
                name: Science
            employment_leave_date: null
            external_id: ST9344
            first_name: Mary
            gender:
              id: 2
              name: Female
            id: 5
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            job_title: Teacher
            last_name: McMahnamahna
            middle_name: null
            person_type: staff
            positions:
              - id: 1
                name: Teacher
            preferred_name: Mary
            previous_last_name: Mulvihill
            sections:
              - id: 1
                name: Lower School
            subjects:
              - id: 1
                name: Physics
            status: current
            timetable_code: STMMSP
            roles:
              - id: 1
                name: Teacher
            title:
              id: 4
              name: Ms
        house_type: boarding
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/boarding_house/36/123123.jpg
        max_students: 20
        name: Red House
        phone: 0117 422 2003
        student_count: 4
        system_profile_image: red
        is_active: true
    Students.HouseSummary.Listing:
      title: Root Type for House Summary Listing
      description: Information about House Summary
      type: object
      properties:
        id:
          format: int32
          type: integer
        code:
          type: string
        house_type:
          type: string
          enum:
            - boarding
            - academic
            - both
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        name:
          type: string
        summary:
          type: array
          items:
            type: object
            properties:
              year_group:
                type: object
                properties:
                  id:
                    format: int32
                    type: integer
                  name:
                    type: string
                  position:
                    format: int32
                    type: integer
              genders_count:
                type: array
                items:
                  type: object
                  properties:
                    count:
                      format: int32
                      type: integer
                    gender:
                      type: object
                      properties:
                        id:
                          format: int32
                          type: integer
                        name:
                          type: string
                        position:
                          format: int32
                          type: integer
                        system_value:
                          type: boolean
        system_profile_image:
          type: string
          nullable: true
        is_active:
          type: boolean
      example:
        id: 1
        code: GH
        house_type: both
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
        name: Green House
        summary:
          - year_group:
              id: 1
              name: Year 4
              position: 1
            genders_count:
              - count: 4
                gender:
                  id: 1
                  name: Male
                  position: 1
                  system_value: true
              - count: 6
                gender:
                  id: 2
                  name: Female
                  position: 2
                  system_value: true
        system_profile_image: red
        is_active: true
    Data.LookupTableValueNullable:
      title: Nullable Type for LookupTable
      description: Normal form for lookup data, can also be set to null
      type: object
      nullable: true
      allOf:
        - $ref: '#/components/schemas/Data.LookupTableValue'
      example:
        id: 2
        name: Mrs
        position: 1
        deleted_at: null
        system_value: true
    Students.Data.SchoolAndCollege:
      title: School & College data element
      description: Field makeup for settings School & College item
      type: object
      properties:
        destination:
          type: string
        education_type:
          $ref: '#/components/schemas/Data.LookupTableValueNullable'
        category:
          $ref: '#/components/schemas/Data.LookupTableValueNullable'
        address:
          type: string
          nullable: true
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
      example:
        destination: St Hubbins Grammar School
        education_type:
          id: 2
          name: International School
          position: 1
          deleted_at: null
          system_value: true
        category:
          id: 2
          name: Feeder
          position: 1
          deleted_at: null
          system_value: true
        address: null
        position: 3
        deleted_at: null
    Students.Data.RelationshipGroup:
      title: Relationship Group
      description: A Relationship Group identifies a group of contacts and describes their rank position
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        rank:
          type: integer
          format: int32
          minimum: 1
        position:
          format: int32
          type: integer
        deleted_at:
          type: string
          format: date-time
          nullable: true
      example:
        id: 1
        name: Primary
        rank: 1
        position: 1
        deleted_at: null
    Students.Data.RelationshipType:
      title: Relationship Type
      description: A Relationship Type identifies a type of contacts and describes their relationships between contact and student
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        position:
          format: int32
          type: integer
        system_value:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
        relationship_group:
          $ref: '#/components/schemas/Students.Data.RelationshipGroup'
      example:
        id: 5
        name: Guardian
        position: 5
        system_value: false
        deleted_at: null
        relationship_group:
          id: 1
          name: Primary
          rank: 1
          position: 1
          deleted_at: null
    Students.Student.Destination:
      title: Student destination data
      description: A single student's destination data
      type: object
      properties:
        leaving_status:
          type: string
          enum:
            - Leaver
            - Awaiting Confirmation
          nullable: true
        leaving_date:
          type: string
          format: date
          nullable: true
        term:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/School.DateRange'
        academic_year:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/School.Academic.Year'
        destination_start_date:
          type: string
          format: date
          nullable: true
        destination:
          $ref: '#/components/schemas/Data.LookupTableValueNullable'
        key_stage:
          type: string
          enum:
            - KS0
            - KS1
            - KS2
            - KS3
            - KS4
            - KS5
          nullable: true
      example:
        leaving_status: Leaver
        leaving_date: '2019-08-24'
        term:
          id: 4
          description: Winter Term
          date_start: '2019-11-15'
          date_end: '2019-12-28'
        academic_year:
          id: 6
          date_start: '2020-09-01'
          date_end: '2021-08-31'
          description: 2020-21 Academic Year
          terms:
            - id: 1
              description: Term 1
            - id: 4
              description: Winter Term
        destination_start_date: null
        destination:
          id: 2
          name: New School
          position: 1
          deleted_at: null
          system_value: true
        key_stage: KS3
    Student.Listing.Past:
      title: List Type for Past Students
      description: List View for Past Students
      type: object
      properties:
        id:
          format: int32
          type: integer
        first_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        last_name:
          type: string
        middle_name:
          type: string
          nullable: true
        name_in_local_language:
          type: string
          nullable: true
        preferred_name:
          type: string
          nullable: true
        images:
          type: array
          items:
            $ref: '#/components/schemas/Data.ImageKeyValue'
        destination_details:
          $ref: '#/components/schemas/Students.Student.Destination'
        tag_summary:
          type: array
          items:
            $ref: '#/components/schemas/Data.KeyValue'
        has_global_note:
          type: boolean
        person_type:
          type: string
        enrolment_status:
          type: string
        status_indicator:
          type: string
        is_birthday:
          type: boolean
      example:
        id: 54
        first_name: Crystal
        gender:
          id: 2
          name: Female
        last_name: McWhirter
        middle_name: null
        name_in_local_language: null
        preferred_name: null
        images:
          - type: thumbnail
            url: https://wcbs-hub.imgix.net/S999/student_profile_image/36/123123.jpg
        destination_details:
          leaving_status: Leaver
          leaving_date: '2019-08-24'
          term:
            id: 4
            description: Winter Term
            date_start: '2019-11-15'
            date_end: '2019-12-28'
          academic_year:
            id: 6
            date_start: '2020-09-01'
            date_end: '2021-08-31'
            description: 2020-21 Academic Year
            terms:
              - id: 1
                description: Term 1
              - id: 4
                description: Winter Term
          destination_start_date: null
          destination:
            id: 2
            name: New School
            position: 1
            deleted_at: null
            system_value: true
          key_stage: KS3
        tag_summary:
          - id: 1
            name: A tag
        has_global_note: false
        person_type: student
        enrolment_status: past
        is_birthday: false
    Students.AddressMapping:
      title: Root type for student/address mapping
      description: Address information about a student/address mapping
      type: object
      allOf:
        - $ref: '#/components/schemas/AddressMapping'
        - properties:
            resident_since:
              format: date
              type: string
      example:
        id: 147
        address_types:
          - id: 2
            name: Billing
            position: 1
            deleted_at: null
            system_value: true
        position: 1
        address:
          id: 123
          country:
            id: 257
            name: UK
          organization: BBC News
          address_line_1: 123 Sesame Street
          address_line_2: ''
          locality: North End
          administrative_area: Avon
          postal_code: BS4 EV4
        formatted_address: BBC News, 123 Sesame Street, North End, Avon, BS4 EV4
        resident_since: '2019-08-24'
    Students.AddressMapping.List:
      title: Student/address mapping for listing
      description: Address & co-habitant listing information about a student/address mapping
      type: object
      properties:
        mapping:
          $ref: '#/components/schemas/Students.AddressMapping'
        colocated-students:
          description: Array of co-located students
          type: array
          items:
            type: object
            properties:
              mapping_id:
                format: int32
                type: integer
              student:
                $ref: '#/components/schemas/Student.Listing'
          example:
            colocated-students:
              - mapping_id: 123
                student:
                  id: 1
                  boarding_type:
                    id: 1
                    name: Non-Boarder
                  date_of_birth: '2018-01-19'
                  first_name: Chana Leah
                  gender:
                    id: 3
                    name: Female
                  last_login: null
                  last_name: Abergel
                  middle_name: null
                  name_in_local_language: null
                  preferred_name: null
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/student_profile_image/36/123123.jpg
                  learning_support_summary: []
                  tag_summary: []
                  has_global_note: true
                  form:
                    id: 6
                    name: 10 A
                    year_group:
                      id: 5
                      name: Year 10
        colocated-contacts:
          description: Array of co-located contacts
          type: array
          items:
            type: object
            properties:
              mapping_id:
                format: int32
                type: integer
              contact:
                $ref: '#/components/schemas/Students.Contact'
          example:
            colocated-contacts:
              - mapping_id: 124
                contact:
                  access_to_app: true
                  country_of_birth: 2
                  deleted_at: null
                  email: oriya.cohen@mail.com
                  employer: BBC England
                  ethnicity: 2
                  faith: 3
                  first_name: Ted
                  gender: 1
                  id: 6
                  last_name: tester04
                  middle_name: null
                  nationalities:
                    - 1
                    - 3
                  sage_account_ref: SAGE12345
                  status: true
                  students:
                    - contacts: []
                      date_of_birth: '2010-02-11'
                      deleted_at: null
                      first_name: Oriya
                      gender:
                        deleted_at: null
                        id: 5
                        name: Female
                        position: 1
                        system_value: true
                      id: 23
                      last_login: null
                      last_name: Cohen
                      learning_support_categories: []
                      form:
                        id: 6
                        name: 10 A
                        year_group:
                          id: 5
                          name: Year 10
                  title:
                    id: 17
                    name: Mr
                  vip: true
      example:
        mapping:
          id: 147
          address_types:
            - id: 2
              name: Billing
              position: 1
              deleted_at: null
              system_value: true
          position: 1
          address:
            id: 123
            country:
              id: 257
              name: UK
            organization: BBC News
            address_line_1: 123 Sesame Street
            address_line_2: ''
            locality: North End
            administrative_area: Avon
            postal_code: BS4 EV4
          formatted_address: BBC News, 123 Sesame Street, North End, Avon, BS4 EV4
          resident_since: '2019-08-24'
        colocated-students:
          colocated-students:
            - mapping_id: 123
              student:
                id: 1
                boarding_type:
                  id: 1
                  name: Non-Boarder
                date_of_birth: '2018-01-19'
                first_name: Chana Leah
                gender:
                  id: 3
                  name: Female
                last_login: null
                last_name: Abergel
                middle_name: null
                name_in_local_language: null
                preferred_name: null
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/student_profile_image/36/123123.jpg
                learning_support_summary: []
                tag_summary: []
                has_global_note: true
                form:
                  id: 6
                  name: 10 A
                  year_group:
                    id: 5
                    name: Year 10
        colocated-contacts:
          colocated-contacts:
            - mapping_id: 124
              contact:
                access_to_app: true
                country_of_birth: 2
                deleted_at: null
                email: oriya.cohen@mail.com
                employer: BBC England
                ethnicity: 2
                faith: 3
                first_name: Ted
                gender: 1
                id: 6
                last_name: tester04
                middle_name: null
                nationalities:
                  - 1
                  - 3
                sage_account_ref: SAGE12345
                status: true
                students:
                  - contacts: []
                    date_of_birth: '2010-02-11'
                    deleted_at: null
                    first_name: Oriya
                    gender:
                      deleted_at: null
                      id: 5
                      name: Female
                      position: 1
                      system_value: true
                    id: 23
                    last_login: null
                    last_name: Cohen
                    learning_support_categories: []
                    form:
                      id: 6
                      name: 10 A
                      year_group:
                        id: 5
                        name: Year 10
                title:
                  id: 17
                  name: Mr
                vip: true
    Students.AddressRelation:
      title: Root type for address and cohabitants listing
      description: Address and cohabitant list information related to a Student record
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        colocated-students:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Student.Listing'
        colocated-contacts:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Students.Contact'
      example:
        address:
          id: 123
          country:
            id: 257
            name: UK
          organization: BBC News
          address_line_1: 123 Sesame Street
          address_line_2: ''
          locality: North End
          administrative_area: Avon
          postal_code: BS4 EV4
        colocated-students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: A non-null lookup value
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
        colocated-contacts:
          - access_status: no_access
            students_access:
              - relation_id: 34
                access_to_student: true
                student:
                  id: 145
                  academic_house:
                    id: 1
                    name: Green House
                  access_status: invited
                  boarding_house:
                    id: 1
                    name: Green House
                  boarding_type:
                    id: 1
                    name: Full time boarder
                  date_of_birth: '2010-08-24'
                  enrolment_status: current
                  external_id: X12332
                  first_name: Mervyn
                  gender:
                    id: 1
                    name: Male
                  last_login: '2019-08-24T14:15:22Z'
                  last_name: Kirwan
                  middle_name: Davin
                  name_in_local_language: null
                  person_type: student
                  preferred_name: Merv
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  learning_support_record_summary:
                    - id: 1
                      name: The short description from the LS Record
                  learning_support_summary: []
                  tag_summary:
                    - id: 1
                      color_option: 8
                      content: late
                      name: Attendance Issues
                  has_global_note: true
                  form:
                    id: 6
                    name: Form 9A
                    section:
                      id: 1
                      name: Middle School
                    staff:
                      - departments:
                          - id: 9
                            name: Science
                        employment_leave_date: null
                        external_id: ST9087
                        first_name: Peter
                        gender:
                          id: 1
                          name: Male
                        id: 68
                        images:
                          - type: thumbnail
                            url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                        job_title: Teacher
                        last_name: Treacher
                        middle_name: null
                        person_type: staff
                        positions:
                          - id: 1
                            name: Teacher
                        preferred_name: null
                        previous_last_name: null
                        sections:
                          - id: 1
                            name: Middle school
                        subjects:
                          - id: 13
                            name: Chemistry
                        status: current
                        timetable_code: PTSC
                        roles:
                          - id: 5
                            name: Teacher
                        title:
                          id: 1
                          name: Mr
                    year_group:
                      id: 6
                      name: Year 9
                      position: 3
            deleted_at: '2019-08-24T14:15:22Z'
            external_id: null
            first_name: Sarah
            gender:
              id: 2
              name: Female
            id: 37
            last_name: Shmyth
            middle_name: null
            primary_email: user@example.com
            profile_image:
              id: 68d75310-d858-4d75-b47b-3e7089cceca8
              name: example.jpg
              size: 306691
              mime_type: image/jpg
              purpose: contact_profile_image
              uploaded_by_id: 163
              created_at: '2019-08-24T14:15:22Z'
              deleted_at: null
            status: active
            students:
              - id: 145
                academic_house:
                  id: 1
                  name: Green House
                access_status: invited
                boarding_house:
                  id: 1
                  name: A non-null lookup value
                boarding_type:
                  id: 1
                  name: Full time boarder
                date_of_birth: '2010-08-24'
                enrolment_status: current
                external_id: X12332
                first_name: Mervyn
                gender:
                  id: 1
                  name: Male
                last_login: '2019-08-24T14:15:22Z'
                last_name: Kirwan
                middle_name: Davin
                name_in_local_language: null
                person_type: student
                preferred_name: Merv
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                learning_support_record_summary:
                  - id: 1
                    name: The short description from the LS Record
                learning_support_summary: []
                tag_summary:
                  - id: 1
                    color_option: 8
                    content: late
                    name: Attendance Issues
                has_global_note: true
                form:
                  id: 6
                  name: Form 9A
                  section:
                    id: 1
                    name: Middle School
                  staff:
                    - departments:
                        - id: 9
                          name: Science
                      employment_leave_date: null
                      external_id: ST9087
                      first_name: Peter
                      gender:
                        id: 1
                        name: Male
                      id: 68
                      images:
                        - type: thumbnail
                          url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                      job_title: Teacher
                      last_name: Treacher
                      middle_name: null
                      person_type: staff
                      positions:
                        - id: 1
                          name: Teacher
                      preferred_name: null
                      previous_last_name: null
                      sections:
                        - id: 1
                          name: Middle school
                      subjects:
                        - id: 13
                          name: Chemistry
                      status: current
                      timetable_code: PTSC
                      roles:
                        - id: 5
                          name: Teacher
                      title:
                        id: 1
                        name: Mr
                  year_group:
                    id: 6
                    name: Year 9
                    position: 3
            title:
              id: 5
              name: Miss
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/contact_profile_image/36/123123.jpg
    Students.Student.Consent:
      title: Student consent data
      description: A single student's consent data
      type: object
      properties:
        photograph:
          type: boolean
        publish_photograph:
          type: boolean
        publish_video:
          type: boolean
        share_photograph:
          type: boolean
        share_video:
          type: boolean
        share_data:
          type: boolean
        school_trip:
          type: boolean
      example:
        photograph: true
        publish_photograph: true
        publish_video: true
        share_photograph: true
        share_video: true
        share_data: true
        school_trip: true
    Students.Student.Enrolment:
      title: Student enrolment data
      description: A single student's enrolment data
      type: object
      properties:
        enrolment_status:
          type: string
        start_date:
          type: string
          format: date
          nullable: true
        account_reference:
          type: string
          nullable: true
        candidate_number:
          type: string
          nullable: true
        unique_pupil_number:
          type: string
          nullable: true
        unique_pupil_number_status:
          type: string
          nullable: true
      example:
        enrolment_status: current
        start_date: '2017-08-24'
        account_reference: OU812
        candidate_number: AA23
        unique_pupil_number: '90210'
        unique_pupil_number_status: temporary
    Students.Student.LearningSupport:
      title: Student Learning Support data
      description: A single student's Learning Support field data
      type: object
      properties:
        authority:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        authority_type:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        disability:
          type: boolean
        disability_description:
          type: string
          nullable: true
        placement_date:
          format: date
          type: string
          nullable: true
      example:
        authority:
          id: 7
          name: Aldershot Council
        authority_type:
          id: 65
          name: Parish council
        disability: false
        disability_description: null
        placement_date: '2019-08-24'
    Students.Student.Medical.Doctor:
      title: Student doctor data
      description: A student's doctor data
      type: object
      properties:
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        email:
          type: string
          format: email
          nullable: true
        phone:
          type: string
          nullable: true
        address:
          type: string
          nullable: true
      example:
        title:
          id: 5
          name: Dr
        first_name: Nicolas
        last_name: Van Helsing
        email: null
        phone: 0117 555 5555
        address: 1234 Pleasant Crescent
    Student.Student.Relation:
      title: List Type for Student to Student Relations
      description: List View for a student and its relationship to the subject student
      type: object
      properties:
        related_student:
          $ref: '#/components/schemas/Student.Listing'
        relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
        inverse_relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
      example:
        related_student:
          id: 145
          academic_house:
            id: 1
            name: Green House
          access_status: invited
          boarding_house:
            id: 1
            name: A non-null lookup value
          boarding_type:
            id: 1
            name: Full time boarder
          date_of_birth: '2010-08-24'
          enrolment_status: current
          external_id: X12332
          first_name: Mervyn
          gender:
            id: 1
            name: Male
          last_login: '2019-08-24T14:15:22Z'
          last_name: Kirwan
          middle_name: Davin
          name_in_local_language: null
          person_type: student
          preferred_name: Merv
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          learning_support_record_summary:
            - id: 1
              name: The short description from the LS Record
          medical_condition_severity:
            id: 1
            name: High
            position: 1
          learning_support_summary: []
          tag_summary:
            - id: 1
              color_option: 8
              content: late
              name: Attendance Issues
          has_global_note: true
          form:
            id: 6
            name: Form 9A
            section:
              id: 1
              name: Middle School
            staff:
              - departments:
                  - id: 9
                    name: Science
                employment_leave_date: null
                external_id: ST9087
                first_name: Peter
                gender:
                  id: 1
                  name: Male
                id: 68
                images:
                  - type: thumbnail
                    url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                job_title: Teacher
                last_name: Treacher
                middle_name: null
                person_type: staff
                positions:
                  - id: 1
                    name: Teacher
                preferred_name: null
                previous_last_name: null
                sections:
                  - id: 1
                    name: Middle school
                subjects:
                  - id: 13
                    name: Chemistry
                status: current
                timetable_code: PTSC
                roles:
                  - id: 5
                    name: Teacher
                title:
                  id: 1
                  name: Mr
            year_group:
              id: 6
              name: Year 9
              position: 3
        relationship_type:
          id: 1
          name: Sister
        inverse_relationship_type:
          id: 2
          name: Brother
    Students.RelatedContact:
      title: Root Type for Related Contacts
      description: Information about Related Contact (e.g. mother/father of the student)
      type: object
      properties:
        id:
          format: int32
          type: integer
        title:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        first_name:
          type: string
        middle_name:
          type: string
          nullable: true
        last_name:
          type: string
        gender:
          $ref: '#/components/schemas/Data.KeyValueNullable'
        primary_email:
          type: string
          nullable: true
        primary_phone:
          type: string
          nullable: true
        status:
          type: string
        deleted_at:
          format: date-time
          type: string
          nullable: true
      example:
        id: 65
        title:
          id: 5
          name: Professor
        first_name: Jane
        middle_name: null
        last_name: Goodall
        gender:
          id: 2
          name: Female
        primary_email: null
        primary_phone: null
        status: active
        deleted_at: null
    Students.Student.Contact.Relation:
      title: Root Type for Students Contacts Relations
      description: Information about relations between Students and Contacts
      type: object
      properties:
        id:
          format: int32
          type: integer
        contact_student_relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
        court_order:
          type: boolean
          default: false
        preference_billing:
          type: boolean
          default: false
        preference_emergency:
          type: boolean
          default: false
        preference_medical:
          type: boolean
          default: false
        relationship_group:
          $ref: '#/components/schemas/Students.Data.RelationshipGroup.Simplified'
        contact:
          $ref: '#/components/schemas/Students.RelatedContact'
        student_contact_relationship_type:
          $ref: '#/components/schemas/Data.KeyValue'
        access_to_student:
          type: boolean
        student:
          type: object
          properties:
            id:
              type: integer
            first_name:
              type: string
            middle_name:
              type: string
              nullable: true
            last_name:
              type: string
      example:
        id: 0
        contact_student_relationship_type:
          id: 43
          name: Aunt
        court_order: false
        preference_billing: false
        preference_emergency: true
        preference_medical: true
        relationship_group:
          id: 1
          name: Primary
          rank: 1
        contact:
          id: 65
          title:
            id: 5
            name: Professor
          first_name: Jane
          middle_name: null
          last_name: Goodall
          gender:
            id: 2
            name: Female
          primary_email: null
          primary_phone: null
          status: active
          deleted_at: null
        student_contact_relationship_type:
          id: 43
          name: Nephew
        access_to_student: true
        student:
          id: 92
          first_name: Harry
          middle_name: null
          last_name: Cooper
    Students.Contacts.AddressRelation:
      title: Root type for address and cohabitants listing
      description: Address data and students at given address related to a Contact record
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        colocated-students:
          type: array
          items:
            type: object
            $ref: '#/components/schemas/Student.Listing'
      example:
        address:
          id: 123
          country:
            id: 257
            name: UK
          organization: BBC News
          address_line_1: 123 Sesame Street
          address_line_2: ''
          locality: North End
          administrative_area: Avon
          postal_code: BS4 EV4
        colocated-students:
          - id: 145
            academic_house:
              id: 1
              name: Green House
            access_status: invited
            boarding_house:
              id: 1
              name: Green House
            boarding_type:
              id: 1
              name: Full time boarder
            date_of_birth: '2010-08-24'
            enrolment_status: current
            external_id: X12332
            first_name: Mervyn
            gender:
              id: 1
              name: Male
            last_login: '2019-08-24T14:15:22Z'
            last_name: Kirwan
            middle_name: Davin
            name_in_local_language: null
            person_type: student
            preferred_name: Merv
            images:
              - type: thumbnail
                url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
            learning_support_record_summary:
              - id: 1
                name: The short description from the LS Record
            medical_condition_severity:
              id: 1
              name: High
              position: 1
            learning_support_summary: []
            tag_summary:
              - id: 1
                color_option: 8
                content: late
                name: Attendance Issues
            has_global_note: true
            form:
              id: 6
              name: Form 9A
              section:
                id: 1
                name: Middle School
              staff:
                - departments:
                    - id: 9
                      name: Science
                  employment_leave_date: null
                  external_id: ST9087
                  first_name: Peter
                  gender:
                    id: 1
                    name: Male
                  id: 68
                  images:
                    - type: thumbnail
                      url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
                  job_title: Teacher
                  last_name: Treacher
                  middle_name: null
                  person_type: staff
                  positions:
                    - id: 1
                      name: Teacher
                  preferred_name: null
                  previous_last_name: null
                  sections:
                    - id: 1
                      name: Middle school
                  subjects:
                    - id: 13
                      name: Chemistry
                  status: current
                  timetable_code: PTSC
                  roles:
                    - id: 5
                      name: Teacher
                  title:
                    id: 1
                    name: Mr
              year_group:
                id: 6
                name: Year 9
                position: 3
    Timetable.VersionDates:
      title: Version dates for a Timetable
      description: Publish, draft, update dates
      type: object
      properties:
        last_published_staff_at:
          type: string
          format: date-time
          description: Timestamp of the last time the timetable was published for staff
        last_published_students_at:
          type: string
          format: date-time
          description: Timestamp of the last time the timetable was published for students
        last_draft_at:
          type: string
          format: date-time
          description: Timestamp of the latest draft version. Will be null if the latest version is a published version
        last_version_updated_at:
          type: string
          format: date-time
          description: Timestamp of the latest version
        last_version_updated_by:
          $ref: '#/components/schemas/Staff.Listing'
          description: Staff member to create/update the latest version
      example:
        last_published_staff_at: '2019-08-24T14:15:22Z'
        last_published_students_at: '2019-08-24T14:15:22Z'
        last_draft_at: '2019-08-24T14:15:22Z'
        last_version_updated_at: '2019-08-24T14:15:22Z'
        last_version_updated_by:
          departments:
            - id: 1
              name: Science
          employment_leave_date: null
          external_id: ST9344
          first_name: Mary
          gender:
            id: 2
            name: Female
          id: 5
          images:
            - type: thumbnail
              url: https://wcbs-hub.imgix.net/S999/staff_profile_image/36/123123.jpg
          job_title: Teacher
          last_name: McMahnamahna
          middle_name: null
          person_type: staff
          positions:
            - id: 1
              name: Teacher
          preferred_name: Mary
          previous_last_name: Mulvihill
          sections:
            - id: 1
              name: Lower School
          subjects:
            - id: 1
              name: Physics
          status: current
          timetable_code: STMMSP
          roles:
            - id: 1
              name: Teacher
          title:
            id: 4
            name: Ms
    Timetable.Listing:
      title: List view of Timetables
      description: Timetable listing
      allOf:
        - properties:
            id:
              format: int32
              type: integer
            academic_year:
              $ref: '#/components/schemas/School.Academic.Year'
            name:
              type: string
            rotating:
              type: boolean
            duration_days:
              type: integer
            date_from:
              type: string
              format: date
            date_to:
              type: string
              format: date
            time_from:
              type: string
              format: time
            time_to:
              type: string
              format: time
            sections:
              type: array
              items:
                $ref: '#/components/schemas/Data.KeyValue'
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            created_by:
              $ref: '#/components/schemas/PersonMinimal'
            updated_by:
              $ref: '#/components/schemas/PersonMinimal'
            queued_warning_generation:
              type: boolean
            deleted:
              type: boolean
            data_imported:
              type: string
              enum:
                - manual
                - TimeTabler
        - $ref: '#/components/schemas/Timetable.VersionDates'
      type: object
      example:
        id: 24
        academic_year:
          id: 6
          date_start: '2020-09-01'
          date_end: '2021-08-31'
          description: 2020-21 Academic Year
          terms:
            - id: 1
              description: Term 1
        name: Q1 Weekly Junior School
        rotating: true
        duration_days: 5
        date_from: '2019-01-03'
        date_to: '2019-04-24'
        time_from: '08:00:00'
        time_to: '16:30:00'
        sections:
          - id: 1
            name: Lower school
        created_at: '2018-08-24T14:15:22Z'
        updated_at: '2019-02-24T14:15:22Z'
        created_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        updated_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        last_published_staff_at: '2019-01-24T14:15:22Z'
        last_published_students_at: '2019-02-24T14:15:22Z'
        last_draft_at: '2019-01-01T14:15:22Z'
        last_version_updated_at: '2019-02-24T14:15:22Z'
        last_version_updated_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        queued_warning_generation: true
        deleted: false
        data_imported: manual
    Timetable.TimetableDetail:
      title: Detail view of a Timetable
      description: Timetable details
      type: object
      allOf:
        - $ref: '#/components/schemas/Timetable.Listing'
        - properties:
            days:
              type: array
              items:
                $ref: '#/components/schemas/Timetable.TimetableDay'
            dates_based_on:
              type: string
              enum:
                - academic_year
                - term
                - custom
            dates_based_on_academic_term_id:
              type: integer
        - $ref: '#/components/schemas/Timetable.VersionDates'
      example:
        id: 24
        academic_year:
          id: 6
          date_start: '2020-09-01'
          date_end: '2021-08-31'
          description: 2020-21 Academic Year
          terms:
            - id: 1
              description: Term 1
        name: Q1 Weekly Junior School
        rotating: true
        duration_days: 5
        date_from: '2019-01-03'
        date_to: '2019-04-24'
        time_from: '08:00:00'
        time_to: '16:30:00'
        sections:
          - id: 1
            name: Lower school
        created_at: '2018-08-24T14:15:22Z'
        updated_at: '2019-02-24T14:15:22Z'
        created_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        updated_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        last_published_staff_at: '2019-08-24T14:15:22Z'
        last_published_students_at: '2019-08-24T14:15:22Z'
        last_draft_at: '2019-08-24T14:15:22Z'
        last_version_updated_at: '2019-08-24T14:15:22Z'
        last_version_updated_by:
          first_name: John
          id: 33
          last_name: Smith
          middle_name: Smyth
          name_in_local_language: Johan
          preferred_name: Jon
          title:
            id: 1
            name: Mr
          person_type: staff
        queued_warning_generation: true
        deleted: false
        data_imported: manual
        days:
          - day_number: 0
            label_week: string
            label_day: string
            periods:
              - id: 455
                type: period
                time_from: '08:00:00'
                time_to: '09:00:00'
                timetable_import_number: 1
                label: New Slot
                group_restriction_subject_set: 0
                group_restriction_form: 0
                group_restriction_tutor_group: 0
                group_restriction_eca: 1
                group_restriction_house: 0
                group_restriction_duty: 0
                attendance_period: 0
                attendance_session: am
                allocation:
                  - id: 657
                    class:
                      academic_year:
                        id: 1
                        name: 2020-21 Academic Year
                      code: ORCH
                      max_students: 40
                      name: Orchestra
                      rooms:
                        - id: 14
                          room_code: Music Studio 2
                      short_description: School Orchestra
                      staff:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      staff_report_writers:
                        - first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                      student_count: 30
                      timetable_code: Orch
                      id: 54
                      date_start: '2019-01-24'
                      date_end: '2019-11-24'
                      year_groups: []
                    period_span: single
                    period_span_parent_id: 33
                    rooms:
                      - id: 123
                        description: Standard room assigned to Maths department
                        location:
                          id: 1
                          name: Ground floor
                          position: 2
                          deleted_at: null
                          system_value: false
                        room_capacity: 50
                        room_code: Maths room
                        telephone_extension: x123
                        timetable_code: 12355AAXP4
                    allocated_persons:
                      - first_name: John
                        id: 33
                        last_name: Smith
                        middle_name: Smyth
                        name_in_local_language: Johan
                        preferred_name: Jon
                        title:
                          id: 1
                          name: Mr
                        person_type: staff
                    warnings:
                      - id: 111
                        warning_type: room_in_use
                        room:
                          id: 123
                          description: Standard room assigned to Maths department
                          location:
                            id: 1
                            name: Ground floor
                            position: 2
                            deleted_at: null
                            system_value: false
                          room_capacity: 50
                          room_code: Maths room
                          telephone_extension: x123
                          timetable_code: 12355AAXP4
                        staff:
                          first_name: John
                          id: 33
                          last_name: Smith
                          middle_name: Smyth
                          name_in_local_language: Johan
                          preferred_name: Jon
                          title:
                            id: 1
                            name: Mr
                          person_type: staff
                        student:
                          first_name: Mary
                          id: 56
                          last_name: Mulvihill
                          middle_name: null
                          name_in_local_language: null
                          preferred_name: null
                          title:
                            id: 4
                            name: Ms
                          person_type: student
                        permitted: true
                        class:
                          academic_year:
                            id: 1
                            name: 2020-21 Academic Year
                          code: ORCH
                          max_students: 40
                          name: Orchestra
                          rooms:
                            - id: 14
                              room_code: Music Studio 2
                          short_description: School Orchestra
                          staff:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          staff_report_writers:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          student_count: 30
                          timetable_code: Orch
                          id: 54
                          date_start: '2019-01-24'
                          date_end: '2019-11-24'
                          year_groups: []
                        house:
                          id: 9
                          address: null
                          code: GH
                          genders:
                            - id: 1
                              name: Male
                          house_parents:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          house_type: boarding
                          images:
                            - type: thumbnail
                              url: https://wcbs-hub.imgix.net/S999/house_image/36/123123.jpg
                          max_students: 100
                          name: Green House
                          note: null
                          phone: null
                          profile_image:
                            id: 68d75310-d858-4d75-b47b-3e7089cceca8
                            name: example.jpg
                            size: 306691
                            mime_type: image/jpg
                            purpose: house_profile_image
                            uploaded_by_id: 163
                            created_at: '2019-08-24T14:15:22Z'
                            deleted_at: null
                          staff:
                            - first_name: John
                              id: 33
                              last_name: Smith
                              middle_name: Smyth
                              name_in_local_language: Johan
                              preferred_name: Jon
                              title:
                                id: 1
                                name: Mr
                              person_type: staff
                          system_profile_image: aqua
        dates_based_on: academic_year
        dates_based_on_academic_term_id: 3
    Attendance.Code:
      title: Attendance code root response object
      description: Singular attendance DfE registration code object
      type: object
      properties:
        id:
          format: int32
          type: integer
        code:
          format: string
          enum:
            - /
            - \
            - /\
            - B
            - C
            - E
            - G
            - H
            - I
            - J
            - L
            - M
            - 'N'
            - O
            - P
            - R
            - S
            - T
            - U
            - V
            - W
            - D
            - X
            - 'Y'
            - Z
            - '#'
        description:
          type: string
        category:
          format: string
          enum:
            - present
            - present-offsite
            - authorised-absence
            - unauthorised-absence
            - administrative
        display:
          format: boolean
    Parameter.Sort.Description:
      title: Description
      type: object
      description: Sort a list by description
      properties:
        description:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.Date:
      title: Date
      type: object
      description: Sort a list by the date column
      properties:
        date:
          type: string
          enum:
            - asc
            - desc
    Parameter.Sort.AttendanceCode:
      title: Attendance code
      type: object
      properties:
        attendanceCode:
          type: string
          enum:
            - asc
            - desc
      description: |
        Sort a list by Attendance Code
    Parameter.Sort.AttendanceSession:
      title: Attendance session
      type: object
      description: |
        Sort a list by Attendance Session
      properties:
        attendanceSession:
          type: string
          enum:
            - asc
            - desc
    Attendance.Student.Summary.v2:
      type: object
      description: Single student attendance summary
      properties:
        session:
          type: string
          enum:
            - am
            - pm
          example: am
        date:
          type: string
          format: date
        code:
          type: string
          example: /
        description:
          type: string
          default: Present
      required:
        - session
        - date
        - code
        - description
