openapi: 3.0.0
info:
  title: Xporter - School Data API
  description: |
    Xporter School Data API
  termsOfService: http://xporter.uk/terms/
  contact:
    email: support@xporter.uk
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
- url: https://virtserver.swaggerhub.com/CommunityBrands/School/1.0.0
  description: SwaggerHub API Auto Mocking
- url: https://xportertesting.groupcall.com/api/v1
  description: Development Base URL
- url: https://xporter.groupcall.com/api/v1
  description: Production Base URL
security:
- IdaasSTSToken: []
tags:
- name: Authentication
- name: Management APIs
  description: "Authorisation, logs, usage and other management APIs"
- name: Automation
  description: APIs to help automate your data and onboarding workflows
- name: Achievement
  description: Endpoints relating to Achievement
- name: Assessment
  description: Endpoints relating to Assessment
- name: Attendance
  description: Endpoints relating to attendance
- name: Behaviour
  description: Endpoints relating to Behaviour
- name: Exams
  description: Endpoints relating to Exams
- name: School
  description: Endpoints relating to school structure and general information
- name: Students
  description: Endpoints relating to students
- name: Contacts
  description: Endpoints relating to student contacts including relationships
- name: Staff
  description: Endpoints relating to staff
- name: Timetable
  description: Endpoints relating to timetabling
- name: Writeback
  description: Push data back to the school's management system
paths:
  /STS/GetToken:
    post:
      tags:
      - Authentication
      summary: Generate an STS token
      description: "The Xporter REST API supports token authorisation using a custom bearer style `Authorization` header.\n\n**Example authorization header**\n```\nAuthorization: Idaas {STSToken}\n```\n## Token Types\n\nThere are **two** types of token that you can generate:\n\n| Type       | Description                                    |\n|------------|------------------------------------------------|\n| School     | Provides access to School Data APIs            |\n| Management | Provides access to Management and Automation APIs |\n\nTokens contain the information Xporter needs to determine what data and services your application has access to - what you are *authorised* for.\n\n### School API Tokens\n\nWhen a school authorises your application, a unique `schoolSecret` is issued that is needed to generate a `Token`.\n\nIf a school authorises your app a second time, you will be issued with a new `schoolSecret` and a new `Token` should always be generated.\n\n> **Important:** You will be issued a unique `schoolSecret` for each school that authorises your application.\n\n### Management API Token\n\nA `managementSecret` is issued to you following initial registration of your application.\n\n`Tokens` generated with a `managementSecret` are used for management and automation APIs. They do not have access to school level data.\n\n> To request a new `managementSecret` please contact our service team.\n\n## Generating a Token\n\nTo generate a token, a POST is made to the Xporter STS and an object is returned containing the `token`.\n\n### POST Object Fields  \n\n| **Field**       | **Type** | **Example** | **Description**                                               |\n|-----------------|----------|-------------|---------------------------------------------------------------|\n| estab           | String   | 3281102     | School establishment number you are generating a token for   |\n| relyingParty    | String   | app.example.dev | Your application Id                                        |\n| password        | String   | b9aef7a6-3ee4-4935-98ff-6afe46447213 | Your application management or school secret     |\n| thirdpartyid    | String   | XporterOnDemand | The service for which you are authenticating (Always \"XporterOnDemand\") |\n\n### Generate School API Token\n\nInclude the `estab` property and pass the `schoolSecret` that you will have received following authorisation by a school.\n\n> **Important:** You will need to generate and use a token per school to access the school data APIs.\n\n### Generate Management API Token\n\nOmit or send `\"estab\":\"\"` and pass your `managementSecret`:\n\n> **Important:** The management token generated by this request will not grant access to school data API endpoints.\n\n### Token Responses\n\n**Example Successful Response**\n```\n{\n  \"token\": \"JhS0X....esMbPoHUOY=\",\n  \"expires\": \"2021-04-17T09:34:46.402555Z\",\n  \"Message\": null,\n  \"ExceptionType\": null,\n  \"ExceptionMessage\": null,\n  \"InnerException\": null\n}\n```\nYou will want to save/store the token with its `expiry` value so you can refresh the token ahead of time.\n\n**Example Failed Response**\n```\n{\n  \"token\": null,\n  \"expires\": \"0001-01-01T00:00:00\",\n  \"Message\": null,\n  \"ExceptionType\": null,\n  \"ExceptionMessage\": \"Relying Party not found for estab or secret not correct\",\n  \"InnerException\": null\n}\n```\n**Example AuthorisationPaused Response**\n```\n{\n    \"token\": null,\n    \"expires\": \"0001-01-01T00:00:00\",\n    \"Message\": null,\n    \"ExceptionType\": null,\n    \"ExceptionMessage\": \"Authorisation is currently paused while the school finalises the selection of people they wish to include in this feed.\",\n    \"InnerException\": null\n}\n```\n> **GDPR Functionality:** You will receive an Authorisation Paused response when attempting to generate a `token` if the school opts to make amendments to which people are included in the data feed during initial authorisation.\n"
      operationId: Retrieve school token
      requestBody:
        $ref: "#/components/requestBodies/SchoolTokenRequest"
      responses:
        "200":
          description: Token response
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    $ref: "#/components/schemas/TokenResponse"
      security: []
      servers:
      - url: https://login.groupcall.com/idaas/sts
        description: Live IDaaS login service
      - url: https://logintesting.groupcall.com/idaas/sts
  /TokenDetails:
    get:
      tags:
      - Management APIs
      summary: Retrieve details on your token.
      description: Unpack your STS token to review its contents
      operationId: getTokenDetails
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Token"
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Scopes:
    get:
      tags:
      - Management APIs
      summary: Retrieve list of scopes for your token.
      description: Review details of scopes your token has access to
      operationId: getScopeList
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Scopes:
                    type: array
                    items:
                      $ref: "#/components/schemas/Scope"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Logs:
    get:
      tags:
      - Management APIs
      summary: Retrieve logs relevant to your token.
      description: Review request logs for a given school for your application
      operationId: getLogs
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Logs:
                    type: array
                    items:
                      $ref: "#/components/schemas/Log"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Queries:
    get:
      tags:
      - Management APIs
      summary: list queries that the token alows you to run
      description: list queries that the token alows you to run
      operationId: Queries
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Endpoints:
                    type: array
                    description: A JSON array of Endpoint
                    items:
                      $ref: "#/components/schemas/Endpoints"
                  Queries:
                    type: array
                    description: A JSON array of Endpoint
                    items:
                      $ref: "#/components/schemas/Queries"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Usage:
    get:
      tags:
      - Management APIs
      summary: Usage for estab+rp
      description: Usage history for establishment and relying party
      operationId: Usage
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Usage:
                    type: array
                    description: A JSON array of Usage
                    items:
                      $ref: "#/components/schemas/Usage"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /GDPRIDs:
    get:
      tags:
      - Management APIs
      summary: GDPR Ids for estab+rp
      description: GDPR Ids for estab+rp
      operationId: GDPRIDs
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  GDPR:
                    type: array
                    description: A JSON array of GDPR
                    items:
                      $ref: "#/components/schemas/GDPR"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AchievementForDateRange:
    get:
      tags:
      - Achievement
      summary: Achievements for Date Range
      description: "Fetch achievement records for a date range with optional filters to refine the returned dataset\n## Endpoint Description\nRetrieve positive achievement conduct records for a date range with optional filters to refine the returned dataset\n\n***\n### Related Endpoints \nEndpoint|Primary Key|Foreign Key|Related Endpoint Description|\n---------|------------|-------|---------|\nschool.students|StudentAchievements.StudentId|Students.Id|Student record information\nschool.staff|StaffAchievements.StaffId|Staff.Id|Staff record information\n\n\n***\n### Fields by Scope \n#### _Achievements_\n\nAchievement records returned within the date range specified. Optionally, can include csv of StudentId members of each given conduct.\n\nField|Example|Notes|Consent Scope\n------|----------|-------|------\nId|4000|MIS Id of the achievement record|Conduct\nConductId|Ach.4000|Id of the conduct record prefixed with the conduct type to ensure uniqueness with behaviour records  - unprefixed|Conduct\nAchievementType|Lunchtime Incident|The incident type|Conduct\nDate|2017-05-10|Date of the incident|Conduct\nActivity|Lunch|Activity type|Conduct\nLocation|Outside School Grounds|Location description for incident|Conduct\nRecordedBy|Mr A Blacker|Staff member incident was recorded by|Conduct\nRecordedOn|2017-05-10|Date incident was recorded on|Conduct\nDescription|Grafitti on a wall|Comment on the incident record|ConductComments\nCategory|Beh|Ach or Beh to define record type|Conduct\nLastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct\nRowHash|E2824F8EE247AAFE866E2888A7AD471F6D630D95|For change comparison|Conduct\n\n#### _StudentAchievements_\n\nStudent membership of returned achievment records, including student specific related information such as Points.\n\nField|Example|Notes|Consent Scope\n------|----------|-------|------\nId|PL-9919.Ach.4000|Composite Id for the student membership|Conduct\nStudentId|9919|Id of the student|Conduct\nAchievementId|4000|Id of the conduct record|Conduct\nPoints|10|Points assigned to this specific student|Conduct\nOutcome|Commended|The outcome of the conduct record|Conduct\nOutcomeCode|COM|The outcome code of the conduct record|Conduct\nLastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct\nRowHash|E1654F8EE247AAFE789E2888A7AD471F6D630D95|For change comparison|Conduct\n\n#### _StaffAchievements_\n\nStaff membership of returned conduct records, including staff specific related information such as StaffRole.\n\nField|Example|Notes|Consent Scope\n------|----------|-------|------\nId|PWT-1.Ach.4000|Composite Id for the staff membership|Conduct\nStaffId|1|Id of the staff member|Conduct\nAchievementId|4000|Id of the achievement record|Conduct\nStaffRole|null|Role of this staff for this conduct record|Conduct\nLastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct\nRowHash|A1654F8EE247AAFE789E2888A7AD471F6D630D95|For change comparison|Conduct\n\n***"
      operationId: AchievementForDateRange
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStudentIds
        in: query
        description: Optionally include csv of Ids for linked students
        required: false
        schema:
          type: string
          format: CSV
      - name: includeStaffIds
        in: query
        description: Optionally include csv of Ids for linked staff (Not including RecordedBy)
        required: false
        schema:
          type: string
          format: CSV
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: IncidentDate
        in: query
        description: Optional filter on Incident Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: StudentId
        in: query
        description: Optional Student Id
        required: false
        schema:
          type: string
      - name: StaffId
        in: query
        description: Optional Staff Id
        required: false
        schema:
          type: string
      - name: id
        in: query
        description: Optional Conduct Id
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of achievementfordaterange data
          content:
            application/json:
              schema:
                type: object
                properties:
                  achievementfordaterange:
                    type: array
                    description: A JSON array of achievementfordaterange
                    items:
                      $ref: "#/components/schemas/Achievements"
                  StudentAchievements:
                    type: array
                    description: A JSON array of StudentAchievements
                    items:
                      $ref: "#/components/schemas/StudentAchievements"
                  StaffAchievements:
                    type: array
                    description: A JSON array of StaffAchievements
                    items:
                      $ref: "#/components/schemas/StaffAchievements"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AchievementForToday/:
    get:
      tags:
      - Achievement
      summary: Achievements for Today
      description: |-
        Retrieve positive achievement conduct records for a date range with optional filters to refine the returned dataset

        ### Related Endpoints
        Endpoint|Primary Key|Foreign Key|Related Endpoint Description|
        ---------|------------|-------|---------|
        school.students|StudentAchievements.StudentId|Students.Id|Student record information
        school.staff|StaffAchievements.StaffId|Staff.Id|Staff record information


        ***
        ### Fields by Scope {#Fields}
        #### _Achievements_

        Achievement records returned within the date range specified. Optionally, can include csv of StudentId members of each given conduct.

        Field|Example|Notes|Consent Scope
        ------|----------|-------|------
        Id|4000|MIS Id of the achievement record|Conduct
        ConductId|Ach.4000|Id of the conduct record prefixed with the conduct type to ensure uniqueness with behaviour records  - unprefixed|Conduct
        AchievementType|Lunchtime Incident|The incident type|Conduct
        Date|2017-05-10|Date of the incident|Conduct
        Activity|Lunch|Activity type|Conduct
        Location|Outside School Grounds|Location description for incident|Conduct
        RecordedBy|Mr A Blacker|Staff member incident was recorded by|Conduct
        RecordedOn|2017-05-10|Date incident was recorded on|Conduct
        Description|Grafitti on a wall|Comment on the incident record|ConductComments
        Category|Beh|Ach or Beh to define record type|Conduct
        LastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct
        RowHash|E2824F8EE247AAFE866E2888A7AD471F6D630D95|For change comparison|Conduct

        #### _StudentAchievements_

        Student membership of returned achievment records, including student specific related information such as Points.

        Field|Example|Notes|Consent Scope
        ------|----------|-------|------
        Id|PL-9919.Ach.4000|Composite Id for the student membership|Conduct
        StudentId|9919|Id of the student|Conduct
        AchievementId|4000|Id of the conduct record|Conduct
        Points|10|Points assigned to this specific student|Conduct
        Outcome|Commended|The outcome of the conduct record|Conduct
        OutcomeCode|COM|The outcome code of the conduct record|Conduct
        LastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct
        RowHash|E1654F8EE247AAFE789E2888A7AD471F6D630D95|For change comparison|Conduct

        #### _StaffAchievements_

        Staff membership of returned conduct records, including staff specific related information such as StaffRole.

        Field|Example|Notes|Consent Scope
        ------|----------|-------|------
        Id|PWT-1.Ach.4000|Composite Id for the staff membership|Conduct
        StaffId|1|Id of the staff member|Conduct
        AchievementId|4000|Id of the achievement record|Conduct
        StaffRole|null|Role of this staff for this conduct record|Conduct
        LastUpdated|2016-07-28T04:04:50.112|The last time this data was updated|Conduct
        RowHash|A1654F8EE247AAFE789E2888A7AD471F6D630D95|For change comparison|Conduct


        ***
      operationId: AchievementForToday
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStudentIds
        in: query
        description: Optionally include csv of Ids for linked students
        required: false
        schema:
          type: string
          format: CSV
      - name: includeStaffIds
        in: query
        description: Optionally include csv of Ids for linked staff (Not including RecordedBy)
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of achievementfordaterange data
          content:
            application/json:
              schema:
                type: object
                properties:
                  achievementfordaterange:
                    type: array
                    description: A JSON array of achievementfordaterange
                    items:
                      $ref: "#/components/schemas/Achievements"
                  StudentAchievements:
                    type: array
                    description: A JSON array of StudentAchievements
                    items:
                      $ref: "#/components/schemas/StudentAchievements"
                  StaffAchievements:
                    type: array
                    description: A JSON array of StaffAchievements
                    items:
                      $ref: "#/components/schemas/StaffAchievements"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AgencyAgent:
    get:
      tags:
      - School
      summary: Agencies and Agents
      description: "## Endpoint Description\r\n\r\nRetrieves marks for _AM / PM session_ attendance events for students currently on roll in a specified date range.\r\n\r\nThe cache TTL for this endpoint is **30 minutes** - if a request has been made for the same date range within the last 30 minutes, you will instantly be returned the result from the cache. If it has been more than 30 minutes since the last request for a given date, then **XporterOnDemand** will refresh the cache directly from the *MIS*.\r\n\r\n> **Tip:** For date ranges, we recommend requesting Monday to Friday for a week and 1st to the last of the month for a month range. This will make it likely that you will hit a recent cache refresh and be returned the data swiftly.\r\n\r\n#### Quick Links \r\n\r\n- Options\r\n- Filters\r\n- Types\r\n- Related Endpoints\r\n- Fields by Scope\r\n\r\n### Options\r\n\r\nAvailable option parameters for this endpoint that globally affect the returned dataset:\r\n\r\n> **excludeNoMarks** - Do not include records where no mark has yet been received (Mark = \"-\")\r\n\r\n> **excludeClosed** - Do not include records where the school is closed to students (Mark = \"#\")\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                                 |\r\n|------------|-------------|--------------------------------------------------------------------|\r\n| **Mandatory** | DateFrom    | The date requested for which to return marks. Format \"yyyy-mm-dd\" |\r\n| **Mandatory** | DateTo      | The date requested for which to return marks. Format \"yyyy-mm-dd\" |\r\n| Optional    | id          | Make a request for a specific student Id                          |\r\n| Optional    | sessionType | Choose to specifically request AM or PM session attendance        |\r\n\r\n***\r\n\r\n### Types\r\n\r\nDefinitions of the type fields used by this endpoint:\r\n\r\n> **sessionType**\r\n>\r\n> - **AM:** The morning statutory attendance session\r\n> - **PM:** The afternoon statutory attendance session\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint             | Primary Key                | Foreign Key       | Related Endpoint Description                          |\r\n|----------------------|---------------------------|-------------------|------------------------------------------------------|\r\n| school.students      | AttendMarks.StudentId     | Students.Id       | Main endpoint for students' specific details         |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field      | Example                     | Notes                                                  | Consent Scope |\r\n|------------|-----------------------------|--------------------------------------------------------|---------------|\r\n| Id         | 9919.2016-08-26.AM         | Unique Id of the attendance mark used in the changeSet | Attendance    |\r\n| Date       | 2016-08-26                  | The date of the attendance mark                        | Attendance    |\r\n| StudentId  | 9919                        | The Id of the student                                  | Attendance    |\r\n| Mark       | L                           | The specific mark received                             | Attendance    |\r\n| Typ\r\n"
      operationId: AgencyAgent
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional StudentID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AgencyAgent data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Agency:
                    type: array
                    description: A JSON array of Agency
                    items:
                      $ref: "#/components/schemas/Agency"
                  Agent:
                    type: array
                    description: A JSON array of Agent
                    items:
                      $ref: "#/components/schemas/Agent"
                  AgencyStudent:
                    type: array
                    description: A JSON array of AgencyStudent
                    items:
                      $ref: "#/components/schemas/AgencyStudent"
                  AgentStudent:
                    type: array
                    description: A JSON array of AgentStudent
                    items:
                      $ref: "#/components/schemas/AgentStudent"
                  AgencyAgent:
                    type: array
                    description: A JSON array of AgencyAgent
                    items:
                      $ref: "#/components/schemas/AgencyAgent"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/applications:
    get:
      tags:
      - School
      summary: Applications
      description: Get extended details for Applicants and Applications
      operationId: applications
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeAdmitted
        in: query
        description: Optional StudentID
        required: true
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Applications data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Applications:
                    type: array
                    description: A JSON array of Applications
                    items:
                      $ref: "#/components/schemas/Applications"
                  Applicants:
                    type: array
                    description: A JSON array of Applicants
                    items:
                      $ref: "#/components/schemas/Applicants"
                  ApplicantSENProvisions:
                    type: array
                    description: A JSON array of ApplicantSENProvisions
                    items:
                      $ref: "#/components/schemas/ApplicantSENProvisions"
                  ApplicantSENNeeds:
                    type: array
                    description: A JSON array of ApplicantSENNeeds
                    items:
                      $ref: "#/components/schemas/ApplicantSENNeeds"
                  ApplicantMedicalEvents:
                    type: array
                    description: A JSON array of ApplicantMedicalEvents
                    items:
                      $ref: "#/components/schemas/ApplicantMedicalEvents"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/assessmentresults:
    get:
      tags:
      - Assessment
      summary: Assessment Results
      description: "## Endpoint Description\n\nUsing the information from the school.students, school.groups, and school.assessmentstructure endpoints, request specific result data. This call returns the same data structure as the other `assessmentresult*` endpoints, but allows all of the available filters to be used.\n\n> **Tip:** When filtering by specific aspects, by default we will return you the results data for all associated resultsets linked to the aspects requested.\n\n> Optionally, you can specify a request for a specific resultset by supplying the aspect in a pipe-separated pair with the ResultSetId:\n> \n> * **Example:** Aspects=702|34,701|33\n> \n> In addition, you can explicitly ask for results that are linked to no resultset by including the pipe separator but no value:\n> \n> * **Example:** Aspects=702|,701|\n\n***\n\n### Filters\n\nAvailable query parameters for this endpoint to refine the returned dataset:\n\n| Required?  | Filter Name | Filter Description                                                          |\n|------------|-------------|---------------------------------------------------------------------------|\n| **Mandatory** (*) | Students    | Request results for a specific set of students (Comma-separated)       |\n| **Mandatory** (*) | Groups      | Request results for students who are members of specific groups (Comma-separated)|\n| **Mandatory** (*) | Aspects     | Request results for specific aspects (Comma-separated)                  |\n| **Mandatory** (*) | Resultsets  | Request results for specific resultsets (Comma-separated)               |\n| **Mandatory** (*) | Templates    | Request results for specific templates (Comma-separated)                |\n| **Mandatory** (*) | Columns      | Request results for specific columns (Comma-separated)                  |\n| **Mandatory** (*) | Marksheets   | Request results for specific marksheets (Comma-separated)               |\n| Optional    | ResultDateFrom| Filter to results achieved after this date (inclusive)                   |\n| Optional    | ResultDateTo  | Filter to results achieved before this date (inclusive)                  |\n| Optional    | CollectionDateFrom| Filter to results where the collection date is after this date (inclusive)|\n| Optional    | CollectionDateTo| Filter to results where the collection date is before this date (inclusive)|\n\n> (*) - At least one of Students, Groups, Aspects, Resultsets, Templates, Columns, or Marksheets filter must be populated. If more than one are present, then the filter is additive, apart from Resultsets which overrides any others.\n\n***\n\n### Related Endpoints\n\n| Endpoint                     | Primary Key               | Foreign Key       | Related Endpoint Description                      |\n|------------------------------|--------------------------|-------------------|--------------------------------------------------|\n| school.students              | AsmResults.StudentId     | Students.Id       | Student who has been awarded the result          |\n| school.assessmentstructure    | AsmResults.AspectId      | Aspects.Id        | Aspect for which the result relates               |\n| school.assessmentstructure    | AsmResults.ResultSetId    | ResultSets.Id     | The specific resultset for which the result was recorded |\n\n***\n\n### Fields by Scope\n\n| Field                   | Example   | Notes                                                  | Consent Scope    |\n|-------------------------|-----------|--------------------------------------------------------|-------------------|\n| Id                      | 1289067   | The unique MIS identifier for the result               | AssessmentResults  |\n| StudentId               | 9919      | Id of the student who owns the result                  | AssessmentResults  |\n| AspectId                | 702       | Id of the aspect for which the result is for          | AssessmentResults  |\n| ResultDate              | 2015-09-03| Date the result was achieved                           | AssessmentResults  |\n| ResultSetId             | 24        | Id of the resultset against which the result was recorded | AssessmentResults  |\n| Result                  | 6C        | The value of the result                                | AssessmentResults  |\n| NumericValue            | 24        | The numeric value of the result                        | AssessmentResults  |\n| Notes                   | null      | Optional notes field                                   | AssessmentResults  |\n\n***\n"
      operationId: assessmentresults
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Students
        in: query
        description: Csv of Student Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: Aspects
        in: query
        description: Csv of Aspects Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: ResultSets
        in: query
        description: Csv of ResultSets Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: Columns
        in: query
        description: Csv of Column Ids to pre-populate Aspects
        required: true
        schema:
          type: string
          format: CSV
      - name: Marksheets
        in: query
        description: Csv of Marksheet Ids to pre-populate Students and Aspects
        required: true
        schema:
          type: string
          format: CSV
      - name: ResultDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ResultDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of assessmentresults data
          content:
            application/json:
              schema:
                type: object
                properties:
                  assessmentresults:
                    type: array
                    description: A JSON array of assessmentresults
                    items:
                      $ref: "#/components/schemas/assessmentresults"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/assessmentresultsbyaspect:
    get:
      tags:
      - Assessment
      summary: Assessment Results By Aspect
      description: "## Endpoint Description\n\nUsing the information from the school.students, school.groups, and school.assessmentstructure endpoints, request specific result data.\n\n> **Tip:** When filtering by specific aspects, by default we will return you the results data for all associated resultsets linked to the aspects requested.\n\n> Optionally, you can specify a request for a specific resultset by supplying the aspect in a pipe-separated pair with the ResultSetId:\n> \n> * **Example:** Aspects=702|34,701|33\n> \n> In addition, you can explicitly ask for results that are linked to no resultset by including the pipe separator but no value:\n> \n> * **Example:** Aspects=702|,701|\n\n***\n\n### Filters\n\nAvailable query parameters for this endpoint to refine the returned dataset:\n\n| Required?  | Filter Name | Filter Description                                           |\n|------------|-------------|------------------------------------------------------------|\n| **Mandatory** | Aspects     | Request results for a specific set of aspects (Comma-separated)  |\n| Optional    | ResultDateFrom| Filter to results achieved after this date (inclusive)    |\n| Optional    | ResultDateTo  | Filter to results achieved before this date (inclusive)   |\n| Optional    | CollectionDateFrom| Filter to results where the collection date is after this date (inclusive) |\n| Optional    | CollectionDateTo| Filter to results where the collection date is before this date (inclusive) |\n\n***\n\n### Related Endpoints\n\n| Endpoint                     | Primary Key               | Foreign Key       | Related Endpoint Description                      |\n|------------------------------|--------------------------|-------------------|--------------------------------------------------|\n| school.students              | AsmResults.StudentId     | Students.Id       | Student who has been awarded the result          |\n| school.assessmentstructure    | AsmResults.AspectId      | Aspects.Id        | Aspect for which the result relates               |\n| school.assessmentstructure    | AsmResults.ResultSetId    | ResultSets.Id     | The specific resultset for which the result was recorded |\n\n***\n\n### Fields by Scope\n\n| Field                   | Example   | Notes                                                  | Consent Scope    |\n|-------------------------|-----------|--------------------------------------------------------|-------------------|\n| Id                      | 1289067   | The unique MIS identifier for the result               | AssessmentResults  |\n| StudentId               | 9919      | Id of the student who owns the result                  | AssessmentResults  |\n| AspectId                | 702       | Id of the aspect for which the result is for          | AssessmentResults  |\n| ResultDate              | 2015-09-03| Date the result was achieved                           | AssessmentResults  |\n| ResultSetId             | 24        | Id of the resultset against which the result was recorded | AssessmentResults  |\n| Result                  | 6C        | The value of the result                                | AssessmentResults  |\n| NumericValue            | 24        | The numeric value of the result                        | AssessmentResults  |\n| Notes                   | null      | Optional notes field                                   | AssessmentResults  |\n\n***\n"
      operationId: assessmentresultsbyaspect
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Aspects
        in: query
        description: Csv of Aspects Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: ResultDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ResultDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of assessmentresults data
          content:
            application/json:
              schema:
                type: object
                properties:
                  assessmentresults:
                    type: array
                    description: A JSON array of assessmentresults
                    items:
                      $ref: "#/components/schemas/assessmentresults"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/assessmentresultsbymarksheet:
    get:
      tags:
      - Assessment
      summary: Assessment Results By Marksheet
      description: |
        ## Endpoint Description

        Using the information from the school.students, school.groups, and school.assessmentstructure endpoints, request specific result data. Marksheets are the data entry grid for a template assigned to a specific group of students.

        ***

        ### Filters

        Available query parameters for this endpoint to refine the returned dataset:

        | Required?  | Filter Name | Filter Description                                           |
        |------------|-------------|------------------------------------------------------------|
        | **Mandatory** | Marksheets   | Request results for a specific set of marksheets (Comma-separated)  |
        | Optional    | ResultDateFrom| Filter to results achieved after this date (inclusive)    |
        | Optional    | ResultDateTo  | Filter to results achieved before this date (inclusive)   |
        | Optional    | CollectionDateFrom| Filter to results where the collection date is after this date (inclusive) |
        | Optional    | CollectionDateTo| Filter to results where the collection date is before this date (inclusive) |

        ***

        ### Related Endpoints

        | Endpoint                     | Primary Key               | Foreign Key       | Related Endpoint Description                      |
        |------------------------------|--------------------------|-------------------|--------------------------------------------------|
        | school.students              | AsmResults.StudentId     | Students.Id       | Student who has been awarded the result          |
        | school.assessmentstructure    | AsmResults.AspectId      | Aspects.Id        | Aspect for which the result relates               |
        | school.assessmentstructure    | AsmResults.ResultSetId    | ResultSets.Id     | The specific resultset for which the result was recorded |

        ***

        ### Fields by Scope

        | Field                   | Example   | Notes                                                  | Consent Scope    |
        |-------------------------|-----------|--------------------------------------------------------|-------------------|
        | Id                      | 1289067   | The unique MIS identifier for the result               | AssessmentResults  |
        | StudentId               | 9919      | Id of the student who owns the result                  | AssessmentResults  |
        | AspectId                | 702       | Id of the aspect for which the result is for          | AssessmentResults  |
        | ResultDate              | 2015-09-03| Date the result was achieved                           | AssessmentResults  |
        | ResultSetId             | 24        | Id of the resultset against which the result was recorded | AssessmentResults  |
        | Result                  | 6C        | The value of the result                                | AssessmentResults  |
        | NumericValue            | 24        | The numeric value of the result                        | AssessmentResults  |
        | Notes                   | null      | Optional notes field                                   | AssessmentResults  |

        ***
      operationId: assessmentresultsbymarksheet
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Marksheets
        in: query
        description: Csv of MArksheet Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: ResultDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ResultDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of assessmentresults data
          content:
            application/json:
              schema:
                type: object
                properties:
                  assessmentresults:
                    type: array
                    description: A JSON array of assessmentresults
                    items:
                      $ref: "#/components/schemas/assessmentresults"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/assessmentresultsbystudent:
    get:
      tags:
      - Assessment
      summary: Assessment Results By Student
      description: |
        ## Endpoint Description

        Using the information from the school.students, school.groups, and school.assessmentstructure endpoints, request specific result data.

        ***

        ### Filters

        Available query parameters for this endpoint to refine the returned dataset:

        | Required?  | Filter Name | Filter Description                                           |
        |------------|-------------|------------------------------------------------------------|
        | **Mandatory** (*) | Students    | Request results for a specific set of students (Comma-separated)   |
        | **Mandatory** (*) | Groups      | Request results for students who are members of specific groups (Comma-separated) |
        | Optional    | ResultDateFrom| Filter to results achieved after this date (inclusive)    |
        | Optional    | ResultDateTo  | Filter to results achieved before this date (inclusive)   |
        | Optional    | CollectionDateFrom| Filter to results where the collection date is after this date (inclusive) |
        | Optional    | CollectionDateTo| Filter to results where the collection date is before this date (inclusive) |

        > (*) - Either Students or Groups filter must be populated. If both are present, then the filter is additive.

        ***

        ### Related Endpoints

        | Endpoint                     | Primary Key               | Foreign Key       | Related Endpoint Description                      |
        |------------------------------|--------------------------|-------------------|--------------------------------------------------|
        | school.students              | AsmResults.StudentId     | Students.Id       | Student who has been awarded the result          |
        | school.assessmentstructure    | AsmResults.AspectId      | Aspects.Id        | Aspect for which the result relates               |
        | school.assessmentstructure    | AsmResults.ResultSetId    | ResultSets.Id     | The specific resultset for which the result was recorded |

        ***

        ### Fields by Scope

        | Field                   | Example   | Notes                                                  | Consent Scope    |
        |-------------------------|-----------|--------------------------------------------------------|-------------------|
        | Id                      | 1289067   | The unique MIS identifier for the result               | AssessmentResults  |
        | StudentId               | 9919      | Id of the student who owns the result                  | AssessmentResults  |
        | AspectId                | 702       | Id of the aspect for which the result is for          | AssessmentResults  |
        | ResultDate              | 2015-09-03| Date the result was achieved                           | AssessmentResults  |
        | ResultSetId             | 24        | Id of the resultset against which the result was recorded | AssessmentResults  |
        | Result                  | 6C        | The value of the result                                | AssessmentResults  |
        | NumericValue            | 24        | The numeric value of the result                        | AssessmentResults  |
        | Notes                   | null      | Optional notes field                                   | AssessmentResults  |

        ***
      operationId: assessmentresultsbystudent
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Marksheets
        in: query
        description: Csv of Student Ids
        required: true
        schema:
          type: string
          format: CSV
      - name: ResultDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ResultDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateFrom
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: CollectionDateTo
        in: query
        description: yyyy-mm-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of assessmentresults data
          content:
            application/json:
              schema:
                type: object
                properties:
                  assessmentresults:
                    type: array
                    description: A JSON array of assessmentresults
                    items:
                      $ref: "#/components/schemas/assessmentresults"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/assessmentstructure:
    get:
      tags:
      - Assessment
      summary: Assessment Structure
      description: "## Endpoint Description\n\nThe assessment structure endpoint provides you with the components that make up a given school's assessment setup in their MIS. As there can be hundreds of thousands of results stored for a single school, it is important to collect just the specific result information you need. Using the data from this endpoint, you can provide your end user with a choice of which assessment aspects, templates, or marksheets to collect results for, avoiding overload of unnecessary information.\n\n### Usage\n\nIf your intention is to simply display results for particular assessments in your application, then you likely just need to identify the **Aspects** that are relevant to the school so you can request only the results that you need. The simplest way to achieve this is for the school to select the **Templates** (Bulk / Fewer: collections of assessments defined by the school for a particular purpose) or the **Aspects** (Granular / Many: the individual specific assessments) that they wish to display.\n\n* **Example:**\n  - School wishes to display \"Target\" and \"Working At\" values for students.\n  - School selects templates that contain the assessments (**Aspects**) they require, e.g., \"English Assessment Y9\", \"Maths Assessment Y7\".\n  - Your application then can request Results for the **Template** IDs selected, and the XporterOnDemand API will return Results for all of the assessments (**Aspects**) contained in the template.\n\nYou may receive multiple Results for each **Aspect** due to **ResultSets** defining particular reporting periods. Expected **Aspects** will relate to \"Target\" or \"Working At,\" though each school's naming conventions may differ.\n\n> **Note:** Some schools may flip this model and use **ResultSets** to define things like \"Target\" and \"Working At\" for a single **Aspect** instead of separate **Aspects**.\n\nBy default, this endpoint returns **Aspects** and **ResultSets**. By adjusting the options below, you can include more detailed structure information. The assessment structure is included in the **School** consent scope as it provides organizational and structural information for the establishment.\n\n***\n\n### Options\n\n> **includeMarkingGrids** - Set to enable **Templates**, **MarkSheets**, and **Columns**  \n> **includeGradesets** - Set to enable **GradeSets**, **Grades**, and **MarkSets**  \n> **includeGradesetHistory** - Set to enable **GradeSetHistory**  \n\n### Parameters\n\n> **categoryFilter** - filter all **Result Sets** according to an **Assessment Category** \n\n***\n\n### Related Endpoints\n\n| Assessment Endpoint                  | Related Endpoint Description                                   |\n|--------------------------------------|---------------------------------------------------------------|\n| school.assessmentresultsbystudent    | Request results for specific students                        |\n| school.assessmentresultsbyaspect      | Request results for specific aspects                         |\n| school.assessmentresultsbymarksheet   | Request results for specific marksheets                      |\n| school.assessmentresults              | Advanced endpoint with multiple filtering options            |\n\n| Endpoint                     | Primary Key               | Foreign Key       | Related Endpoint Description                      |\n|------------------------------|--------------------------|-------------------|--------------------------------------------------|\n| school.groups                | Marksheets.GroupId       | Groups.Id         | Link to the group definition for a marksheet      |\n| school.staff                 | Templates.CreatorId      | Staff.Id          | Link to the member of staff that created the template |\n\n***\n\n### Fields by Scope\n\n#### _Aspects_\n**Aspects** are the definition of an assessment and where results relate back to. Aspects are linked to **GradeSets** and **MarkSets**, which define the allowed values that can be used when recording results.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 702     | The unique MIS identifier for the aspect                      | School        |\n| ExternalId   | 93      | The defined externalId for the aspect                         | School        |\n| AspectType   | Grade   | Definition of the type of result to be associated             | School        |\n| Name         | English Attainment Level | Name of the aspect                             | School        |\n| Description  | English Attainment Level | Description of the aspect                   | School        |\n| Supplier     | 328 4321 Example School| Name of the establishment that created the aspect | School        |\n| GradeSetId   | 204     | Id of the gradeset assigned to this aspect                    | School        |\n| KS1          | 1       | Is the aspect KS1, 1 or 0                                     | School        |\n| KS2          | 1       | Is the aspect KS2, 1 or 0                                     | School        |\n| KS3          | 1       | Is the aspect KS3, 1 or 0                                     | School        |\n\n#### _Templates_\n**Templates** are a collection of **Columns** that define the assessment recording grid used to record results for a particular purpose.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 1121    | The unique MIS identifier for the template                    | School        |\n| Name         | English Assessment Y9| The template name                                      | School        |\n| Notes        | Please enter test results by the end of Spring term| Optional contextual information added to the template | School        |\n| CreatorId    | 26      | Id of the staff member that created the template             | School        |\n| FilterGroupId | 35     | Id of the group the template is filtered by                  | School        |\n\n#### _Marksheets_\n**Marksheets** are **Templates** linked to a specific group to allow data entry by staff in the MIS.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 5372    | The unique MIS identifier for the marksheet                   | School        |\n| TemplateId   | 1165    | Id of the template used in this marksheet                     | School        |\n| GroupId      | 35      | Id of the group this marksheet is configured for             | School        |\n\n#### _Columns_\n**Columns** are components of **Templates**. They represent a given **Aspect** linked to a specific **ResultSet**. Each column is an **Aspect** / **ResultSet** pair.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 13839   | The unique MIS identifier for the column                      | School        |\n| TemplateId   | 1120    | Id of the template this column belongs to                     | School        |\n| ColumnHeading| English Attainment Lev 2 | The description of the aspect in this template      | School        |\n| AspectId     | 702     | Id of the aspect where the result is stored                   | School        |\n| ResultSetId  | 31      | Id of the resultset for which this column is linked           | School        |\n| DisplayOrder  | 7      | Display order of the column in the marksheet                  | School        |\n| ReadOnly     | 0       | Boolean to identify if the result is modifiable               | School        |\n\n#### _ResultSets_\n**ResultSets** define specific reporting periods linked to an **Aspect** when used in a **Template**.\n\n* **Example:** **Aspect** \"Maths Target\" linked to **ResultSets** \"Autumn 2017\", \"Spring 2018\", \"Summer 2018\" allows tracking progress for \"Maths Target\" across three reporting points.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 31      | The unique MIS identifier for the resultset                   | School        |\n| ExternalId   | 31      | External Id of the resultset                                  | School        |\n| Name         | Year 7 Spring Term| Description of the resultset                             | School        |\n| Supplier     | 328 4321 Example School| Name of the establishment that created the resultset | School        |\n\n#### _GradeSetHistory_\nRecords the current validity of configured **GradeSets**. The **GradeSet** for a given **Aspect** may change, so historic results may relate to historic **GradeSets**.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 1463    | The unique MIS identifier for the gradesethistory record      | School        |\n| StartDate    | 2004-09-01 | Date from which this record is valid                       | School        |\n| EndDate      | null    | Date after which this record is no longer valid              | School        |\n| GradeSetId   | 74      | Id of the gradeset this record is linked to                  | School        |\n\n#### _GradeSets_\nA container for the valid **Grades** assigned to an **Aspect** where the AspectType of the **Aspect** is Grade.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 74      | The unique MIS identifier for the gradeset                    | School        |\n| Name         | Teacher Assessments | Description of the gradeset                             | School        |\n| Notes        | Teacher Assessment Grades | Additional text description for the gradeset    | School        |\n\n#### _Grades_\nThe definition of valid **Grades** that can be assigned to a student for an **Aspect**. The Value property will appear as the Result when querying the school.assessmentresults endpoints.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 832     | The unique MIS identifier for the grade                       | School        |\n| GradeSetHistoryId | 97  | Id of the gradesethistory record to ensure validity       | School        |\n| Description  | Working Towards Level 1 | Description of the grade                       | School        |\n| Value        | W       | Entry value for the grade                                     | School        |\n| NumericValue  | 3.0    | Hidden numeric value for the grade                            | School        |\n| DisplayOrder  | 15      | Order to display the grade in its gradeset                   | School        |\n\n#### _MarkSets_\nSimilar to **GradeSets** and **Grades**, but the AspectType is Integer rather than Grade.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 136     | The unique MIS identifier for the markset                     | School        |\n| AspectId     | 770     | Id of the aspect                                             | School        |\n| StartDate    | 1990-09-01 | Date from which this record is valid                      | School        |\n| EndDate      | null    | Date after which this record is no longer valid              | School        |\n| MinValue     | 0.00    | Minimum valid value for this record                           | School        |\n| MaxValue     | 100.00  | Maximum valid value for this record                           | School        |\n\n#### _Categories_\nAssessment **Categories** are created and assigned by the user in their MIS and associated with **Templates** or **Aspects**.\n\n| Field        | Example | Notes                                                         | Consent Scope |\n|--------------|---------|---------------------------------------------------------------|---------------|\n| Id           | 136     | The unique MIS identifier for the assessment category         | School        |\n| categoryName | 136     | The name of the assessment category                           | School        |\n\n***\n"
      operationId: assessmentstructure
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: CategoryFilter
        in: query
        description: Optional category name filter
        required: false
        schema:
          type: string
      - name: includeMarkingGrids
        in: query
        description: "Set to enable Templates, MarkSheets and Columns"
        required: false
        schema:
          type: boolean
      - name: includeGradesets
        in: query
        description: "Set to enable GradeSets, Grades, MarkSets"
        required: false
        schema:
          type: boolean
      - name: includeGradesetHistory
        in: query
        description: Set to enable GradeSetHistory
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of assessmentresults data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Aspects:
                    type: array
                    description: A JSON array of Aspects
                    items:
                      $ref: "#/components/schemas/Aspects"
                  Templates:
                    type: array
                    description: A JSON array of Templates
                    items:
                      $ref: "#/components/schemas/Templates"
                  Marksheets:
                    type: array
                    description: A JSON array of Marksheets
                    items:
                      $ref: "#/components/schemas/Marksheets"
                  Columns:
                    type: array
                    description: A JSON array of Columns
                    items:
                      $ref: "#/components/schemas/Columns"
                  ResultSets:
                    type: array
                    description: A JSON array of ResultSets
                    items:
                      $ref: "#/components/schemas/ResultSets"
                  GradeSetHistory:
                    type: array
                    description: A JSON array of GradeSetHistory
                    items:
                      $ref: "#/components/schemas/GradeSetHistory"
                  GradeSets:
                    type: array
                    description: A JSON array of GradeSets
                    items:
                      $ref: "#/components/schemas/GradeSets"
                  Grades:
                    type: array
                    description: A JSON array of Grades
                    items:
                      $ref: "#/components/schemas/Grades"
                  MarkSets:
                    type: array
                    description: A JSON array of MarkSets
                    items:
                      $ref: "#/components/schemas/MarkSets"
                  Categories:
                    type: array
                    description: A JSON array of Categories
                    items:
                      $ref: "#/components/schemas/Categories"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AttendanceCodes:
    get:
      tags:
      - Attendance
      summary: AttendanceCodes
      description: |
        ## Endpoint Description

        This endpoint returns the set of attendance mark codes in use at the school. If the data is unavailable from the specific school MIS integration, the endpoint will provide the Department for Education's set of attendance marks and meanings. Typically, this will align with the marks that the school uses, as they are included in statutory returns.

        ***

        ### Related Endpoints

        | Endpoint                           | Primary Key              | Foreign Key           | Related Endpoint Description                    |
        |------------------------------------|-------------------------|-----------------------|------------------------------------------------|
        | school.attendancefordate           | AttendCodes.Mark        | AttendMarks.Mark      | Retrieve lesson and session marks for a specific day   |
        | school.attendancefordaterange      | AttendCodes.Mark        | AttendMarks.Mark      | Retrieve session marks for a date range        |

        ***

        ### Fields by Scope

        | Field                            | Example        | Notes                                                                     | Consent Scope |
        |----------------------------------|----------------|---------------------------------------------------------------------------|---------------|
        | Mark                             | M              | The mark code from the MIS                                               | Attendance    |
        | Description                      | Medical/Dental appointments  | The display description of the mark                                       | Attendance    |
        | MeaningDescription               | Authorised Absence | The statistical meaning of the mark                                      | Attendance    |
        | ShortMeaningDescription           | Authorised     | The short statistical meaning of the mark                                 | Attendance    |
        | PhysicalMeaning                  | OUT            | The physical location meaning of the mark                                 | Attendance    |
        | Active                           | 1              | Whether the mark is active; boolean but can be null if unsupported       | Attendance    |

        ***
      operationId: AttendanceCodes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeInactive
        in: query
        description: Optionally include inactive records
        required: true
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AttendanceCodes data
          content:
            application/json:
              schema:
                type: object
                properties:
                  AttendCodes:
                    type: array
                    description: A JSON array of AttendCodes
                    items:
                      $ref: "#/components/schemas/AttendCodes"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AttendanceForDate:
    get:
      tags:
      - Attendance
      summary: Attendance for Date
      description: "## Endpoint Description\n\nRetrieves marks for _AM / PM session_ and _lesson_ attendance events for students currently on roll. The cache TTL for this endpoint is 30 minutes—if a request has been made for the same date within the last 30 minutes, the result will be returned from the cache. If it has been more than 30 minutes since the last request for a given date, XporterOnDemand will refresh the cache directly from the MIS.\n\n***\n\n### Options \n\nAvailable option parameters for this endpoint that globally affect the returned dataset:\n\n> **excludeNoMarks** - Do not include records where no mark has yet been received (Mark = \"-\")  \n> **excludeClosed** - Do not include records where the school is closed to students (Mark = \"#\")  \n\n***\n\n### Filters\n\nAvailable query parameters for this endpoint to refine the returned dataset:\n\n| Required?  | Filter Name      | Filter Description                               |\n|------------|------------------|-------------------------------------------------|\n| Optional   | date             | The date requested for which to return marks. Format \"yyyy-mm-dd\" |\n| Optional   | id               | Make a request for a specific student Id        |\n| Optional   | attendanceType   | Choose to specifically request session or lesson attendance |\n| Optional   | sessionType      | Choose to specifically request AM or PM session attendance |\n\n***\n\n### Types\n\nDefinitions of the type fields used by this endpoint:\n\n- **attendanceType**\n  - **L:** Lesson Attendance\n  - **S:** AM / PM Session Attendance (Required statutory mark)\n\n- **sessionType**\n  - **AM:** The morning statutory attendance session\n  - **PM:** The afternoon statutory attendance session\n\n***\n\n### Related Endpoints\n\n| Endpoint                          | Primary Key              | Foreign Key           | Related Endpoint Description                     |\n|-----------------------------------|-------------------------|-----------------------|-------------------------------------------------|\n| school.students                    | AttendMarks.StudentId    | Students.Id           | Main endpoint for student-specific details       |\n| school.timetable                   | AttendMarks.InstanceId    | Lessons.PeriodId      | Defines the occurrences of lessons and their properties |\n| school.timetableforstudent         | AttendMarks.InstanceId    |                        | Returns timetable for a specific student for an optional date range |\n| school.timetablestructure          | AttendMarks.InstanceId    |                        | Returns structure of timetable to supplement school.timetable |\n\n***\n\n### Fields by Scope\n\n| Field                    | Example                     | Notes                                           | Consent Scope |\n|--------------------------|-----------------------------|------------------------------------------------|---------------|\n| Id                       | 9919.2016-08-26.AM          | Unique Id of the attendance mark used in the changeSet |\n| Date                     | 2016-08-26                  | The date of the attendance mark                 | Attendance    |\n| InstanceId               | 38764                       | The unique event instance Id (Useful for lesson attendance) |\n| StudentId                | 9919                        | The Id of the student                           | Attendance    |\n| Mark                     | L                           | The specific mark received                      | Attendance    |\n| MinsLate                 | 5                           | The number of minutes late when code L is used |\n| Notes                    | Bus was late                | Any notes to explain the mark given            | Attendance    |\n| Type                     | S                           | Attendance type (S for Session, L for Lesson)  | Attendance    |\n| Session                  | AM                          | The morning or afternoon session                | Attendance    |\n\n***\n"
      operationId: AttendanceForDate
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: excludeNoMarks
        in: query
        description: Do not include where Mark= \"-\" in the results
        required: true
        schema:
          type: boolean
      - name: excludeClosed
        in: query
        description: Do not include where Mark= \"#\" in the results
        required: true
        schema:
          type: boolean
      - name: date
        in: query
        description: Optional date for attendance data yyyy-MM-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: id
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
      - name: Optional attendance type
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
          enum:
          - L
          - S
      - name: Optional session type
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
          enum:
          - AM
          - PM
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AttendanceForDate data
          content:
            application/json:
              schema:
                type: object
                properties:
                  AttendMarks:
                    type: array
                    description: A JSON array of AttendCodes
                    items:
                      $ref: "#/components/schemas/AttendMarks"
                  DateRange:
                    type: array
                    description: A JSON array of DateRange
                    items:
                      $ref: "#/components/schemas/DateRange"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AttendanceForDateRange:
    get:
      tags:
      - Attendance
      summary: Attendance for Date Range
      description: "## Endpoint Description\n\nRetrieves marks for _AM / PM session_ attendance events for students currently on roll in a specified date range. The cache TTL for this endpoint is 30 minutes—if a request has been made for the same date range within the last 30 minutes, the result will be returned from the cache. If it has been more than 30 minutes since the last request for a given date, XporterOnDemand will refresh the cache directly from the MIS.\n\n> **Tip:** For date ranges, it is recommended to request Monday to Friday for a week and 1st to the last of the month for a month range. This increases the likelihood of hitting a recent cache refresh, returning data quickly.\n\n***\n\n### Options\n\nAvailable option parameters for this endpoint that globally affect the returned dataset:\n\n> **excludeNoMarks** - Do not include records where no mark has yet been received (Mark = \"-\")  \n> **excludeClosed** - Do not include records where the school is closed to students (Mark = \"#\")  \n\n***\n\n### Filters\n\nAvailable query parameters for this endpoint to refine the returned dataset:\n\n| Required?  | Filter Name | Filter Description                               |\n|------------|-------------|-------------------------------------------------|\n| **Mandatory** | DateFrom   | The start date requested for which to return marks. Format \"yyyy-mm-dd\" |\n| **Mandatory** | DateTo     | The end date requested for which to return marks. Format \"yyyy-mm-dd\"   |\n| Optional   | id          | Make a request for a specific student Id        |\n| Optional   | sessionType | Choose to specifically request AM or PM session attendance |\n\n***\n\n### Types\n\nDefinitions of the type fields used by this endpoint:\n\n- **sessionType**\n  - **AM:** The morning statutory attendance session\n  - **PM:** The afternoon statutory attendance session\n\n***\n\n### Related Endpoints\n\n| Endpoint                   | Primary Key             | Foreign Key        | Related Endpoint Description                     |\n|----------------------------|------------------------|--------------------|-------------------------------------------------|\n| school.students             | AttendMarks.StudentId   | Students.Id        | Main endpoint for student-specific details       |\n\n***\n\n### Fields by Scope\n\n| Field                    | Example                    | Notes                                        | Consent Scope |\n|--------------------------|----------------------------|----------------------------------------------|---------------|\n| Id                       | 9919.2016-08-26.AM         | Unique Id of the attendance mark used in the changeSet |\n| Date                     | 2016-08-26                 | The date of the attendance mark              | Attendance     |\n| StudentId                | 9919                       | The Id of the student                        | Attendance     |\n| Mark                     | L                          | The specific mark received                   | Attendance     |\n| Type                     | S                          | Attendance type (S for Session)             | Attendance     |\n| Session                  | AM                         | The morning or afternoon session             | Attendance     |\n\n***\n"
      operationId: AttendanceForDateRange
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: excludeNoMarks
        in: query
        description: Do not include where Mark= \"-\" in the results
        required: true
        schema:
          type: boolean
      - name: includeExternalId
        in: query
        description: Include the student externalId column in the resultset
        required: true
        schema:
          type: boolean
      - name: includeLeavers
        in: query
        description: includeLeaversResultse
        required: true
        schema:
          type: boolean
      - name: forcedownload
        in: query
        description: If allowed force download from school
        required: true
        schema:
          type: boolean
      - name: excludeClosed
        in: query
        description: Do not include where Mark= \"#\" in the results
        required: true
        schema:
          type: boolean
      - name: date
        in: query
        description: Optional date for attendance data yyyy-MM-dd
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: id
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
      - name: Optional attendance type
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
          enum:
          - L
          - S
      - name: Optional session type
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
          enum:
          - AM
          - PM
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AttendanceForDate data
          content:
            application/json:
              schema:
                type: object
                properties:
                  AttendMarks:
                    type: array
                    description: A JSON array of AttendCodes
                    items:
                      $ref: "#/components/schemas/AttendMarks"
                  DateRange:
                    type: array
                    description: A JSON array of DateRange
                    items:
                      $ref: "#/components/schemas/DateRange"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/attendancesummary:
    get:
      tags:
      - Attendance
      summary: Attendance Summary
      description: ""
      operationId: attendancesummary
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeMinutesLate
        in: query
        description: Set to include the minutes late resultset
        required: false
        schema:
          type: boolean
      - name: includeAttendanceNotes
        in: query
        description: Set to include the attendance notes resultset
        required: false
        schema:
          type: boolean
      - name: includeStatutoryComments
        in: query
        description: Set to include the statutory comments resultset
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Optional Student Id
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AttendanceSummary data
          content:
            application/json:
              schema:
                type: object
                properties:
                  AttendanceSummary:
                    type: array
                    description: A JSON array of AttendanceSummary
                    items:
                      $ref: "#/components/schemas/AttendanceSummary"
                  AttendCodes:
                    type: array
                    description: A JSON array of AttendCodes
                    items:
                      $ref: "#/components/schemas/AttendCodes"
                  MinutesLate:
                    type: array
                    description: A JSON array of MinutesLate
                    items:
                      $ref: "#/components/schemas/MinutesLate"
                  AttendanceNotes:
                    type: array
                    description: A JSON array of AttendanceNotes
                    items:
                      $ref: "#/components/schemas/AttendanceNotes"
                  StatutoryComments:
                    type: array
                    description: A JSON array of StatutoryComments
                    items:
                      $ref: "#/components/schemas/StatutoryComments"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/AttendanceSessionStatsByWeek:
    get:
      tags:
      - Attendance
      summary: Summary attendance statistics by week for a date range.
      description: |
        ## Endpoint Description

        Retrieve summary attendance statistics by week for a specified date range.

        ***

        ### Filters

        Available query parameters for this endpoint to refine the returned dataset:

        | Required?  | Filter Name | Filter Description                              |
        |------------|-------------|------------------------------------------------|
        | Mandatory   | startDate   | Start date of the date range.                  |
        | Mandatory   | endDate     | End date of the date range.                    |

        ***

        ### Related Endpoints

        | Endpoint                   | Primary Key              | Foreign Key        | Related Endpoint Description                     |
        |----------------------------|-------------------------|--------------------|-------------------------------------------------|
        | school.students             | AttStatsByWeek.StudentId | Students.Id        | Student record information                       |

        ***

        ### Fields by Scope

        #### _AttStatsByWeek_
        Summary attendance statistics by week for a date range.

        | Field                         | Example                    | Notes                                        | Consent Scope |
        |-------------------------------|----------------------------|----------------------------------------------|---------------|
        | Id                            | 7658.2016-12-26            | Unique composite id of the record            | Attendance     |
        | StudentId                     | 7658                       | Id of the student                            | Attendance     |
        | WeekStartDate                 | 2016-12-26                 | Start date of the week                       | Attendance     |
        | WeekEndDate                   | 2017-01-01                 | End date of the week                         | Attendance     |
        | NumUnknownMarks               | 0                          | Count of unknown marks                       | Attendance     |
        | MarkIs_PresentAM              | 0                          | Count of present AM marks                    | Attendance     |
        | MarkIs_L                      | 0                          | Count of L marks                             | Attendance     |
        | MarkIs_PresentPM              | 0                          | Count of present PM marks                    | Attendance     |
        | MarkIs_W                      | 0                          | Count of W marks                             | Attendance     |
        | MarkIs_B                      | 0                          | Count of B marks                             | Attendance     |
        | MarkIs_V                      | 0                          | Count of V marks                             | Attendance     |
        | MarkIs_J                      | 0                          | Count of J marks                             | Attendance     |
        | MarkIs_P                      | 0                          | Count of P marks                             | Attendance     |
        | MarkIs_S                      | 0                          | Count of S marks                             | Attendance     |
        | MarkIs_T                      | 0                          | Count of T marks                             | Attendance     |
        | MarkIs_R                      | 0                          | Count of R marks                             | Attendance     |
        | MarkIs_E                      | 0                          | Count of E marks                             | Attendance     |
        | MarkIs_C                      | 0                          | Count of C marks                             | Attendance     |
        | MarkIs_H                      | 0                          | Count of H marks                             | Attendance     |
        | MarkIs_M                      | 0                          | Count of M marks                             | Attendance     |
        | MarkIs_I                      | 0                          | Count of I marks                             | Attendance     |
        | MarkIs_N                      | 0                          | Count of N marks                             | Attendance     |
        | MarkIs_G                      | 0                          | Count of G marks                             | Attendance     |
        | MarkIs_O                      | 0                          | Count of O marks                             | Attendance     |
        | MarkIs_U                      | 0                          | Count of U marks                             | Attendance     |
        | MarkIs_NoMark                 | 0                          | Count of no marks                            | Attendance     |
        | NumPossibleMarks              | 0                          | Count of possible marks for the date range   | Attendance     |
        | NumMissingMarks               | 0                          | Count of missing marks for the date range     | Attendance     |
        | NumPresentMarks               | 0                          | Count of present marks for the date range      | Attendance     |
        | NumApprovedEAMarks           | 0                          | Count of approved educational activity marks     | Attendance     |
        | NumAuthAbsMarks               | 0                          | Count of authorised absence marks for the date range |
        | NumUnauthAbsMarks             | 0                          | Count of unauthorised absence marks for the date range |
        | NumLateMarks                  | 0                          | Count of late marks for the date range          | Attendance     |
        | NumLateBeforeRegMarks         | 0                          | Count of late before register marks for the date range |

        ***
      operationId: AttendanceSessionStatsByWeek
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: startDate
        in: query
        description: Date from
        required: true
        schema:
          type: boolean
          format: yyyy-MM-dd
      - name: endDate
        in: query
        description: Date to
        required: true
        schema:
          type: boolean
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of AttendanceSessionStatsByWeek data
          content:
            application/json:
              schema:
                type: object
                properties:
                  AttStatsByWeek:
                    type: array
                    description: A JSON array of AttStatsByWeek
                    items:
                      $ref: "#/components/schemas/AttStatsByWeek"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/behaviourfordaterange:
    get:
      tags:
      - Behaviour
      summary: Behaviour for Date Range
      description: "## Endpoint Description\r\n\r\nRetrieve negative behaviour records for a specified date range, with optional filters available to refine the returned dataset.\r\n\r\n***\r\n\r\n### Options\r\n\r\nAvailable option parameters for this endpoint:\r\n\r\n> **includeStudentIds** - Optionally include a CSV of IDs for linked students in the main behaviour result set.  \r\n> **includeStaffIds** - Optionally include a CSV of IDs for linked staff in the main behaviour result set.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name  | Filter Description                                    |\r\n|------------|--------------|------------------------------------------------------|\r\n| **Mandatory** | DateFrom    | The date from which to collect behaviour records.     |\r\n| **Mandatory** | DateTo      | The end of the date range for which behaviour records are collected. |\r\n| Optional   | IncidentDate | Retrieve records occurring on a specific date.       |\r\n| Optional   | StudentId    | Retrieve records for a specific student.             |\r\n| Optional   | StaffId      | Retrieve records where a specific staff member was involved.   |\r\n| Optional   | Id           | Retrieve a specific behaviour record.                |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                   | Primary Key              | Foreign Key        | Related Endpoint Description                    |\r\n|----------------------------|-------------------------|--------------------|------------------------------------------------|\r\n| school.students             | StudentConducts.StudentId | Students.Id        | Student record information                      |\r\n| school.staff                | StaffConducts.StaffId   | Staff.Id           | Staff record information                        |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Behaviour_\r\nBehaviour records returned within the specified date range. Optionally includes CSV of StudentId members for each conduct.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | 4000                        | Id of the conduct record                     | Conduct       |\r\n| ConductId                   | Beh.4000                    | MIS Id of the behaviour record                | Conduct       |\r\n| BehaviourType               | Lunchtime Incident           | The incident type                            | Conduct       |\r\n| Date                         | 2017-05-10                  | Date of the incident                          | Conduct       |\r\n| Time                         | Lunchtime                   | Name of the time period                      | Conduct       |\r\n| Activity                     | Lunch                       | Activity type                                | Conduct       |\r\n| Status                       | Unresolved                  | Current status of the conduct record         | Conduct       |\r\n| Location                     | Outside School Grounds      | Location description for the incident        | Conduct       |\r\n| RecordedBy                   | Mr A Blacker               | Staff member who recorded the incident       | Conduct       |\r\n| Outcome                      | null                        | Outcome of the incident                      | Conduct       |\r\n| RecordedOn                   | 2017-05-10                  | Date incident was recorded                   | Conduct       |\r\n| Description                  | Graffiti on a wall         | Comment on the incident record               | Conduct       |\r\n| Subject                      | null                        | Subject the incident relates to              | Conduct       |\r\n| Category                     | Beh                         | Defines record type (Ach or Beh)            | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | E2824F8EE247AAFE866E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n#### _StudentBehaviour_\r\nStudent membership of returned conduct records, including student-specific information such as Role and Points.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | PL-9919.Beh.4000            | Composite Id for the student membership      | Conduct       |\r\n| StudentId                   | 9919                        | Id of the student                            | Conduct       |\r\n| BehaviourId                 | 4000                        | Id of the behaviour record                   | Conduct       |\r\n| Points                       | 10                          | Points assigned to this specific student     | Conduct       |\r\n| Outcome                      | Discussed with Pupil        | Outcome for this student regarding the behaviour record | Conduct       |\r\n| OutcomeCode                  | DP                          | Outcome code of the behaviour record         | Conduct       |\r\n| Role                         | Participant                 | Role of this student in the behaviour record | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | E1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n#### _StaffBehaviour_\r\nStaff membership of returned conduct records, including staff-specific information such as StaffRole.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | PWT-1.Beh.4000              | Composite Id for the staff membership        | Conduct       |\r\n| StaffId                     | 1                            | Id of the staff member                       | Conduct       |\r\n| BehaviourId                 | 4000                        | Id of the behaviour record                   | Conduct       |\r\n| StaffRole                   | null                        | Role of this staff member in the conduct     | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n***\r\n"
      operationId: behaviourfordaterange
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStudentIds
        in: query
        description: Optionally include csv of Ids for linked students
        required: false
        schema:
          type: boolean
      - name: includeStaffIds
        in: query
        description: Optionally include csv of Ids for linked staff (Not including RecordedBy)
        required: false
        schema:
          type: boolean
      - name: DateFrom
        in: query
        description: StartDate
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: DateTo
        in: query
        description: EndDate
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: IncidentDate
        in: query
        description: Optional filter on incident date
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: StudentId
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: StaffId
        in: query
        description: Optional staff id
        required: false
        schema:
          type: string
      - name: id
        in: query
        description: Optional conduct id
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdate greater than this date
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Behaviour:
                    type: array
                    description: A JSON array of Behaviour
                    items:
                      $ref: "#/components/schemas/Behaviour"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/behaviourfortoday:
    get:
      tags:
      - Behaviour
      summary: Behaviour for Today
      description: "## Endpoint Description\r\n\r\nRetrieve negative behaviour records for today.\r\n\r\n***\r\n\r\n### Options\r\n\r\nAvailable option parameters for this endpoint:\r\n\r\n> **includeStudentIds** - Optionally include a CSV of IDs for linked students in the main behaviour result set.  \r\n> **includeStaffIds** - Optionally include a CSV of IDs for linked staff in the main behaviour result set.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name  | Filter Description                                      |\r\n|------------|--------------|--------------------------------------------------------|\r\n| Optional   | IncidentDate | Retrieve records occurring on a specific date.        |\r\n| Optional   | StudentId    | Retrieve records for a specific student.               |\r\n| Optional   | StaffId      | Retrieve records where a specific staff member was involved. |\r\n| Optional   | Id           | Retrieve a specific behaviour record.                  |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                   | Primary Key              | Foreign Key        | Related Endpoint Description                    |\r\n|----------------------------|-------------------------|--------------------|------------------------------------------------|\r\n| school.students             | StudentConducts.StudentId | Students.Id        | Student record information                      |\r\n| school.staff                | StaffConducts.StaffId   | Staff.Id           | Staff record information                        |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Behaviour_\r\nBehaviour records returned for today. Optionally includes a CSV of StudentId members for each conduct.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | 4000                        | Id of the conduct record                     | Conduct       |\r\n| ConductId                   | Beh.4000                    | MIS Id of the behaviour record                | Conduct       |\r\n| BehaviourType               | Lunchtime Incident           | The incident type                            | Conduct       |\r\n| Date                         | 2017-05-10                  | Date of the incident                          | Conduct       |\r\n| Time                         | Lunchtime                   | Name of the time period                      | Conduct       |\r\n| Activity                     | Lunch                       | Activity type                                | Conduct       |\r\n| Status                       | Unresolved                  | Current status of the conduct record         | Conduct       |\r\n| Location                     | Outside School Grounds      | Location description for the incident        | Conduct       |\r\n| RecordedBy                   | Mr A Blacker               | Staff member who recorded the incident       | Conduct       |\r\n| Outcome                      | null                        | Outcome of the incident                      | Conduct       |\r\n| RecordedOn                   | 2017-05-10                  | Date incident was recorded                   | Conduct       |\r\n| Description                  | Graffiti on a wall         | Comment on the incident record               | Conduct       |\r\n| Subject                      | null                        | Subject the incident relates to              | Conduct       |\r\n| Category                     | Beh                         | Defines record type (Ach or Beh)            | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | E2824F8EE247AAFE866E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n#### _StudentBehaviour_\r\nStudent membership of returned conduct records, including student-specific information such as Role and Points.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | PL-9919.Beh.4000            | Composite Id for the student membership      | Conduct       |\r\n| StudentId                   | 9919                        | Id of the student                            | Conduct       |\r\n| BehaviourId                 | 4000                        | Id of the behaviour record                   | Conduct       |\r\n| Points                       | 10                          | Points assigned to this specific student     | Conduct       |\r\n| Outcome                      | Discussed with Pupil        | Outcome for this student regarding the behaviour record | Conduct       |\r\n| OutcomeCode                  | DP                          | Outcome code of the behaviour record         | Conduct       |\r\n| Role                         | Participant                 | Role of this student in the behaviour record | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | E1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n#### _StaffBehaviour_\r\nStaff membership of returned conduct records, including staff-specific information such as StaffRole.\r\n\r\n| Field                        | Example                     | Notes                                         | Consent Scope |\r\n|------------------------------|-----------------------------|-----------------------------------------------|---------------|\r\n| Id                           | PWT-1.Beh.4000              | Composite Id for the staff membership        | Conduct       |\r\n| StaffId                     | 1                            | Id of the staff member                       | Conduct       |\r\n| BehaviourId                 | 4000                        | Id of the behaviour record                   | Conduct       |\r\n| StaffRole                   | null                        | Role of this staff member in the conduct     | Conduct       |\r\n| LastUpdated                  | 2016-07-28T04:04:50.112    | The last time this data was updated         | Conduct       |\r\n| RowHash                      | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                    | Conduct       |\r\n\r\n***\r\n"
      operationId: behaviourfortoday
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStudentIds
        in: query
        description: Optionally include csv of Ids for linked students
        required: false
        schema:
          type: boolean
      - name: includeStaffIds
        in: query
        description: Optionally include csv of Ids for linked staff (Not including RecordedBy)
        required: false
        schema:
          type: boolean
      - name: StudentId
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: StaffId
        in: query
        description: Optional staff id
        required: false
        schema:
          type: string
      - name: id
        in: query
        description: Optional conduct id
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdate greater than this date
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Behaviour:
                    type: array
                    description: A JSON array of Behaviour
                    items:
                      $ref: "#/components/schemas/Behaviour"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/calendar:
    get:
      tags:
      - School
      summary: school calendar
      description: "## Endpoint Description\r\n\r\nThe **school.calendar** endpoint returns an event diary/calendar for a school.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name  | Filter Description                             |\r\n|-----------|--------------|------------------------------------------------|\r\n| Optional  | DateFrom     | School events starting from this date          |\r\n| Optional  | DateTo       | School events ending on this date              |\r\n| Optional  | EventType    | Filter to a specific type of school event      |\r\n\r\n***\r\n\r\n### Types\r\n\r\nDefinitions of the types applicable to events:\r\n\r\n**EventType**\r\n \r\n- **SchoolEvent:** Assembly, Staff Meeting, etc.\r\n- **Holiday:** School holidays\r\n- **StaffTraining:** Staff training days\r\n- **PublicHoliday:** Bank holidays\r\n- **HalfTerm:** Half term definitions\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field               | Example        | Notes                                       | Consent Scope |\r\n|---------------------|----------------|---------------------------------------------|---------------|\r\n| Id                  | 31425          | The MIS Id of the diary event               | School        |\r\n| StartDate           | 2017-04-20     | Start date of the event                     | School        |\r\n| StartTime           | 15:30          | Start time of the event                     | School        |\r\n| EndDate             | 2017-04-20     | End date of the event                       | School        |\r\n| EndTime             | 16:30          | End time of the event                       | School        |\r\n| Category            | Extra Curricular| Event category                             | School        |\r\n| Description         | School Choir    | Event description - typically set to category where null | School        |\r\n| Type                | School Event   | Event type                                  | School        |\r\n\r\n***\r\n"
      operationId: calendar
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Date from
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: DateTo
        in: query
        description: Date to
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: EventType
        in: query
        description: Event type
        required: false
        schema:
          type: string
          enum:
          - SchoolEvent
          - Holiday
          - StaffTraining
          - PublicHoliday
          - HalfTerm
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of SchoolCalendar
          content:
            application/json:
              schema:
                type: object
                properties:
                  SchoolCalendar:
                    type: array
                    description: A JSON array of SchoolCalendar
                    items:
                      $ref: "#/components/schemas/SchoolCalendar"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/conductlookups:
    get:
      tags:
      - Students
      summary: Conduct Lookups
      description: "## Endpoint Description\r\n\r\nCollection of lookup IDs for use with the POST.ConductAch and POST.ConductBeh writeback endpoints for creating conduct events in the MIS.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name    | Filter Description                                        |\r\n|-----------|----------------|----------------------------------------------------------|\r\n| Optional  | conductType    | Pass Ach or Beh to collect lookups for Achievement or Behaviour |\r\n\r\n***\r\n\r\n### Types\r\n\r\nDefinitions of the conduct types:\r\n\r\n**conductType**\r\n\r\n- **Ach:** Filter to Achievement lookups only\r\n- **Beh:** Filter to Behaviour lookups only\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint            | Primary Key              | Foreign Key                 | Related Endpoint Description              |\r\n|---------------------|-------------------------|-----------------------------|------------------------------------------|\r\n| POST.ConductAch     | ConductTypes.LocalId    | Conducts.TypeId             | Defines the event type                   |\r\n| POST.ConductBeh     | ConductTypes.LocalId    | Conducts.TypeId             | Defines the event type                   |\r\n\r\n***\r\n\r\n### Lookup Mapping\r\n\r\n| LookupType        | Ach / Beh | Lookup Id                    | Writeback Parameter                |\r\n|-------------------|-----------|------------------------------|------------------------------------|\r\n| AchActivity       | Ach       | ConductLookups.LocalId       | Conducts.ActivityId               |\r\n| BehActivity       | Beh       | ConductLookups.LocalId       | Conducts.ActivityId               |\r\n| BehBullMode       | Beh       | ConductLookups.LocalId       | Conducts.BullTypeId               |\r\n| BehLocation       | Beh       | ConductLookups.LocalId       | Conducts.LocationId               |\r\n| BehStatus         | Beh       | ConductLookups.LocalId       | Conducts.StatusId                 |\r\n| BehStuRole        | Beh       | ConductLookups.LocalId       | Participants.RoleId                |\r\n| StfRole           | Ach       | ConductLookups.LocalId       | Staff.StaffRoleId                 |\r\n| StfRole           | Beh       | ConductLookups.LocalId       | Staff.StaffRoleId                 |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _ConductTypes_\r\n\r\nDefinitions of the available conduct types for behaviour and achievement for use with the conduct writeback endpoints.\r\n\r\n| Field                     | Example                   | Notes                                             | Consent Scope |\r\n|---------------------------|---------------------------|---------------------------------------------------|---------------|\r\n| Id                        | Beh.7                     | CompositeId of lookup                             | Conduct       |\r\n| Type                      | Beh                       | Conduct type                                      | Conduct       |\r\n| LocalId                   | 7                         | Id of the lookup for use with writeback endpoints | Conduct       |\r\n| Description               | Assault                   | Description of lookup                             | Conduct       |\r\n| Points                    | 50                        | Default points for lookup from MIS                | Conduct       |\r\n| SubTypeLookup             | BehBullMode               | Pointer to Bullying subtypes in Lookups result set | Conduct       |\r\n| DisplayOrder              | 2                         | List order from MIS                               | Conduct       |\r\n| LastUpdated               | 2017-01-19T22:03:31.617  | The last time this data was updated               | Conduct       |\r\n| RowHash                   | 87D6ECDB0183B9F77F3AE3F9EB744E345817CA0F | For change comparison                          | Conduct       |\r\n\r\n#### _ConductLookups_\r\n\r\nDefinitions of the various lookups for behaviour and achievement for use with the conduct writeback endpoints.\r\n\r\n| Field                     | Example                   | Notes                                             | Consent Scope |\r\n|---------------------------|---------------------------|---------------------------------------------------|---------------|\r\n| Id                        | BehStuRole.1              | CompositeId of lookup                             | Conduct       |\r\n| LookupType                | BehStuRole                | Lookup type                                       | Conduct       |\r\n| LocalId                   | 1                         | Id of the lookup for use with writeback endpoints | Conduct       |\r\n| Code                      | PT                        | Short code from MIS for lookup                    | Conduct       |\r\n| Description               | Participant               | Description of lookup                             | Conduct       |\r\n| DisplayOrder              | 1                         | List order from MIS                               | Conduct       |\r\n| LastUpdated               | 2017-01-19T22:03:31.617  | The last time this data was updated               | Conduct       |\r\n| RowHash                   | 87D6ECDB0183B9F77F3AE3F9EB744E345817CA0F | For change comparison                          | Conduct       |\r\n\r\n***\r\n"
      operationId: conductlookups
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeInactive
        in: query
        description: option to include inactive lookups
        required: false
        schema:
          type: boolean
      - name: conductType
        in: query
        description: Conduct type
        required: false
        schema:
          type: string
          enum:
          - Ach
          - Beh
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of conductType
          content:
            application/json:
              schema:
                type: object
                properties:
                  ConductTypes:
                    type: array
                    description: A JSON array of ConductTypes
                    items:
                      $ref: "#/components/schemas/ConductTypes"
                  ConductLookups:
                    type: array
                    description: A JSON array of ConductLookups
                    items:
                      $ref: "#/components/schemas/ConductLookups"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/ConductPoints:
    get:
      tags:
      - Students
      summary: Conduct Points
      description: "## Endpoint Description\r\n\r\nFetch the currently accumulated positive and negative conduct points for students. Counts of detentions, interventions, and report cards are also provided where available.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name     | Filter Description                         |\r\n|-----------|-----------------|-------------------------------------------|\r\n| Optional  | id              | Query for a specific student's aggregated conduct points |\r\n| Optional  | updatedSince    | Query for records updated since this date |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint             | Primary Key         | Foreign Key         | Related Endpoint Description   |\r\n|----------------------|---------------------|---------------------|--------------------------------|\r\n| School.Students       | ConductPoints.Id    | Students.Id         | Student record information     |\r\n\r\n***\r\n\r\n### ConductPoints Fields\r\n\r\n| Field                       | Example      | Notes                                         | Consent Scope |\r\n|-----------------------------|--------------|-----------------------------------------------|---------------|\r\n| Id                          | 9919         | ID of the student record                      | Conduct       |\r\n| TotalAchievementPoints      | 1232         | Total achievement points this academic year   | Conduct       |\r\n| TotalAchievementIncidents    | 65           | Total achievement incidents this academic year| Conduct       |\r\n| TotalBehaviourPoints        | 567          | Total behaviour points this academic year     | Conduct       |\r\n| TotalBehaviourIncidents      | 23           | Total behaviour incidents this academic year  | Conduct       |\r\n| TotalConductPoints          | 665          | Overall conduct points this academic year (Ach - Beh) | Conduct |\r\n| TotalConductIncidents       | 77           | Total conduct incidents this academic year (Ach Incidents + Beh Incidents) | Conduct |\r\n| NumberOfDetentions          | 1            | Total detentions this academic year           | Conduct       |\r\n| NumberOfInterventions       | 0            | Total interventions this academic year        | Conduct       |\r\n| NumberOfReportCards        | 2            | Total report cards this academic year         | Conduct       |\r\n| LastUpdated                 | 2016-07-21T12:17:16.74 | The last time this data was updated         | Conduct       |\r\n| RowHash                     | 05BA1E3777DC654DCAA81F1083EFF939CCEBFE06 | For change comparison                    | Conduct       |\r\n\r\n***\r\n\r\n### WeeklyStats Fields\r\n\r\n| Field                       | Example      | Notes                                         | Consent Scope |\r\n|-----------------------------|--------------|-----------------------------------------------|---------------|\r\n| Id                          | 9919         | ID of the student record                      | Conduct       |\r\n| WeeklyAchievementEvents      | 3            | The number of achievements from the start of the week until today | Conduct |\r\n| WeeklyAchievementPoints      | 50           | The number of achievement points from the start of the week until today | Conduct |\r\n| WeeklyBehaviourIncidents     | 2            | The number of behaviour incidents from the start of the week until today | Conduct |\r\n| WeeklyBehaviourPoints        | 15           | The number of behaviour points from the start of the week until today  | Conduct |\r\n| WeeklyDetentionsTotal        | 1            | The number of detentions for this entire week | Conduct     |\r\n| WeeklyDetentionsFuture       | 1            | The number of detentions from today until the end of the week | Conduct  |\r\n| WeekInterventions            | 2            | The number of interventions from the start of the week until today | Conduct |\r\n| LastUpdated                  | 2016-07-21T12:17:16.74 | The last time this data was updated         | Conduct       |\r\n| RowHash                      | 05BA1E3777DC654DCAA81F1083EFF939CCEBFE06 | For change comparison                    | Conduct       |\r\n\r\n***\r\n\r\n### TermlyStats Fields\r\n\r\n| Field                       | Example      | Notes                                         | Consent Scope |\r\n|-----------------------------|--------------|-----------------------------------------------|---------------|\r\n| Id                          | 9919         | ID of the student record                      | Conduct       |\r\n| TermAchievementEvents       | 15           | The number of achievement events for terms in this academic year | Conduct |\r\n| TermAchievementPoints       | 200          | The number of achievement points for terms in this academic year | Conduct |\r\n| TermBehaviourIncidents      | 5            | The number of behaviour incidents for terms in this academic year | Conduct |\r\n| TermBehaviourPoints         | 150          | The number of behaviour points for terms in this academic year | Conduct |\r\n| TermDetentions              | 7            | The number of detentions for terms in this academic year | Conduct |\r\n| TermInterventions           | 2            | The number of interventions for terms in this academic year | Conduct |\r\n| LastUpdated                 | 2016-07-21T12:17:16.74 | The last time this data was updated         | Conduct       |\r\n| RowHash                     | 05BA1E3777DC654DCAA81F1083EFF939CCEBFE06 | For change comparison                    | Conduct       |\r\n\r\n***\r\n"
      operationId: ConductPoints
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeWeeklyStats
        in: query
        description: Optionally include stats for the current week
        required: false
        schema:
          type: boolean
      - name: includeTermlyStats
        in: query
        description: Optionally include stats by term
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: SchoolYear
        in: query
        description: Optional school year
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ConductPoints
          content:
            application/json:
              schema:
                type: object
                properties:
                  ConductTypes:
                    type: array
                    description: A JSON array of ConductPoints
                    items:
                      $ref: "#/components/schemas/ConductPoints"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Students:
    get:
      tags:
      - Students
      summary: Fetch a list of students
      description: "## Endpoint Description\r\n\r\nThe **school.students** endpoint provides access to common core and extended student details. The endpoint returns records for those students currently on roll at the school from whom you are requesting data.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includePhotos**: Set to enable the staff photo column in the result set.\r\n- **includeAttStats**: Set to include aggregated session attendance stats.\r\n- **includeAttMarkString**: Set to include packed attendance mark string with start and end dates.\r\n- **includeGroupIds**: Set to include CSV of GroupIds the student belongs to.\r\n- **includeGroupIdaasIds**: Set to include CSV of Idaas GroupIds the student belongs to.\r\n- **includeSiblingsList**: Set to include StudentSiblingIds column in the Students result set.\r\n- **includeSiblingsResultset**: Set to include data in additional Siblings Resultset.\r\n- **includeLeavers**: Set to include Leavers result set. Leavers included from current and previous academic year.\r\n- **includePreAdmissions**: Set to include PreAdmissions result set. Students with a future start date and pre-admissions with Accepted status included.\r\n- **includeSubsidiary**: Include students with Subsidiary Enrolment.\r\n- **includeGuests**: Include students with enrolment status \"G\".\r\n- **includeComms**: Include student home email, home telephone, mobile telephone.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters to refine the dataset returned by this endpoint:\r\n\r\n- **id**: Optional filter to return a single student using their ID property.\r\n- **yearGroupId**: Optional filter to return students from a specific Year Group.\r\n- **studentStatus**: Optional filter to return students from a specific roll status (OnRoll, PreAdmission, Leaver).\r\n- **updatedSince**: Optional filter to return records that have been updated since this value.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                        | Primary Key                     | Foreign Key                       | Related Endpoint Description       |\r\n|---------------------------------|----------------------------------|-----------------------------------|------------------------------------|\r\n| school.studentcontacts           | students.Id                      | studentcontacts.StudentId         | Link to the relationship between a student and their contact. Links against **school.contacts** |\r\n| school.personcomms              | students.Id                      | personcomms.PersonId             | Link to contact methods including telephone, mobile and email |\r\n| school.photos                    | students.Id                      | photos.PersonId                  | Link to photos endpoint. Collect photos directly in the students endpoint with the **includePhotos** option |\r\n| school.groups                    | students.Id                      | studentmembers.StudentId          | Link to the active group memberships that can be linked back to the **group** object |\r\n| school.timetableforstudent       | student.Id                       | N/A                               | Obtain the timetable for a specific student using student.Id |\r\n| school.conductfortoday           | student.Id                       | studentconducts.StudentId        | Link to the conduct participants subtable |\r\n| school.conductfordaterange       | student.Id                       | studentconducts.StudentId        | Link to the conduct participants subtable |\r\n| school.attendancefordate         | student.Id                       | attendance.StudentId              | Link to session and lesson attendance marks for a specific date |\r\n| school.attendancefordaterange     | student.Id                       | attendance.StudentId              | Link to session attendance marks for a given date range |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                          | Example                        | Notes                                                | Consent Scope                  |\r\n|--------------------------------|--------------------------------|------------------------------------------------------|---------------------------------|\r\n| Id                             | 9919                           | The MIS Id of the student                            | Student / StudentLite          |\r\n| ExternalId                     | a925c7eb-86bc-40d7-91fd-f3fcbf6a2f2b | The MIS External Id of the student              | Student / StudentLite          |\r\n| IdaasId                        | PL-9919                       | The Idaas Id of the student                          | Student / StudentLite          |\r\n| Forename                       | Graham                        | Student preferred forename                           | Student / StudentLite          |\r\n| Surname                        | Abbess                        | Student preferred surname                            | Student / StudentLite          |\r\n| DisplayName                    | Graham Abbess                 | Student full name                                   | Student / StudentLite          |\r\n| Gender                         | M                              | Student gender                                      | Student / StudentLite          |\r\n| RegGroupId                     | 393                            | The MIS Id of the student's reg group                | Student / StudentLite          |\r\n| RegGroup                       | 8B                             | The student's reg group name                         | Student / StudentLite          |\r\n| YearGroupId                    | 36                             | The MIS Id of the student's year group               | Student / StudentLite          |\r\n| YearGroup                      | Year 8                        | The student's year group name                        | Student / StudentLite          |\r\n| StandardYearGroupCode          | 8                              | The student's year group code                        | Student / StudentLite          |\r\n| StandardYearGroupName          | Year 8                        | The student's year group name                        | Student / StudentLite          |\r\n| HouseGroupId                   | 40                             | The MIS Id of the student's house group              | Student / StudentLite          |\r\n| HouseGroup                     | Boyle                          | The student's house group name                        | Student / StudentLite          |\r\n| WorkEmail                      | test@work.net                 | Email address set as Work Email from MIS             | Student / StudentLite          |\r\n| IdaasEmail                     | test@work.net                 | Email address provisioned by Idaas, if available     | Student / StudentLite          |\r\n| HomeEmail                      | test@home.net                 | The student's home email address                      | StudentExtended                |\r\n| HomePhone                      | 1234 5560123                   | The student's home telephone number                   | StudentExtended                |\r\n| MobilePhone                    | 1234 5560123                   | The student's mobile telephone number                 | StudentExtended                |\r\n| AdmissionNo                    | 004367                        | The student admission number                          | Student                        |\r\n| DateOfBirth                    | 2001-12-10                    | The student's date of birth                           | StudentExtended                |\r\n| UniqueLearnerNumber            | 1111175267                    | The student's ULN                                   | StudentExtended                |\r\n| LegalForename                  | Graham                        | The student's legal forename                          | StudentExtended                |\r\n| LegalSurname                   | Abbess                        | The student's legal surname                           | StudentExtended                |\r\n| PreviousLegalSurname           | Smith                         | The student's previous legal surname                   | StudentExtended                |\r\n| EntryDate                      | 2014-09-03                    | The enrolment date of the student                    | StudentExtended                |\r\n| LeavingDate                    | 2016-06-14                    | The leaving date of the student                      | StudentExtended                |\r\n| Destination                     | External FE Provider          | The destination for the student                       | StudentExtended                |\r\n| DestinationStartDate           | 2016-06-14                    | The expected start date at the destination            | StudentExtended                |\r\n| ReasonForLeaving               | End of phase transfer - FE/6th form college | The reason for leaving                      | StudentExtended                |\r\n| MiddleName                     | David                         | The student's middle name                             | StudentExtended                |\r\n| EnrolmentStatus                | C                              | The student's current enrolment status code          | Student / StudentLite          |\r\n| Boarder                        | 1                              | Whether the student is a boarder, boolean            | StudentExtended                |\r\n| BoardingHouse                  | Boarding House A              | The student's boarding house                          | StudentExtended                |\r\n| SENProvision                   | E                              | The student's current SEN Provision                   | SEN / SENTypes                |\r\n| EAL                            | 0                              | Flag defining if student has EAL                      | StudentDemographic / StudentFunding |\r\n| ReligionCode                   | CH                             | Religion short code                                   | StudentDemographic             |\r\n| Religion                       | Christian                     | Religion description                                  | StudentDemographic             |\r\n| EthnicityCode                  | WENG                           | Ethnicity short code                                  | StudentEthnicity              |\r\n| Ethnicity                      | White - English               | Ethnicity description                                 | StudentEthnicity              |\r\n| EthnicitySource                | P                              | Ethnicity source code                                 | StudentEthnicity              |\r\n| HomeLanguage                   | English                       | Home language description                              | StudentDemographic             |\r\n| HomeLanguageCode               | ENG                           | Home language code                                    | StudentDemographic             |\r\n| FirstLanguage                  | English                       | First language description                             | StudentDemographic             |\r\n| FirstLanguageCode              | ENG                           | First language code                                   | StudentDemographic             |\r\n| FirstLanguageSource            | P                              | First language source code                            | StudentDemographic             |\r\n| EnglishProficiencyLevel        | New To English                | The English proficiency level of the student         | StudentDemographic             |\r\n| EnglishProficiencyLevelCode    | A                              | The English proficiency level code of the student    | StudentDemographic             |\r\n| NationalIdentity                | English                       | Nationality identity                                  | StudentDemographic             |\r\n| Nationality                    | GBR                           | Nationality                                           | StudentDemographic             |\r\n| CountryOfBirth                 | France                        | The country the student was born in                  | StudentDemographic / StudentEthnicity |\r\n| CountryOfBirthCode             | FR                             | The code of the country the student was born in      | StudentDemographic / StudentEthnicity |\r\n| AsylumStatus                   | Asylum Seeker                | Asylum status                                        | StudentDemographic             |\r\n| OnReport                       | 1                              | Student has behaviour report card                    | StudentExtended                |\r\n| PostCode                       | MK10 0BA                      | The student's home post code                          | StudentDemographic             |\r\n| ModeOfTravel                   | Car                           | Student's mode of travel to school                   | StudentDemographic             |\r\n| StdModeOfTravel                | WLK                           | Student's mode of travel to school standardized to a 3 digit code | StudentDemographic             |\r\n| IsTraveller                     | 0                             | Student is marked as being a traveller                | StudentDemographic             |\r\n| TravellerSource                | Student                       | Source of traveller status                            | StudentDemographic             |\r\n| TravellerType                  | [TBA]                        | Type of traveller                                     | StudentDemographic             |\r\n| FsmEligible                    | 1                              | Flag defining if student is eligible for free school meals. This field can be null indicating we don't know if true or false | StudentFunding             |\r\n| FsmStartDate                   | 2017-02-01                    | Start date for the current FSM entitlement            | StudentFunding                 |\r\n| FsmEndDate                     | 2017-05-01                    | End date for the current FSM entitlement              | StudentFunding                 |\r\n| UniformAllowance                | 0                              | Flag defining if student is eligible for uniform allowance | StudentFunding              |\r\n| PupilPremium                   | 1                              | Flag defining if student is eligible for pupil premium | StudentFunding               |\r\n| YSSA                          | Obtained                      | Youth service support association status              | StudentFunding                 |\r\n| EAL                            | 0                              | Flag defining if student has EAL                      | StudentFunding                 |\r\n| FSMEver6                      | 1                              | Student has been eligible in last 6 years for FSM    | StudentFunding                 |\r\n| Gifted                        | 0                              | Student is marked as gifted and talented              | StudentFunding                 |\r\n| Disabled                       | 0                              | Student is flagged as disabled                         | StudentMedical                |\r\n| InLeaCare                     | 1                              | Student marked as in LEA care (sensitive)            | StudentFamily                  |\r\n| LeaCareAuthority               | 881                           | Local Authority code for responsible LEA (sensitive) | StudentFamily                  |\r\n| EverInCare                    | 1                              | Whether the student has ever been in care, boolean    | StudentFamily                  |\r\n| ServiceChild                   | 0                              | Student is marked as a service child (sensitive)      | StudentFamily                  |\r\n| ServiceChildSource             | Student                       | Source of the service child status                     | StudentFamily                  |\r\n| IsYoungCarer                  | 0                              | Student marked as young carer (sensitive)             | StudentFamily                  |\r\n| UPN                           | A01937632542                  | Student's Unique Pupil Number. In Ireland, this field will be populated with the PPS number. | UPN           |\r\n| FormerUPN                     | D439209583385                 | Student's former unique pupil number if available      | UPN                           |\r\n| CandidateNo                   | 56373574                      | Student's unique candidate number                      | Student / StudentExtended      |\r\n| ParentalSalutation            | Mrs Hilda Abbess              | Parental mailing title                                 | Address                        |\r\n| AddressBlock                  | 22 Winch Road\\nKingston\\nDerby\\nD12 0BA\\nUK | The student's full address                 | Address                        |\r\n| HouseNo                       | 22                             | The number of the addressed building                   | Address                        |\r\n| HouseName                     | Ridge View                    | The name of the addressed building                     | Address                        |\r\n| Apartment                    | null                          | The number of the sub dwelling of the addressed building | Address                      |\r\n| Street                        | Winch Road                    | The name of the street                                 | Address                        |\r\n| District                       | Kingston                       | The name of the local district or area                 | Address                        |\r\n| TownOrCity                    | Derby                         | The name of the major town or city                     | Address                        |\r\n| County                         | Bedfordshire                  | The name of the county                                  | Address                        |\r\n| PostCode                      | D12 0BA                       | The post code of the address                           | Address                        |\r\n| Country                       | United Kingdom                | The residing country for the address                   | Address                        |\r\n| StudentStatus                 | OnRoll                        | The current student status                             | Student                       |\r\n| PartTime                      | 1                              | Whether the student is part-time                       | StudentFunding                 |\r\n| AttStatsStartDate             | 2016-09-01                    | The date from which stats are generated                | Attendance                     |\r\n| AttStatsEndDate               | 2017-01-19                    | The date until stats are generated                     | Attendance                     |\r\n| NumPossMarks                  | 202                            | Number of possible attendable sessions                | Attendance                     |\r\n| NumPresMarks                  | 42                             | Number of sessions where the student was present       | Attendance                     |\r\n| NumAEAMarks                   | 0                              | Number of approved educational absences                 | Attendance                     |\r\n| NumAuthAbsMarks               | 3                              | Number of authorized absences                          | Attendance                     |\r\n| NumUnauthAbsMarks             | 0                              | Number of unauthorised absences                       | Attendance                     |\r\n| NumMissMarks                  | 57                             | Number of marks not completed in the MIS              | Attendance                     |\r\n| NumLateMarks                  | 0                              | Number of marks for lateness                           | Attendance                     |\r\n| NumLateBeforeRegMarks         | 1                              | Number of marks for late where registration still active | Attendance                     |\r\n| AttMarksStartDate             | 2017-09-01                    | Start date of the mark string                          | Attendance                     |\r\n| AttMarksEndDate               | 2018-04-04                    | End date of the mark string                            | Attendance                     |\r\n| Marks                          | /\\\\/\\\\/\\\\####/\\\\/\\\\/\\\\/\\\\/\\\\#### | Packed mark string, two session marks per day, starting from AttMarksStartDate. PM mark is escaped \\ for JSON compatibility | Attendance             |\r\n| YearTaughtIn                  | 10                             | Year group the student is taught in                    | Student                       |\r\n| NCYear                         | 10                             | The national curriculum year group of the student     | Student                       |\r\n| KeyStage                       | Key Stage 4                   | The key stage of the student                          | Student                       |\r\n| QuickNote                      | Student often badly behaved on a Monday | Free text field providing contextual information   | StudentFreeText               |\r\n| GroupIds                       | 9576,9543,9555,9521           | CSV of groupIds the student belongs to                 | School                        |\r\n| GroupIdaasIds                  | GC-9576,GC-9543,GC-9555,GC-9521 | CSV of Idaas GroupIds the student belongs to         | School                        |\r\n| StudentSiblingIds              | 8440,9465                     | CSV list of siblings enabled by option **includeSiblingsList** | Student / StudentLite      |\r\n| LeavingYearGroup               | 34                             | Id of the year group at time of leaving               | Student                       |\r\n| LeavingRegGroup                | 52                             | Id of the reg group at time of leaving                 | Student                       |\r\n| PreAdmissionYearGroup          | 33                             | Id of the expected year group                          | Student                       |\r\n| PreAdmissionRegGroup           | 89                             | Id of the expected reg group                           | Student                       |\r\n| LastUpdated                    | 2016-07-22T13:51:54.799       | The last time this data was updated                    | Student / StudentLite          |\r\n| RowHash                        | 7B5614EBF6AA72362817797CA4CDBC841A7B2156 | For change comparison                | Student / StudentLite          |\r\n\r\n***\r\n"
      operationId: Students
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter where last updated greater than date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: yearGroupId
        in: query
        description: Filter by specific year group ID obtained from groups endpoint
        required: false
        schema:
          type: boolean
      - name: studentStatus
        in: query
        description: Filter by student status
        required: false
        schema:
          type: string
          enum:
          - Onroll
          - Leaver
          - Preadmission
      - name: includePhotos
        in: query
        description: enable the student photo column in the result set
        required: false
        schema:
          type: boolean
      - name: includeGroupIds
        in: query
        description: Set to include GroupIds column
        required: false
        schema:
          type: boolean
      - name: includeGroupIdaasIds
        in: query
        description: include GroupIdaasIds column
        required: false
        schema:
          type: boolean
      - name: includeParentIdaasIds
        in: query
        description: Set to include ParentIdaasIds column
        required: false
        schema:
          type: boolean
      - name: includeParentXIDs
        in: query
        description: include ParentXIDs column
        required: false
        schema:
          type: boolean
      - name: includeAttStats
        in: query
        description: include includeAttStats column
        required: false
        schema:
          type: boolean
      - name: includeAttMarkString
        in: query
        description: include includeAttMarkString column
        required: false
        schema:
          type: boolean
      - name: includeSiblingsList
        in: query
        description: include includeSiblingsList column
        required: false
        schema:
          type: boolean
      - name: includeSiblingsResultset
        in: query
        description: include includeSiblingsResultset column
        required: false
        schema:
          type: boolean
      - name: includeLeavers
        in: query
        description: include Leavers in Students result set
        required: false
        schema:
          type: boolean
      - name: includePreAdmissions
        in: query
        description: include includePreAdmissions in Students result set
        required: false
        schema:
          type: boolean
      - name: includeGuests
        in: query
        description: include guest students
        required: false
        schema:
          type: boolean
      - name: includeSubsidiary
        in: query
        description: include students with Subsidiary Enrolment
        required: false
        schema:
          type: boolean
      - name: includeComms
        in: query
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Students:
                    type: array
                    description: A JSON array of students
                    items:
                      $ref: "#/components/schemas/Students"
                  StudentSiblings:
                    type: array
                    description: A JSON array of student siblings
                    items:
                      $ref: "#/components/schemas/StudentSiblings"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Contacts:
    get:
      tags:
      - Contacts
      summary: Fetch a list of Contacts
      description: "## Endpoint Description\r\n\r\nReturns contact details for the students that are currently on roll.\r\n\r\n***\r\n\r\n### Options\r\n\r\nAvailable option parameters for this endpoint:\r\n\r\n- **includePreAdmissions** - Include contacts relating to PreAdmission students.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name | Filter Description                         |\r\n|-----------|-------------|-------------------------------------------|\r\n| Optional  | id          | Make a request for a specific contact Id  |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                    | Primary Key         | Foreign Key                  | Related Endpoint Description                           |\r\n|-----------------------------|---------------------|------------------------------|-------------------------------------------------------|\r\n| school.studentcontacts       | Contacts.Id         | StudentContact.ContactId     | Defines the relationship between a student and contact |\r\n| school.personcomms          | Contacts.Id         | PersonComms.PersonId        | Additional contact methods for the person             |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                        | Example                                           | Notes                                       | Consent Scope |\r\n|------------------------------|---------------------------------------------------|---------------------------------------------|---------------|\r\n| Id                           | 9920                                              | The MIS Id of the contact                   | Contact       |\r\n| IdaasId                      | PC-9920                                          | The Idaas Id of the contact                 | Contact       |\r\n| ExternalId                   | a7475dba-d702-4a98-966b-dab44fe2cca9           | The MIS External Id of the contact          | Contact       |\r\n| Title                        | Mrs                                              | Title of the contact                        | Contact       |\r\n| Suffix                       | B.S.C.                                          | Suffix of the contact                       | Contact       |\r\n| Surname                      | Abbess                                            | Surname of the contact                      | Contact       |\r\n| Forename                     | Hilda                                            | Forename of the contact                     | Contact       |\r\n| DisplayName                  | Mrs Hilda Abbess                                 | Full name of the contact                    | Contact       |\r\n| HomeLanguage                 | French                                           | Home language of the contact                | Contact       |\r\n| HomeLanguageCode             | FRA                                             | Home language code of the contact           | Contact       |\r\n| TranslatorRequired            | 1                                               | Whether the contact requires a translator, boolean | Contact |\r\n| WorkEmail                    | habbess@parentwork.net                          | Main work email of the contact              | Contact       |\r\n| WorkPhone                    | 01245855555                                     | Main work phone of the contact              | Contact       |\r\n| HomeEmail                    | habbess@parenthome.com                          | Main home email of the contact              | Contact       |\r\n| HomePhone                    | 01688779985                                     | Main home phone of the contact              | Contact       |\r\n| MobilePhone                  | 07799988773                                     | Main mobile phone of the contact            | Contact       |\r\n| AddressBlock                 | 22 Winch Road\\nKingston\\nDerby\\nD12 5BA\\nUK   | Address block data for the contact          | Contact       |\r\n| HouseNo                      | 22                                               | The number of the addressed building         | Contact       |\r\n| HouseName                    | null                                             | The name of the addressed building           | Contact       |\r\n| Apartment                    | null                                             | The number of the sub dwelling of the addressed building | Contact |\r\n| Street                       | Winch Road                                      | The name of the street                      | Contact       |\r\n| District                     | Kingston                                         | The name of the local district or area      | Contact       |\r\n| TownOrCity                  | Derby                                            | The name of the major town or city          | Contact       |\r\n| County                       | Derby                                            | The name of the county                       | Contact       |\r\n| PostCode                     | D12 5BA                                         | The post code of the address                 | Contact       |\r\n| Country                      | UK                                               | The residing country for the address         | Contact       |\r\n| LastUpdated                  | 2016-06-30T16:06:40.658                        | The last time this data was updated         | Contact       |\r\n| RowHash                      | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54       | For change comparison                        | Contact       |\r\n\r\n***\r\n"
      operationId: Contacts
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter where last updated greater than date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: includeChildIdaasIds
        in: query
        description: enable the ChildIdaasIds column where the contact has parental responsibility
        required: false
        schema:
          type: boolean
      - name: includeChildXIDs
        in: query
        description: enable the ChildXIDs column where the contact has parental responsibility
        required: false
        schema:
          type: boolean
      - name: includePreAdmissions
        in: query
        description: include records where the student is PreAdmission
        required: false
        schema:
          type: boolean
      - name: includeRestrictedRelationships
        in: query
        description: include contacts with a court order restriction
        required: false
        schema:
          type: boolean
      - name: onlyParentalResponsibility
        in: query
        description: Only include contacts with parental responsiblity for at least one student
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of contact data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Contacts:
                    type: array
                    description: A JSON array of Contacts
                    items:
                      $ref: "#/components/schemas/Contacts"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/contactuserdefinedfields:
    get:
      tags:
      - Contacts
      summary: Fetch a list of contactuserdefinedfields
      description: "## Endpoint Description\r\n\r\nRetrieve User Defined Field values for Contacts. Use the UserDefinedFields endpoint to get a list of fields for use with this endpoint.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?   | Filter Name | Filter Description                              |\r\n|-------------|-------------|------------------------------------------------|\r\n| **Mandatory** | UDFName    | CSV of UDF Names to retrieve                   |\r\n| Optional     | ContactId   | Filter to a specific contact's UDF values     |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                     | Foreign Key                | Related Endpoint Description   |\r\n|--------------------------------|---------------------------------|---------------------------|--------------------------------|\r\n| school.userdefinedfields        | ContactUDFs.UDFName            | UDFs.UDFName              | UDF Names                      |\r\n| school.Contacts                 | ContactUDFs.ContactId           | Contacts.Id               | Main contact record            |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                        | Example                       | Notes                             | Consent Scope |\r\n|------------------------------|-------------------------------|-----------------------------------|---------------|\r\n| Id                           | 11242                         | Id of UDF / Contact link          | ContactFreeText |\r\n| ContactId                   | 9919                          | Contact Id                        | ContactFreeText |\r\n| UDFName                     | Locker Number                 | Name of UDF                      | ContactFreeText |\r\n| UDFValue                    | 120                           | Value of the UDF                 | ContactFreeText |\r\n\r\n***\r\n"
      operationId: contactuserdefinedfields
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: optional contact id
        required: false
        schema:
          type: string
      - name: UDFName
        in: query
        description: CSV of UDF values to return
        required: false
        schema:
          type: string
          format: csv
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of contact data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Contacts:
                    type: array
                    description: A JSON array of contactuserdefinedfields
                    items:
                      $ref: "#/components/schemas/contactuserdefinedfields"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentSchoolHistory:
    get:
      tags:
      - Students
      summary: Students School History
      description: "## Endpoint Description\r\n\r\nThe **school.studenthistory** endpoint returns a row for each previous school that the student has attended.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeLeavers**: Set to allow school history for leavers.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **Id**: Option to filter on Student ID.\r\n- **LeavingDateFrom**: Option to filter on LeavingDate.\r\n- **LeavingDateTo**: Option to filter on LeavingDate.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                  | Example                         | Notes                                               | Consent Scope                  |\r\n|------------------------|---------------------------------|-----------------------------------------------------|---------------------------------|\r\n| Id                     | 2318                            | The Id of the school history record                  | Student                         |\r\n| StudentId              | 9919                            | The MIS Id of the excluded student                   | Student                         |\r\n| Forename               | Graham                          | Student forename                                    | Student                         |\r\n| Surname                | Abbess                          | Student surname                                     | Student                         |\r\n| PreviousSchoolName     | Green Abbey School              | Name of the previous school                          | Student                         |\r\n| LEA                    | 123                             | School local authority code                          | Student                         |\r\n| EstabId                | 3285502                         | The DfE establishment code for the school           | Student                         |\r\n| LeavingDate            | 2013-12-20                     | Date the student left previous school               | Student                         |\r\n| LeavingReason          | End of phase transfer - Maintained school | Reason for leaving previous school           | Student                         |\r\n| LastUpdated            | 2017-04-19T14:57:04.144        | The last time this data was updated                 | Student                         |\r\n| RowHash                | 9688A8DE75870A9EC0937BD2FADB15A39A31A52E | For change comparison                     | Student                         |\r\n\r\n***\r\n"
      operationId: StudentSchoolHistory
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: LeavingDateFrom
        in: query
        description: Leaving date from
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: LeavingDateTo
        in: query
        description: Leaving date to
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: includeLeavers
        in: query
        description: include Leavers in result set
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student school history data
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentSchoolHistory:
                    type: array
                    description: A JSON array of StudentSchoolHistory
                    items:
                      $ref: "#/components/schemas/StudentSchoolHistory"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentsDeceased:
    get:
      tags:
      - Students
      summary: Deceased students
      description: Fetch a list of deceased students for an establishment (or optionally only one student)
      operationId: StudentsDeceased
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of deceased students data
          content:
            application/json:
              schema:
                type: object
                properties:
                  Students:
                    type: array
                    description: A JSON array of Students
                    items:
                      $ref: "#/components/schemas/Students"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/studentuserdefinedfields:
    get:
      tags:
      - Students
      summary: Student user defined fields
      description: "## Endpoint Description\r\n\r\nRetrieve a list of available User Defined Fields. Use UDFName values from this endpoint with `school.StudentUserDefinedFields` to retrieve the values for students.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?   | Filter Name | Filter Description                         |\r\n|-------------|-------------|-------------------------------------------|\r\n| **Mandatory** | UDFName    | CSV of UDF Names to retrieve              |\r\n| Optional    | StudentId   | Filter to a specific student              |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                    | Foreign Key                  | Related Endpoint Description   |\r\n|--------------------------------|-------------------------------|------------------------------|--------------------------------|\r\n| school.userdefinedfields        | StudentUDFs.UDFName          | UDFs.UDFName                | UDF Names                      |\r\n| school.Students                 | StudentUDFs.StudentId        | Students.Id                  | Main student record            |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field      | Example    | Notes                                 | Consent Scope          |\r\n|------------|------------|---------------------------------------|-------------------------|\r\n| Id         | 11242      | Id of UDF / Student link              | StudentFreeText         |\r\n| StudentId  | 9919       | Student Id                            | StudentFreeText         |\r\n| UDFName    | Locker Number | Name of UDF                      | StudentFreeText         |\r\n| UDFValue   | 120        | Value of the UDF                      | StudentFreeText         |\r\n\r\n***\r\n"
      operationId: studentuserdefinedfields
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: UDFName
        in: query
        description: CSV of UDF values to return
        required: false
        schema:
          type: string
          format: CSV
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of studentuserdefinedfields
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentUDFs:
                    type: array
                    description: A JSON array of StudentUDFs
                    items:
                      $ref: "#/components/schemas/StudentUDFs"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentMeals:
    get:
      tags:
      - Students
      summary: Student meal patterns
      description: "## Endpoint Description\r\n\r\nThe **school.studentmeals** endpoint provides access to weekly student meal patterns. The endpoint returns records for those students currently on roll at the school from whom you are requesting data.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint:\r\n\r\n- **id**: Optional filter to return a single student using their ID property.\r\n- **updatedSince**: Optional filter to return records that have been updated since this value.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                  | Example             | Notes                                                      | Consent Scope                  |\r\n|------------------------|---------------------|------------------------------------------------------------|---------------------------------|\r\n| Id                     | 9919                | The MIS Id of the student                                  | StudentExtended                 |\r\n| Forename               | Graham              | Student legal forename                                     | StudentExtended                 |\r\n| Surname                | Abbess              | Student legal surname                                      | StudentExtended                 |\r\n| SundayCode             | SM                  | Student's meal type code for Sunday                        | StudentExtended                 |\r\n| MondayCode             | SM                  | Student's meal type code for Monday                        | StudentExtended                 |\r\n| TuesdayCode            | SM                  | Student's meal type code for Tuesday                       | StudentExtended                 |\r\n| WednesdayCode          | SM                  | Student's meal type code for Wednesday                     | StudentExtended                 |\r\n| ThursdayCode           | SM                  | Student's meal type code for Thursday                      | StudentExtended                 |\r\n| FridayCode             | SM                  | Student's meal type code for Friday                        | StudentExtended                 |\r\n| SaturdayCode           | SM                  | Student's meal type code for Saturday                      | StudentExtended                 |\r\n| SundayType             | School Meal         | Student's meal type description for Sunday                 | StudentExtended                 |\r\n| MondayType             | School Meal         | Student's meal type description for Monday                 | StudentExtended                 |\r\n| TuesdayType            | School Meal         | Student's meal type description for Tuesday                | StudentExtended                 |\r\n| WednesdayType          | School Meal         | Student's meal type description for Wednesday              | StudentExtended                 |\r\n| ThursdayType           | School Meal         | Student's meal type description for Thursday               | StudentExtended                 |\r\n| FridayType             | School Meal         | Student's meal type description for Friday                 | StudentExtended                 |\r\n| SaturdayType           | School Meal         | Student's meal type description for Saturday               | StudentExtended                 |\r\n| LastUpdated            | 2016-07-22T13:51:54.799 | The last time this data was updated                    | StudentExtended                 |\r\n\r\n***\r\n"
      operationId: StudentMeals
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: Filter by LAstUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student meal patterns
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentMealPatterns:
                    type: array
                    description: A JSON array of StudentMealPatterns
                    items:
                      $ref: "#/components/schemas/StudentMealPatterns"
                  StudentMealTypes:
                    type: array
                    description: A JSON array of StudentMealTypes
                    items:
                      $ref: "#/components/schemas/StudentMealTypes"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentMedical:
    get:
      tags:
      - Students
      summary: Student medical conditions
      description: |
        ## Endpoint Description

        Access student medical conditions and a list of conditions defined in the school's MIS. **This endpoint requires explicit consent to the StudentMedical scope for compliance with GDPR for the restricted data area "Medical."**

        ***

        ### Filters

        Available query parameters to refine the dataset returned by this endpoint:

        | Required? | Filter Name | Filter Description                                            |
        |-----------|-------------|-------------------------------------------------------------|
        | Optional  | StudentId   | Request information for a specific student                  |

        ***

        ### Related Endpoints

        | Endpoint                        | Primary Key                     | Foreign Key                       | Related Endpoint Description       |
        |---------------------------------|----------------------------------|-----------------------------------|------------------------------------|
        | school.students                 | StudentConditions.StudentId      | Students.Id                      | Main student record information     |
        | school.students                 | StudentMedical.Id               | Students.Id                      | Main student record information      |

        ***

        ### Fields by Scope

        #### _ConditionLookups_

        | Field                | Example                        | Notes                                                | Consent Scope                  |
        |----------------------|--------------------------------|------------------------------------------------------|---------------------------------|
        | Id                   | 1                              | Id of the Medical Condition                           | StudentMedical                  |
        | ConditionDescription | Hayfever                       | The condition description                             | StudentMedical                  |
        | LastUpdated          | 2016-07-28T04:04:50.112       | The last time this data was updated                   | StudentMedical                  |
        | RowHash              | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        #### _StudentConditions_

        | Field                | Example                        | Notes                                                | Consent Scope                  |
        |----------------------|--------------------------------|------------------------------------------------------|---------------------------------|
        | Id                   | 1.8501                         | Composite Id for uniqueness used in changesets       | StudentMedical                  |
        | StudentId            | 8501                           | Id of the student                                     | StudentMedical                  |
        | MedicalConditionId   | 1                              | Id of the condition                                   | StudentMedical                  |
        | ConditionDescription | Hayfever                       | The condition description                             | StudentMedical                  |
        | LastUpdated          | 2016-07-28T04:04:50.112       | The last time this data was updated                   | StudentMedical                  |
        | RowHash              | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        #### _StudentMedical_

        | Field                      | Example                      | Notes                                                | Consent Scope                  |
        |----------------------------|------------------------------|------------------------------------------------------|---------------------------------|
        | Id                         | 1403                         | StudentId                                           | StudentMedical                  |
        | DietaryNeeds               | Seafood allergy              |                                                      | StudentMedical                  |
        | StudentAssessedDisabled    | 1                            | Boolean 1 or 0                                      | StudentMedical                  |
        | EmergencyConsent           | 1                            | Boolean 1 or 0                                      | StudentMedical                  |
        | PregnantPupil             | 1                            | Boolean 1 or 0                                      | StudentMedical, StudentPregnancy |
        | LastUpdated                | 2016-07-28T04:04:50.112     | The last time this data was updated                   | StudentMedical                  |
        | RowHash                    | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        #### _StudentMedicalNotes_

        | Field                      | Example                      | Notes                                                | Consent Scope                  |
        |----------------------------|------------------------------|------------------------------------------------------|---------------------------------|
        | Id                         | 1453                         | Id for the note                                      | StudentMedical                  |
        | StudentId                 | 1854                         | Id of the student the note relates to                | StudentMedical                  |
        | Note                       | Came to medical on Friday afternoon. Needed inhaler. | Note in full                          | StudentMedical                  |
        | Summary                    | Needed inhaler               | Summary of the note                                   | StudentMedical                  |
        | LastModified               | 2016-09-23                  | Date when the note was last modified. Not to be confused with LastUpdated | StudentMedical                  |
        | LastUpdated                | 2016-07-28T04:04:50.112     | The last time this data was updated                   | StudentMedical                  |
        | RowHash                    | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        #### _StudentMedicalEvents_

        | Field                      | Example                      | Notes                                                | Consent Scope                  |
        |----------------------------|------------------------------|------------------------------------------------------|---------------------------------|
        | Id                         | 1453                         | Id for the medical event                             | StudentMedical                  |
        | StudentMis_Id             | 1854                         | Id of the student the event relates to               | StudentMedical                  |
        | EventType                 | Medical Inspection           | Type of medical event                                 | StudentMedical                  |
        | EventDescription          | Medical Inspection           | Description of the medical event                      | StudentMedical                  |
        | EventDate                 | 2023-01-04                  | Date of the medical event                            | StudentMedical                  |
        | FollowUpDate              | 2023-01-10                  | Follow up date for the medical event                  | StudentMedical                  |
        | LastUpdated                | 2016-07-28T04:04:50.112     | The last time this data was updated                   | StudentMedical                  |
        | RowHash                    | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        #### _StudentMedicalEventNotes_

        | Field                      | Example                      | Notes                                                | Consent Scope                  |
        |----------------------------|------------------------------|------------------------------------------------------|---------------------------------|
        | Id                         | 1453                         | Id for the medical event note                        | StudentMedical                  |
        | MedicalEventId            | 1453                         | Id for the medical event that the note relates to    | StudentMedical                  |
        | Summary                    |                              | Summary of the note                                   | StudentMedical                  |
        | Note                       |                              | Free text of the note itself                          | StudentMedical                  |
        | LastUpdated                | 2016-07-28T04:04:50.112     | The last time this data was updated                   | StudentMedical                  |
        | RowHash                    | A1654F8EE247AAFE789E2888A7AD471F6D630D95 | For change comparison                | StudentMedical                  |

        ***
      operationId: StudentMedical
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student meal patterns
          content:
            application/json:
              schema:
                type: object
                properties:
                  ConditionLookups:
                    type: array
                    description: A JSON array of ConditionLookups
                    items:
                      $ref: "#/components/schemas/ConditionLookups"
                  StudentConditions:
                    type: array
                    description: A JSON array of StudentConditions
                    items:
                      $ref: "#/components/schemas/StudentConditions"
                  StudentMedical:
                    type: array
                    description: A JSON array of StudentMedical
                    items:
                      $ref: "#/components/schemas/StudentMedical"
                  StudentMedicalNotes:
                    type: array
                    description: A JSON array of StudentMedicalNotes
                    items:
                      $ref: "#/components/schemas/StudentMedicalNotes"
                  StudentMedicalEvents:
                    type: array
                    description: A JSON array of StudentMedicalEvents
                    items:
                      $ref: "#/components/schemas/StudentMedicalEvents"
                  MedicalEventNotes:
                    type: array
                    description: A JSON array of MedicalEventNotes
                    items:
                      $ref: "#/components/schemas/MedicalEventNotes"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentInterventions:
    get:
      tags:
      - Students
      summary: Student interventions and associated data.
      description: Student interventions and associated data.
      operationId: StudentInterventions
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Date from
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: DateTo
        in: query
        description: Date to
        required: true
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Student interventions data
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentInterventions:
                    type: array
                    description: A JSON array of StudentInterventions
                    items:
                      $ref: "#/components/schemas/StudentInterventions"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentExclusions:
    get:
      tags:
      - Students
      summary: Student exclusions
      description: "## Endpoint Description\r\n\r\nThe **school.studentexclusions** endpoint returns temporary and permanent exclusions for current students.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeComments**: Set to enable the comments field.\r\n- **includeAppealInfo**: Set to enable the various appeal fields.\r\n- **includeLeavers**: Set to allow exclusions for leavers.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint:\r\n\r\n- **Id**: Option to filter on Student ID.\r\n- **DateFrom**: Option to filter on Start Date.\r\n- **DateTo**: Option to filter on End Date.\r\n- **ExclusionType**: Option to filter on Type.\r\n- **ExclusionReason**: Option to filter on Reason.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentExclusions_\r\n\r\n**StudentExclusions** includes the exclusions and its details for the selected students. Note that the Reason field is considered deprecated for some MIS. Where an MIS provides multiple exclusion reasons, the reason fields in the StudentExclusions result set will be null.\r\n\r\n| Field                           | Example             | Notes                                                      | Consent Scope                  |\r\n|---------------------------------|---------------------|------------------------------------------------------------|---------------------------------|\r\n| Id                              | 2318                | The Id of the exclusion event                               | StudentExclusions               |\r\n| StudentId                       | 9919                | The MIS Id of the excluded student                          | StudentExclusions               |\r\n| Forename                        | Graham              | Student forename                                           | StudentExclusions               |\r\n| Surname                         | Abbess              | Student surname                                            | StudentExclusions               |\r\n| ExclusionType                   | Fixed Term          | Type of exclusion                                          | StudentExclusions               |\r\n| ExclusionTypeCode               | FIXD                | Type of exclusion - code                                   | StudentExclusions               |\r\n| ExclusionReason                 | Theft               | Reason for exclusion - will be null if MIS provides multiple reasons | StudentExclusions               |\r\n| ExclusionReasonCode             | TH                  | Reason for exclusion - code - will be null if MIS provides multiple reasons | StudentExclusions               |\r\n| ExclusionSessions               | 1                   | Number of sessions the student is excluded from            | StudentExclusions               |\r\n| StartDate                       | 2017-05-01          | Exclusion start date                                      | StudentExclusions               |\r\n| EndDate                         | 2017-05-01          | Exclusion end date                                        | StudentExclusions               |\r\n| StartSession                    | AM                  | Exclusion start session                                   | StudentExclusions               |\r\n| EndSession                      | PM                  | Exclusion end session                                     | StudentExclusions               |\r\n| ExclusionDays                   | 1                   | Duration the student is excluded for                      | StudentExclusions               |\r\n| Comments                        | Misbehaviour        | Free-text comments regarding this item                   | StudentExclusions               |\r\n| DisciplinaryResult              | Exclusion Stands    | Disciplinary committee result                              | StudentExclusions               |\r\n| CommitteeHearingDate            | 2017-05-01          | Disciplinary committee date                               | StudentExclusions               |\r\n| ParentalRepresentation           | 1                   | Parents represented on disciplinary committee? (1/0)      | StudentExclusions               |\r\n| CommitteeReinstatementDate      | 2017-05-01          | Date if reinstatement recommended                          | StudentExclusions               |\r\n| AppealIndicator                 | 1                   | Appeal received? (1/0)                                   | StudentExclusions               |\r\n| AppealDate                      | 2017-05-01          | Date of appeal                                           | StudentExclusions               |\r\n| AppealResult                    |                     | Result of appeal                                         | StudentExclusions               |\r\n| HearingNoticeOfAppealDate      | 2017-05-01          | Date of hearing notice of appeal                          | StudentExclusions               |\r\n| AppealReinstatementDate         | 2017-05-01          | Date of appeal reinstatement                              | StudentExclusions               |\r\n| StudentStatus                   | On Roll             | Whether the student is still enrolled                     | StudentExclusions               |\r\n| Term                            | Spring Term         | The term of the exclusion                                  | StudentExclusions               |\r\n| AcademicYear                    | 2021/2022           | The academic year of the exclusion                        | StudentExclusions               |\r\n| AgenciesInvolved                |                     | Agencies relating to the exclusion                        | StudentExclusions               |\r\n| LastUpdated                     | 2017-04-19T14:57:04.144 | The last time this data was updated                      | StudentExclusions               |\r\n| RowHash                         | 9688A8DE75870A9EC0937BD2FADB15A39A31A52E | For change comparison                          | StudentExclusions               |\r\n\r\n#### _StudentExclusionReasons_\r\n\r\n**StudentExclusionReasons** links exclusions to their reasons where multiple reasons are supported by the MIS.\r\n\r\n| Field                   | Example              | Notes                              | Consent Scope          |\r\n|-------------------------|----------------------|------------------------------------|-------------------------|\r\n| StudentExclusionId      | 2318                 | The Id of the exclusion event       | StudentExclusions       |\r\n| ReasonId                | 14                   | The Id of the reason                | StudentExclusions       |\r\n\r\n#### _ExclusionReasons_\r\n\r\n**ExclusionReasons** details the reasons where multiple reasons are provided by the MIS.\r\n\r\n| Field                   | Example               | Notes                              | Consent Scope          |\r\n|-------------------------|-----------------------|------------------------------------|-------------------------|\r\n| Id                      | 14                    | The Id of the exclusion reason      | StudentExclusions       |\r\n| ReasonCode              | PA                    | The code of the exclusion reason    | StudentExclusions       |\r\n| ReasonDescription       | Physical assault against an adult | The description of the exclusion reason | StudentExclusions |\r\n\r\n***\r\n"
      operationId: StudentExclusions
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: StartDate
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: EndDate
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ExclustionType
        in: query
        description: Exclusion Type
        required: false
        schema:
          type: string
          enum:
          - FIXD
          - PERM
          - LNCH
          - RPER
          - RFIX
      - name: ExclusionReason
        in: query
        description: Exclusion Reason
        required: false
        schema:
          type: string
          enum:
          - PP
          - PA
          - VP
          - VA
          - BU
          - RA
          - SM
          - DA
          - DM
          - TH
          - DB
          - OT
      - name: includeComments
        in: query
        description: Enable comments field
        required: false
        schema:
          type: boolean
      - name: includeAppealInfo
        in: query
        description: Enable appeal fields
        required: false
        schema:
          type: boolean
      - name: includeLeavers
        in: query
        description: Include leavers result set
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student school history data
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentSchoolHistory:
                    type: array
                    description: A JSON array of StudentSchoolHistory
                    items:
                      $ref: "#/components/schemas/StudentSchoolHistory"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentEnrolmentHistory:
    get:
      tags:
      - Students
      summary: Collect all previous school records for students on roll
      description: "## School.StudentEnrolmentHistory Endpoint\r\n\r\nThe School.StudentEnrolmentHistory endpoint returns enrolment history for all students in the current and previous three academic years.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint:\r\n\r\n- **Id**: Optional filter to return enrolment history for a single student MIS Id or Idaas Id.\r\n- **EffectiveDate**: Optional filter to return enrolment history for a specific date.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                             | Primary Key                          | Foreign Key                           | Related Endpoint Description      |\r\n|--------------------------------------|--------------------------------------|---------------------------------------|-----------------------------------|\r\n| school.students                      | StudentEnrolmentHistory.StudentMis_Id | Students.Id                          | Student record information         |\r\n| school.students                      | StudentEnrolmentHistory.StudentIdaasId | Students.IdaasId                    | Student record information         |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentEnrolmentHistory_ Dataset\r\n\r\n| Field                           | Example              | Notes                                                   | Consent Scope                  |\r\n|---------------------------------|----------------------|---------------------------------------------------------|---------------------------------|\r\n| Id                              | 13504.2020-09-07     | The MIS Id of the enrolment record                      | Student                         |\r\n| StudentIdaasId                 | PL-13504            | The unique Idaas Id of the student                       | Student                         |\r\n| Student_MisId                  | 13504                | The MIS id of the student                                | Student                         |\r\n| StudentXid                     |                      | The XID of the student                                   | Student                         |\r\n| EnrolmentStatusCode            | C                    | The enrolment status code of the enrolment period       | Student                         |\r\n| StartDate                       | 2020-01-01           | The start date of the enrolment period                  | Student                         |\r\n| EndDate                         | 2021-01-26           | The end date of the enrolment period                    | Student                         |\r\n| LastUpdated                     | 2016-07-07T18:09:06.46| The last time this data was updated                      | Student                         |\r\n| RowHash                         | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                        | Student                         |\r\n\r\n***\r\n"
      operationId: StudentEnrolmentHistory
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: effectiveDate
        in: query
        description: effective date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student school history data
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentEnrolmentHistory:
                    type: array
                    description: A JSON array of StudentEnrolmentHistory
                    items:
                      $ref: "#/components/schemas/StudentEnrolmentHistory"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentAlternativeProvision:
    get:
      tags:
      - Students
      summary: Student alternative provisions
      description: "## Endpoint Description\r\n\r\nRetrieve information about alternative provisions for students.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name | Filter Description                                  |\r\n|-----------|-------------|----------------------------------------------------|\r\n| Optional  | StudentId   | Retrieve records relating to a specific student.   |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                             | Primary Key                          | Foreign Key                                           | Related Endpoint Description       |\r\n|--------------------------------------|--------------------------------------|------------------------------------------------------|------------------------------------|\r\n| school.students                      | StudentAlternativeProvision.StudentMis_Id | Students.Mis_Id                                     | Student record information         |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentAlternativeProvision_ Dataset\r\n\r\n| Field                           | Example              | Notes                                              | Consent Scope                  |\r\n|---------------------------------|----------------------|----------------------------------------------------|---------------------------------|\r\n| Id                              | 2                    | Id for the student alternative provision            | StudentAlternativeProvision      |\r\n| StudentMis_Id                   | 14                   | Id for the student                                  | StudentAlternativeProvision      |\r\n| StartDate                       | 2022-01-01           | Start date of the alternative provision             | StudentAlternativeProvision      |\r\n| EndDate                         | 2023-01-01           | End date of the alternative provision               | StudentAlternativeProvision      |\r\n| AttendancePattern               | PT                   | Attendance pattern of the alternative provision      | StudentAlternativeProvision      |\r\n| SessionsPerWeek                 | 3                    | Number of sessions per week                         | StudentAlternativeProvision      |\r\n| ProvisionSettingType            | Non-maintained further education college | Type of provision settings                     | StudentAlternativeProvision      |\r\n| PrimaryPlacementReason          | Permanent exclusion   | Reason for placement                                | StudentAlternativeProvision      |\r\n| PlacementAssociation             |                      | Placement association                               | StudentAlternativeProvision      |\r\n| CompanyHouseNo                  | 34532643            | Company house number                                | StudentAlternativeProvision      |\r\n| PostCode                        |                      | Postcode for the alternative provision              | StudentAlternativeProvision      |\r\n| URN                             |                      | Unique reference number for the alternative provision| StudentAlternativeProvision      |\r\n| UKPRN                           |                      | UK Provider Reference Number for the alternative provision | StudentAlternativeProvision  |\r\n| Notes                           |                      | Free text notes relating to the alternative provision| StudentAlternativeProvision      |\r\n\r\n***\r\n"
      operationId: StudentAlternativeProvision
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of student alternative provision data
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentAlternativeProvision:
                    type: array
                    description: A JSON array of StudentAlternativeProvision
                    items:
                      $ref: "#/components/schemas/StudentAlternativeProvision"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Counts:
    get:
      tags:
      - School
      - Students
      - Staff
      summary: "Counts of the number of students, staff, contacts, groups and photos for this school"
      description: "## Endpoint Description\r\n\r\nRetrieve total counts of students, contacts, staff, groups, and available photos for active people.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                      | Example | Notes                      | Consent Scope      |\r\n|----------------------------|---------|----------------------------|---------------------|\r\n| Area                       | Students | Area for count             | School / SchoolLite  |\r\n| Count                      | 1017    | Count of entities          | School / SchoolLite  |\r\n\r\n***\r\n"
      operationId: Counts
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of counts
          content:
            application/json:
              schema:
                type: object
                properties:
                  counts:
                    type: array
                    description: A JSON array of counts
                    items:
                      $ref: "#/components/schemas/Counts"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/detentionlookups:
    get:
      tags:
      - Students
      summary: Detention Lookups
      description: Provides the required lookup ID values for the codes and types needed when writing back detections to the MIS
      operationId: detentionlookups
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeInactive
        in: query
        description: Add this option to include historical lookups
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of detentionlookups
          content:
            application/json:
              schema:
                type: object
                properties:
                  counts:
                    type: array
                    description: A JSON array of detentionlookups
                    items:
                      $ref: "#/components/schemas/detentionlookups"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/detentions:
    get:
      tags:
      - Students
      summary: Detentions
      description: "## Endpoint Description\r\n\r\nRetrieve detentions and associated data.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name  | Filter Description                                    |\r\n|-----------|--------------|------------------------------------------------------|\r\n| Optional  | StudentId    | Retrieve records relating to a specific student      |\r\n| Optional  | DateFrom     | Retrieve records on or after the date specified (yyyy-mm-dd) |\r\n| Optional  | DateTo       | Retrieve records on or before the date specified (yyyy-mm-dd) |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                           | Primary Key                                     | Foreign Key                                   | Related Endpoint Description                                         |\r\n|------------------------------------|-------------------------------------------------|-----------------------------------------------|--------------------------------------------------------------------|\r\n| school.students                    | DetentionStudents.StudentId                      | Students.Id                                  | Student record information                                          |\r\n| school.staff                       | DetentionStudents.AddedByStaffId, Detentions.AssignedStaffId, Detentions.RecordedByStaffId, DetentionOtherStaff.StaffId | Staff.Id                                    | Staff record information                                            |\r\n| school.behaviourfordaterange       | DetentionStudents.BehaviourId                   | Behaviour.Id                                 | Behaviour incident information                                      |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DetentionStudents_\r\n\r\nDetention records per student.\r\n\r\n| Field                        | Example | Notes                                      | Consent Scope        |\r\n|------------------------------|---------|--------------------------------------------|-----------------------|\r\n| Id                           | 1744    | Id of the student detention record.       | StudentDetentions      |\r\n| DetentionId                 | 1473    | Id of the detention record.               | StudentDetentions      |\r\n| StudentId                   | 9925    | Id of the student record.                 | StudentDetentions      |\r\n| ReasonId                    | 14      | Id of the detention reason.               | StudentDetentions      |\r\n| AttendedId                  | 1       | Id of the attended status.                | StudentDetentions      |\r\n| NonAttendanceReason          | Doctors appointment. | Reason for non attendance.        | StudentDetentions      |\r\n| BehaviourId                 | 4113    | Id of the associated behaviour incident.  | StudentDetentions      |\r\n| AddedByStaffId              | 1       | Id of the staff member who added the student detention record. | StudentDetentions |\r\n| Comments                     | Don't forget book bag. | Comments associated with the student detention. | StudentDetentions  |\r\n\r\n#### _Detentions_\r\n\r\nDetention records.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 1471          | Id of the detention record.                | StudentDetentions      |\r\n| DetentionTypeId             | 2             | Id of the detention type.                  | StudentDetentions      |\r\n| LocationId                  | 22            | Id of the detention location.              | StudentDetentions      |\r\n| DetentionDate                | 2018-10-26    | Date of the detention.                     | StudentDetentions      |\r\n| StartTime                    | 15:00         | Start time of the detention.               | StudentDetentions      |\r\n| EndTime                      | 17:00         | End time of the detention.                 | StudentDetentions      |\r\n| AssignedStaffId              | 1             | Id of the staff member assigned to the detention. | StudentDetentions   |\r\n| RecordedDate                 | 2018-10-29    | Date the detention was recorded.           | StudentDetentions      |\r\n| RecordedByStaffId            | 1             | Id of the staff member who recorded the detention. | StudentDetentions   |\r\n\r\n#### _DetentionReasonLookup_\r\n\r\nLookup for detention reasons.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 4             | Id of the detention reason.                | StudentDetentions      |\r\n| Code                         | LI            | Code of the detention reason.              | StudentDetentions      |\r\n| Description                  | Lunchtime Incident | Description of the detention reason.    | StudentDetentions      |\r\n| DisplayOrder                 | 12            | Display order of the detention reason.     | StudentDetentions      |\r\n\r\n#### _DetentionAttendedLookup_\r\n\r\nLookup for detention attended statuses.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 2             | Id of the detention attended status.       | StudentDetentions      |\r\n| Code                         | ATT           | Code of the detention attended status.     | StudentDetentions      |\r\n| Description                  | Not Recorded   | Description of the detention attended status. | StudentDetentions   |\r\n| DisplayOrder                 | 2             | Display order of the detention attended status. | StudentDetentions   |\r\n\r\n#### _DetentionTypeLookup_\r\n\r\nLookup for detention types.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 2             | Id of the detention type.                  | StudentDetentions      |\r\n| Code                         | SLTD          | Detention type code.                       | StudentDetentions      |\r\n| Description                  | SLT Detention  | Detention type description.                | StudentDetentions      |\r\n| DefaultLocationId            | 33            | Id of the default location.                | StudentDetentions      |\r\n| Frequency                    | Weekly        | Frequency of the detention.                | StudentDetentions      |\r\n| DefaultDayOfWeekNum         | 4             | Default day of the week number.           | StudentDetentions      |\r\n| DefaultStartTime             | 12:00         | Default start time.                        | StudentDetentions      |\r\n| DefaultEndTime               | 12:30         | Default end time.                          | StudentDetentions      |\r\n| YearGroupId                  | 4             | Id of yeargroup the detention is associated with. | StudentDetentions |\r\n\r\n#### _DetentionLocationLookup_\r\n\r\nLookup for detention locations.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 1             | Id of the location.                        | StudentDetentions      |\r\n| Code                         | HALL          | Location code.                            | StudentDetentions      |\r\n| Description                  | Main Hall     | Location description.                      | StudentDetentions      |\r\n\r\n#### _DetentionActivities_\r\n\r\nDetention activity records.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 33            | Id of the detention activity.              | StudentDetentions      |\r\n| DetentionId                  | 1471          | Id of the detention.                       | StudentDetentions      |\r\n| ActivityId                   | 4             | Id of the activity.                        | StudentDetentions      |\r\n\r\n#### _DetentionActivityLookup_\r\n\r\nLookup for detention activities.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 1             | Id of the activity.                        | StudentDetentions      |\r\n| Code                         | HOM           | Activity code.                            | StudentDetentions      |\r\n| Description                  | Homework      | Activity description.                      | StudentDetentions      |\r\n| DisplayOrder                 | 1             | Activity display order.                   | StudentDetentions      |\r\n\r\n#### _DetentionOtherStaff_\r\n\r\nOther staff associated with the detention.\r\n\r\n| Field                        | Example       | Notes                                      | Consent Scope        |\r\n|------------------------------|---------------|--------------------------------------------|-----------------------|\r\n| Id                           | 10            | Id of the detention other staff record.    | StudentDetentions      |\r\n| DetentionId                  | 1485          | Id of the detention.                       | StudentDetentions      |\r\n| StaffId                      | 26            | Id of the staff member.                   | StudentDetentions      |\r\n\r\n***\r\n"
      operationId: detentions
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeInactive
        in: query
        description: Add this option to include historical lookups
        required: false
        schema:
          type: boolean
      - name: StudentId
        in: query
        description: Optional StudentId
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Retrieve records on or after the date specified (yyyy-mm-dd)
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: DateTo
        in: query
        description: Retrieve records on or before the date specified (yyyy-mm-dd)
        required: false
        schema:
          type: string
          format: yyyy-mm-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of detentions
          content:
            application/json:
              schema:
                type: object
                properties:
                  counts:
                    type: array
                    description: A JSON array of detentions
                    items:
                      $ref: "#/components/schemas/detentions"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/dietaryneeds:
    get:
      tags:
      - Students
      summary: Dietary needs
      description: "## Endpoint Description\r\n\r\nRetrieve dietary needs (including allergies) and their associated student records.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name | Filter Description                                        |\r\n|-----------|-------------|----------------------------------------------------------|\r\n| Optional  | Id          | Retrieve records relating to a specific student          |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                       | Foreign Key                | Related Endpoint Description         |\r\n|--------------------------------|-----------------------------------|----------------------------|--------------------------------------|\r\n| school.students                | StudentDietaryNeeds.StudentMisId  | Students.Id                | Student record information           |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DietaryNeeds_\r\n\r\nA lookup list of Dietary Needs.\r\n\r\n| Field                        | Example           | Notes                                  | Consent Scope                  |\r\n|------------------------------|-------------------|----------------------------------------|---------------------------------|\r\n| Id                           | 1744              | Id of the dietary need.               | DietaryNeeds / StudentMedical   |\r\n| Code                         | DAIR              | Code of the dietary need.             | DietaryNeeds / StudentMedical   |\r\n| Description                  | No dairy produce   | Description of the dietary need.      | DietaryNeeds / StudentMedical   |\r\n\r\n#### _StudentDietaryNeeds_\r\n\r\nStudent records and their associated dietary needs.\r\n\r\n| Field                        | Example           | Notes                                  | Consent Scope                  |\r\n|------------------------------|-------------------|----------------------------------------|---------------------------------|\r\n| Id                           | 1453              | Id of the student dietary need record. | DietaryNeeds / StudentMedical   |\r\n| DietaryNeedsId               | 1744              | Id of the dietary need.               | DietaryNeeds / StudentMedical   |\r\n| StudentId                    | 5464              | Id of the student.                    | DietaryNeeds / StudentMedical   |\r\n| StudentLocalId               | PL-1744           | Local id of the student.              | DietaryNeeds / StudentMedical   |\r\n\r\n***\r\n"
      operationId: dietaryneeds
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional StudentId
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DietaryNeeds
          content:
            application/json:
              schema:
                type: object
                properties:
                  DietaryNeeds:
                    type: array
                    description: A JSON array of DietaryNeeds
                    items:
                      $ref: "#/components/schemas/DietaryNeeds"
                  StudentDietaryNeeds:
                    type: array
                    description: A JSON array of StudentDietaryNeeds
                    items:
                      $ref: "#/components/schemas/StudentDietaryNeeds"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/discountcodes:
    get:
      tags:
      - Students
      summary: discountcodes
      description: Retrieve discount codes
      operationId: discountcodes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeKS4
        in: query
        description: Include KS4 discount codes
        required: false
        schema:
          type: string
      - name: includeKS5
        in: query
        description: Include KS5 discount codes
        required: false
        schema:
          type: string
      - name: KeyStage
        in: query
        description: "Mandatory keystage, i.e. KS4 or KS5"
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DiscountCodes
          content:
            application/json:
              schema:
                type: object
                properties:
                  discountcodes:
                    type: array
                    description: A JSON array of DiscountCodes
                    items:
                      $ref: "#/components/schemas/DiscountCodes"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/EntitlementHistory:
    get:
      tags:
      - Students
      summary: Entitlement History
      description: "## Endpoint Description\r\n\r\nRetrieve Free School Meal, Pupil Premium, and Ever6 historical membership for all students.\r\n\r\n***\r\n\r\n### Options\r\n\r\nAvailable option parameters for this endpoint:\r\n\r\n- **onlyEntitlementGroups** - Only return the EntitlementGroups resultset.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                      | Foreign Key                         | Related Endpoint Description         |\r\n|--------------------------------|----------------------------------|-------------------------------------|--------------------------------------|\r\n| school.students                | Student.Id                       | EntitlementGroupStudents.StudentId   | Main endpoint for student information |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _EntitlementGroups_\r\n\r\n| Field                        | Example          | Notes                                    | Consent Scope                   |\r\n|------------------------------|-------------------|------------------------------------------|----------------------------------|\r\n| Id                           | 100               | Primary Key                              | StudentFunding                   |\r\n| Shortname                    | FSM               | Shortened or abbreviated name of the group | StudentFunding                   |\r\n| Fullname                     | Free School Meals | Full name of the group                  | StudentFunding                   |\r\n\r\n#### _EntitlementGroupStudents_\r\n\r\n| Field                        | Example           | Notes                                      | Consent Scope                   |\r\n|------------------------------|-------------------|--------------------------------------------|----------------------------------|\r\n| Id                           | 86                | Primary key                                | StudentFunding                   |\r\n| EntitlementGroupId           | 108               | Foreign key referencing EntitlementGroups  | StudentFunding                   |\r\n| StudentId                    | 4356              | Foreign key referencing Students            | StudentFunding                   |\r\n| StartDate                    | 2006-05-16T00:00:00 | Date the entitlement began                 | StudentFunding                   |\r\n| EndDate                      | 2009-07-30T00:00:00 | Date the entitlement finished, null if unfinished | StudentFunding            |\r\n\r\n***\r\n"
      operationId: EntitlementHistory
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: onlyEntitlementGroups
        in: query
        description: Only return EntitlementGroups resultset
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of EntitlementHistory
          content:
            application/json:
              schema:
                type: object
                properties:
                  EntitlementGroups:
                    type: array
                    description: A JSON array of EntitlementGroups
                    items:
                      $ref: "#/components/schemas/EntitlementGroups"
                  EntitlementGroupStudents:
                    type: array
                    description: A JSON array of EntitlementGroupStudents
                    items:
                      $ref: "#/components/schemas/EntitlementGroupStudents"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/ExamCandidates:
    get:
      tags:
      - Exams
      summary: ExamCandidates
      description: Retrieve Exam Candidates
      operationId: ExamCandidates
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional Student ID
        required: false
        schema:
          type: string
      - name: SeasonID
        in: query
        description: Optional Season ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of examcandidates
          content:
            application/json:
              schema:
                type: object
                properties:
                  examcandidates:
                    type: array
                    description: A JSON array of ExamCandidates
                    items:
                      $ref: "#/components/schemas/ExamCandidates"
                  ExternalCandidates:
                    type: array
                    description: A JSON array of ExternalCandidates
                    items:
                      $ref: "#/components/schemas/ExternalCandidates"
                  ExamSittings:
                    type: array
                    description: A JSON array of ExamSittings
                    items:
                      $ref: "#/components/schemas/ExamSittings"
                  ExamArrangements:
                    type: array
                    description: A JSON array of ExamArrangements
                    items:
                      $ref: "#/components/schemas/ExamArrangements"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/ExamEntries:
    get:
      tags:
      - Exams
      summary: Exam Entries
      description: "Using the information from the school.students and school.examsstructure endpoints, request specific examinations results data."
      operationId: ExamEntries
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Students
        in: query
        description: CSV of student ids
        required: false
        schema:
          type: string
          format: CSV
      - name: Seasons
        in: query
        description: CSV of season ids
        required: false
        schema:
          type: string
          format: CSV
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ExamEntries
          content:
            application/json:
              schema:
                type: object
                properties:
                  ExamEntries:
                    type: array
                    description: A JSON array of ExamEntries
                    items:
                      $ref: "#/components/schemas/ExamEntries"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/ExamForecasts:
    get:
      tags:
      - Exams
      summary: Exam Forecasts
      description: "Using the information from the school.students and school.examsstructure endpoints, request specific examinations results data."
      operationId: ExamForecasts
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Students
        in: query
        description: CSV of student ids
        required: false
        schema:
          type: string
          format: CSV
      - name: Seasons
        in: query
        description: CSV of season ids
        required: false
        schema:
          type: string
          format: CSV
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ForecastResults
          content:
            application/json:
              schema:
                type: object
                properties:
                  ForecastResults:
                    type: array
                    description: A JSON array of ForecastResults
                    items:
                      $ref: "#/components/schemas/ForecastResults"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/examsresults:
    get:
      tags:
      - Exams
      summary: Exam Results
      description: "## Endpoint Description\r\n\r\nUsing the information from the school.students and school.examsstructure endpoints, request specific examinations results data.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?   | Filter Name       | Filter Description                                                                                      |\r\n|-------------|-------------------|--------------------------------------------------------------------------------------------------------|\r\n| Mandatory (*) | Students         | Request results for a specific set of students (Comma separated)                                      |\r\n| Mandatory (*) | Aspects          | Request results for specific aspects (Comma separated)                                                |\r\n| Mandatory (*) | Resultsets       | Request results for specific resultsets (Comma separated)                                             |\r\n| Mandatory (*) | Seasons          | Request results for specific seasons (Comma separated)                                                |\r\n| Mandatory (*) | Qans             | Request results for specific QANs (Comma separated)                                                  |\r\n| Mandatory (*) | SyllabusCodes    | Request results for specific syllabus codes (Comma separated)                                         |\r\n| Mandatory (*) | OptionCodes      | Request results for specific option codes (Comma separated)                                           |\r\n| Optional      | ResultDateBetween | Filter to results achieved between these dates (inclusive, pipe separated)                            |\r\n\r\n> (*) At least one of Students, Aspects, Resultsets, Seasons, Qans, SyllabusCodes, OptionCodes filter must be populated. If more than one filter is present then the filters are additive.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                       | Foreign Key                       | Related Endpoint Description                                       |\r\n|--------------------------------|-----------------------------------|-----------------------------------|------------------------------------------------------------------|\r\n| school.students                | ExamsResults.StudentId            | Students.Id                       | Student who has been awarded the result                          |\r\n| school.examsstructure          | ExamsResults.AspectId             | Aspects.Id                       | Aspect for which the result relates                               |\r\n| school.examsstructure          | ExamsResults.ResultSetId          | ResultSets.Id                    | The specific resultset for which the result was recorded         |\r\n| school.examsstructure          | ExamsResults.QanId               | Qans.Id                          | The specific QAN for which the result was recorded               |\r\n| school.examsstructure          | ExamsResults.SyllabusCodeId       | SyllabusCodes.Id                 | The specific syllabus code for which the result was recorded     |\r\n| school.examsstructure          | ExamsResults.OptionCodeId         | OptionCodes.Id                   | The specific entry option code for which the result was recorded |\r\n| school.examsstructure          | ExamsResults.ExamBoardId          | ExamBoards.Id                    | The specific exam board for which the result was recorded        |\r\n| school.examsstructure          | ExamsResults.ExamLevelId          | ExamLevels.Id                    | The specific exam level for which the result was recorded        |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                        | Example          | Notes                                               | Consent Scope            |\r\n|------------------------------|-------------------|-----------------------------------------------------|---------------------------|\r\n| Id                           | 1289067           | The unique identifier for the result                | ExamsResults              |\r\n| Mis_Id                       | 1289067           | The unique MIS identifier for the result            | ExamsResults              |\r\n| StudentId                    | 9919              | Id of the student who owns the result               | ExamsResults              |\r\n| Result                       | 6                 | The value of the result                             | ExamsResults              |\r\n| ResultDate                   | 2015-09-03        | Date the result was achieved                        | ExamsResults              |\r\n| AspectId                     | 702               | Id of the aspect for which the result is for       | ExamsResults              |\r\n| ResultSetId                  | 24                | Id of the resultset against which the result was recorded | ExamsResults        |\r\n| ExamSeasonId                 | 12                | Id of the exam season against which the result was recorded | ExamsResults        |\r\n| QanId                        | 1245              | Id of the QAN against which the result was recorded  | ExamsResults              |\r\n| SyllabusCodeId               | 7443              | Id of the syllabus code against which the result was recorded | ExamsResults        |\r\n| ExamBoardId                  | 17                | Id of the exam board against which the result was recorded | ExamsResults        |\r\n| ExamLevelId                  | 4                 | Id of the exam level against which the result was recorded | ExamsResults        |\r\n| OptionCodeId                 | 811               | Id of the option code against which the result was recorded | ExamsResults        |\r\n| LastUpdated                   | 2017-01-19T22:03:31.617 | The last time this data was updated               | ExamsResults              |\r\n| RowHash                       | 87D6ECDB0183B9F77F3AE3F9EB744E345817CA0F | For change comparison                            | ExamsResults              |\r\n\r\n***\r\n"
      operationId: examsresults
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Students
        in: query
        description: CSV of student ids
        required: false
        schema:
          type: string
          format: CSV
      - name: Aspects
        in: query
        description: CSV of aspects
        required: false
        schema:
          type: string
          format: CSV
      - name: Resultsets
        in: query
        description: CSV of Resultsets
        required: false
        schema:
          type: string
          format: CSV
      - name: Seasons
        in: query
        description: CSV of Seasons
        required: false
        schema:
          type: string
          format: CSV
      - name: Qans
        in: query
        description: CSV of Qans
        required: false
        schema:
          type: string
          format: CSV
      - name: SyllabusCodes
        in: query
        description: CSV of SyllabusCodes
        required: false
        schema:
          type: string
          format: CSV
      - name: OptionCodes
        in: query
        description: CSV of OptionCodes
        required: false
        schema:
          type: string
          format: CSV
      - name: ResultDateBetween
        in: query
        description: "Filter to results achieved between these dates (inclusive, pipe seperated)"
        required: false
        schema:
          type: string
          format: yyyy-MM-dd|yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ExamResults
          content:
            application/json:
              schema:
                type: object
                properties:
                  ExamResults:
                    type: array
                    description: A JSON array of ExamResults
                    items:
                      $ref: "#/components/schemas/ExamResults"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/examsstructure:
    get:
      tags:
      - Exams
      summary: Exam Structure
      description: "## Endpoint Description\r\n\r\nThe exams structure endpoint provides you with the components that make up a given school's exams setup in their MIS. As there can be hundreds of thousands of results stored for a single school, it is important to collect just the specific result information you need. Using the data from this endpoint, you can provide your end user with a choice of which exam aspects or resultsets to collect results for, meaning you don't overload your platform with unnecessary information. Note that you can use this to link exam results to discount codes using the KS4DiscountCodes and KS5DiscountCodes endpoints.\r\n\r\n### Usage\r\n\r\nIf your intention is to simply display results for particular exams in your application, you likely need to identify the **Aspects**, **QANs**, **Entry Codes**, or **Syllabus Codes** that are relevant to the school so you can request only the results that you need. Alternatively, you could extract results by **Exam Season** or **Resultset**. The ExamsStructure is included in the **School** consent scope as it provides organizational and structural information for the establishment.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Assessment Endpoint          | Related Endpoint Description                                           |\r\n|------------------------------|----------------------------------------------------------------------|\r\n| school.examresults           | Request results for specific students or by exams structure          |\r\n\r\n| Endpoint                       | Primary Key                      | Foreign Key                               | Related Endpoint Description                                    |\r\n|--------------------------------|-----------------------------------|------------------------------------------|---------------------------------------------------------------|\r\n| school.examsresults            | Aspects.Id                      | ExamsResults.AspectId                   | Aspect for which the result relates                             |\r\n| school.examsresults            | ResultSets.Id                   | ExamsResults.ResultSetId                | The specific resultset for which the result was recorded       |\r\n| school.examsresults            | Qans.Id                         | ExamsResults.QanId                      | The specific QAN for which the result was recorded             |\r\n| school.examsresults            | SyllabusCodes.Id                | ExamsResults.SyllabusCodeId             | The specific syllabus code for which the result was recorded   |\r\n| school.examsresults            | OptionCodes.Id                  | ExamsResults.OptionCodeId               | The specific entry option code for which the result was recorded |\r\n| school.examsresults            | ExamBoards.Id                   | ExamsResults.ExamBoardId                | The specific exam board for which the result was recorded      |\r\n| school.examsresults            | ExamLevels.Id                   | ExamsResults.ExamLevelId                | The specific exam level for which the result was recorded      |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Aspects_\r\n\r\n**Aspects** are the definition of an assessment and where results relate back to.\r\n\r\n| Field                        | Example                       | Notes                                   | Consent Scope     |\r\n|------------------------------|-------------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 702                           | The unique identifier for the aspect    | School            |\r\n| Mis_Id                       | 702                           | The unique MIS identifier for the aspect | School            |\r\n| Name                         | WJEC/GCSE 015002 Result Grade F | Name of the aspect                      | School            |\r\n| AspectType                   | Grade                         | Definition of the type of result        | School            |\r\n\r\n#### _Resultsets_\r\n\r\n**Resultsets** describe a particular period over which the results were recorded. For exams, this is similar to ExamSeasons.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Name                         | November Exams 2017      | The name of the resultset               | School            |\r\n\r\n#### _GradeSets_\r\n\r\nA container for the valid **Grades** assigned to an **Aspect** where the AspectType is Grade.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 345                      | The unique identifier for the gradeset  | School            |\r\n| Mis_Id                       | 74                       | The unique MIS identifier for the gradeset | School            |\r\n| Name                         | Teacher Assessments      | Description of the gradeset             | School            |\r\n| Notes                        | Teacher Assessment Grades | Additional text description for the gradeset | School        |\r\n\r\n#### _GradeSetHistory_\r\n\r\nRecords the current validity of configured **GradeSets**. The **GradeSet** for a given **Aspect** may change, so historic results may relate to historic **GradeSets**.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 345                      | The unique identifier for the gradesethistory record | School            |\r\n| Id                           | 1463                     | The unique MIS identifier for the gradesethistory record | School            |\r\n| StartDate                    | 2004-09-01               | Date from which this record is valid   | School            |\r\n| EndDate                      | null                     | Date after which this record is no longer valid | School        |\r\n| GradeSetId                   | 74                       | Id of the gradeset this record is linked to | School          |\r\n\r\n#### _Grades_\r\n\r\nThe definition of the valid **Grades** that can be assigned to a student for an **Aspect**. The Value property will appear as the Result when querying the school.assessmentresults endpoints.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 657                      | The unique identifier for the grade     | School            |\r\n| Id                           | 832                      | The unique MIS identifier for the grade | School            |\r\n| GradeSetHistoryId            | 97                       | Id of the gradesethistory record to ensure valid | School        |\r\n| Description                  | Working Towards Level 1  | Description of the grade                 | School            |\r\n| Value                        | W                        | Entry value for the grade               | School            |\r\n| NumericValue                 | 3.0                      | Hidden numeric value for the grade      | School            |\r\n| DisplayOrder                 | 15                       | Order in which to display the grade     | School            |\r\n\r\n#### _MarkSets_\r\n\r\nSimilar to **GradeSets** and **Grades**, but where the AspectType is Integer rather than Grade.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 324                      | The unique identifier for the markset   | School            |\r\n| Mis_Id                       | 136                      | The unique MIS identifier for the markset | School            |\r\n| AspectId                     | 770                      | Id of the aspect                        | School            |\r\n| StartDate                    | 1990-09-01               | Date from which this record is valid    | School            |\r\n| EndDate                      | null                     | Date after which this record is no longer valid | School        |\r\n| MinValue                     | 0.00                     | Minimum valid value for this record     | School            |\r\n| MaxValue                     | 100.00                   | Maximum valid value for this record     | School            |\r\n\r\n#### _ExamSeasons_\r\n\r\n**Exam Seasons** describe a particular season in which the results were recorded, along with the specific dates of that season.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Name                         | November Exams 2017      | The name of the exam season             | School            |\r\n| StartDate                    | 2018-11-01               | The start date of the exam season       | School            |\r\n| EndDate                      | 2017-11-30               | The end date of the exam season         | School            |\r\n\r\n#### _QANs_\r\n\r\nThe Qualification Accreditation Number or **QAN** can be used together with the Syllabus Code and the exam date to determine the Discount Code of a result.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the QAN       | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the QAN   | School            |\r\n| Qan                          | 50046792                 | The QAN itself                          | School            |\r\n\r\n#### _SyllabusCodes_\r\n\r\n**Syllabus Codes** can be used together with the QAN and the exam date to determine the Discount Code of a result.\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Code                         | 3562                      | The syllabus code                       | School            |\r\n\r\n#### _OptionCodes_\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Code                         | 1GK0H                    | The option code                         | School            |\r\n| Title                        | Greek Option H           | The title of the option                 | School            |\r\n\r\n#### _ExamBoards_\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Code                         | AQA                      | The code of the exam board              | School            |\r\n| Description                  | Assessment and Qualifications Alliance | The description of the exam board | School            |\r\n\r\n#### _ExamLevels_\r\n\r\n| Field                        | Example                  | Notes                                   | Consent Scope     |\r\n|------------------------------|--------------------------|-----------------------------------------|-------------------|\r\n| Id                           | 14                       | The unique identifier for the resultset | School            |\r\n| Mis_Id                       | 14                       | The unique MIS identifier for the resultset | School            |\r\n| Code                         | ASB                      | The level code                          | School            |\r\n| Description                  | GCE Advanced Subsidiary  | The level description                   | School            |\r\n\r\n***\r\n\r\n"
      operationId: examsstructure
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ExamsStructure
          content:
            application/json:
              schema:
                type: object
                properties:
                  Aspects:
                    type: array
                    description: A JSON array of Aspects
                    items:
                      $ref: "#/components/schemas/Aspects"
                  Resultsets:
                    type: array
                    description: A JSON array of Resultsets
                    items:
                      $ref: "#/components/schemas/Resultsets"
                  Gradesets:
                    type: array
                    description: A JSON array of Gradesets
                    items:
                      $ref: "#/components/schemas/Gradesets"
                  GradesetHistories:
                    type: array
                    description: A JSON array of GradesetHistories
                    items:
                      $ref: "#/components/schemas/GradesetHistories"
                  Grades:
                    type: array
                    description: A JSON array of Grades
                    items:
                      $ref: "#/components/schemas/Grades"
                  Marksets:
                    type: array
                    description: A JSON array of Marksets
                    items:
                      $ref: "#/components/schemas/Marksets"
                  ExamSeasons:
                    type: array
                    description: A JSON array of ExamSeasons
                    items:
                      $ref: "#/components/schemas/ExamSeasons"
                  QANs:
                    type: array
                    description: A JSON array of QANs
                    items:
                      $ref: "#/components/schemas/QANs"
                  SyllabusCodes:
                    type: array
                    description: A JSON array of SyllabusCodes
                    items:
                      $ref: "#/components/schemas/SyllabusCodes"
                  OptionCodes:
                    type: array
                    description: A JSON array of OptionCodes
                    items:
                      $ref: "#/components/schemas/OptionCodes"
                  ExamBoards:
                    type: array
                    description: A JSON array of ExamBoards
                    items:
                      $ref: "#/components/schemas/ExamBoards"
                  ExamLevels:
                    type: array
                    description: A JSON array of ExamLevels
                    items:
                      $ref: "#/components/schemas/ExamLevels"
                  ExamSeries:
                    type: array
                    description: A JSON array of ExamSeries
                    items:
                      $ref: "#/components/schemas/ExamSeries"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/FundingAndMonitoring:
    get:
      tags:
      - School
      - Students
      summary: Funding and Monitoring
      description: "## Endpoint Description\r\n\r\nRetrieve funding and monitoring information.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name  | Filter Description                                |\r\n|-----------|--------------|---------------------------------------------------|\r\n| Optional  | StudentId    | Retrieve records relating to a specific student   |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                  | Primary Key                     | Foreign Key                         | Related Endpoint Description        |\r\n|---------------------------|--------------------------------|------------------------------------|------------------------------------|\r\n| school.students           | StudentFAM.StudentMis_Id       | Students.Mis_Id                    | Student record information          |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentFAM_\r\n\r\n| Field                          | Example | Notes                                                  | Consent Scope     |\r\n|--------------------------------|---------|--------------------------------------------------------|--------------------|\r\n| Id                             | 1       | Id of the student funding and monitoring record        | FundingMonitoring   |\r\n| StudentMis_Id                  | 23      | Id of the student                                      | FundingMonitoring   |\r\n| FAMType                        | NLM     | Type of funding and monitoring                         | FundingMonitoring   |\r\n| FAMCode                        | 01      | Funding and monitoring code                            | FundingMonitoring   |\r\n| FAMDescription                 | Tutoring| Funding and monitoring description                     | FundingMonitoring   |\r\n| AcademicYear                   | 2022    | Academic year                                         | FundingMonitoring   |\r\n| AutumnHours                    | 2       | Number of autumn hours                                 | FundingMonitoring   |\r\n| SpringHours                    | 2       | Number of spring hours                                 | FundingMonitoring   |\r\n| SummerHours                    | 2       | Number of summer hours                                 | FundingMonitoring   |\r\n| AcademicYearHours              | 2       | Number of hours for the academic year                 | FundingMonitoring   |\r\n| FAMNotes                       |         | Free text notes relating to the funding and monitoring record | FundingMonitoring   |\r\n\r\n***\r\n"
      operationId: FundingAndMonitoring
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional StudentID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of FundingAndMonitoring
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentFAM:
                    type: array
                    description: A JSON array of StudentFAM
                    items:
                      $ref: "#/components/schemas/StudentFAM"
                  LearnerSupport:
                    type: array
                    description: A JSON array of LearnerSupport
                    items:
                      $ref: "#/components/schemas/LearnerSupport"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/GroupHistory:
    get:
      tags:
      - School
      - Students
      summary: Group History
      description: "## Endpoint Description\r\n\r\nRetrieve historical group definitions. Optionally, include student and staff memberships to the groups.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeStaffMembers** - Include staff memberships dataset in output. Includes all staff members of each group.\r\n- **includeStudentMembers** - Include student memberships dataset in output.\r\n- **includeMembersIds** - Include csv of Ids of group members (staff and students).\r\n- **includeMembersIdaasIds** - Include csv of IdaasIds of group members (staff and students).\r\n- **includeMembersXIDs** - Include csv of XIDs of group members (staff and students).\r\n- **includeSubGroups** - Include SubGroups resultset.\r\n- **includeSubjects** - Include GroupsSubjects and Subjects resultsets.\r\n- **includeStandardYeargroups** - Include lookup for Standard Yeargroups.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name  | Filter Description                                      |\r\n|-----------|--------------|---------------------------------------------------------|\r\n| Optional  | id           | Obtain group definition and optionally, members, of a specific group |\r\n| Optional  | Type         | Filter returned dataset to one or more group types. Accepts a csv of group types. |\r\n| Optional  | Code         | Obtain group definition and optionally, members using the group code |\r\n| Optional  | DateFrom     | Filter groups that ended before the from date          |\r\n| Optional  | DateTo       | Filter groups that started after the to date           |\r\n\r\n***\r\n\r\n### Types\r\n\r\n- **YearGrp:** Return only pastoral year groups\r\n- **RegGrp:** Return only pastoral registration (form / tutor) groups\r\n- **TeachingGrp:** Return only academic teaching groups (classes)\r\n- **HouseGrp:** Return only pastoral house groups\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                  | Primary Key                     | Foreign Key                         | Related Endpoint Description        |\r\n|---------------------------|--------------------------------|------------------------------------|------------------------------------|\r\n| school.students           | StudentMembers.StudentId       | Students.Id                        | Retrieves details for the student  |\r\n| school.staff              | StaffMembers.StaffId          | Staff.Id                          | Retrieves details for the staff member |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Groups_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GR-8811                              | The unique, Idaas Id of the group              | School / SchoolLite         |\r\n| GroupMis_Id                   | 8811                                 | The MIS id of the group                        | School / SchoolLite         |\r\n| XID                            |                                      | The XID of the group                          | School / SchoolLite         |\r\n| ExternalId                     | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id of the group              | School / SchoolLite         |\r\n| Type                           | RegGrp                               | The group type                                 | School / SchoolLite         |\r\n| Code                           | 9X1/Fr                              | The group code                                 | School / SchoolLite         |\r\n| Name                           | 9X1/Fr                              | The group name, often the same as Code        | School / SchoolLite         |\r\n| RowHash                        | E2824F8EE247AAFE866E2888A7AD471F6D630D95 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-07-28T04:04:50.112             | The last time this data was updated           | School / SchoolLite         |\r\n| StudentXIDs                    |                                      | Student XIDs                                  | School / SchoolLite         |\r\n| StaffXIDs                      |                                      | Staff XIDs                                    | School / SchoolLite         |\r\n| StudentIds                     | 9919,9925                           | Student MIS Ids                               | School / SchoolLite         |\r\n| StaffIds                       | 10                                   | Staff MIS Id                                  | School / SchoolLite         |\r\n| StudentIdaasIds               | PL-9919,PL-9925                     | Student IDaaS Ids                             | School / SchoolLite         |\r\n| StaffIdaasIds                 | PWT-10                              | Staff IDaaS Ids                               | School / SchoolLite         |\r\n\r\n#### _StaffMembers_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GC-8811.PWT-25                       | Unique membership Id                           | School / SchoolLite         |\r\n| GroupId                        | GC-8811                              | The unique Idaas Id for the group             | School / SchoolLite         |\r\n| GroupMis_Id                   | 8811                                 | The MIS Id for the group                      | School / SchoolLite         |\r\n| StaffId                        | 25                                   | The MIS Id for the staff member               | School / SchoolLite         |\r\n| StaffRole                      | Head of Year                        | Staff role within the group                    | School / SchoolLite         |\r\n| GroupExternalId                | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id for the group             | School / SchoolLite         |\r\n| StaffIdaasId                  | PWT-10                              | Staff IDaaS Id                                | School / SchoolLite         |\r\n| GroupIdaasId                  | GC-101                              | Group IDaaS Id                                | School / SchoolLite         |\r\n| StartDate                     | 2018-09-01                          | Start date of the staff membership            | School / SchoolLite         |\r\n| EndDate                       | 2019-06-24                          | End date of the staff membership              | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _StudentMembers_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GC-8811.PL-9660                     | Unique membership Id                           | School / SchoolLite         |\r\n| GroupId                        | GC-8811                              | The MIS Id for the group                      | School / SchoolLite         |\r\n| GroupMis_Id                   | 8811                                 | The MIS Id for the group                      | School / SchoolLite         |\r\n| StudentId                      | PL-9660                              | The MIS Id for the student                    | School / SchoolLite         |\r\n| GroupExternalId                | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id for the group             | School / SchoolLite         |\r\n| StudentExternalId              | 3ea4efb0-ff91-4c15-a27c-25a7b4982665| The MIS external Id for the student           | School / SchoolLite         |\r\n| StudentIdaasId                | PL-9919                              | Student IDaaS Id                              | School / SchoolLite         |\r\n| StartDate                     | 2018-09-01                          | Start date of the student membership          | School / SchoolLite         |\r\n| EndDate                       | 2019-06-24                          | End date of the student membership            | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _SubGroups_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | 8811.4665                           | A composite Id for the group relationship      | School / SchoolLite         |\r\n| ChildGroupId                   | 8811                                 | The MIS Id of the child group                  | School / SchoolLite         |\r\n| ParentGroupId                  | 4665                                 | The MIS Id of the parent group                 | School / SchoolLite         |\r\n| ChildGroupTypeId               | 24                                   | The MIS Id of the child group type             | School / SchoolLite         |\r\n| ParentGroupTypeId              | 51                                   | The MIS Id of the parent group type            | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _StandardYearGroupLookup_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GY-24                                | A unique id for the record                    | School / SchoolLite         |\r\n| GroupId                        | GY-24                                | The unique Idaas Id of the child group        | School / SchoolLite         |\r\n| GroupMis_Id                   | 24                                   | The MIS id of the yeargroup                   | School / SchoolLite         |\r\n| StandardYeargroupCode          | 8                                    | The short yeargroup code. Reception will be R  | School / SchoolLite         |\r\n| StandardYeargroupName          | Year 8                               | The name of the yeargroup                     | School / SchoolLite         |\r\n\r\n***\r\n"
      operationId: GroupHistory
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStaffMembers
        in: query
        description: Include staff membership of groups
        required: false
        schema:
          type: boolean
      - name: includeStudentMembers
        in: query
        description: Include student membership
        required: false
        schema:
          type: boolean
      - name: includeMembersIds
        in: query
        description: Include csv of Ids of group members
        required: false
        schema:
          type: boolean
      - name: includeMembersIdaasIds
        in: query
        description: Include csv of IdaasIds of group members
        required: false
        schema:
          type: boolean
      - name: includeMembersXIDs
        in: query
        description: Include csv of XIDs of group members
        required: false
        schema:
          type: boolean
      - name: includeSubGroups
        in: query
        description: Include SubGroups resultset
        required: false
        schema:
          type: boolean
      - name: includeSubjects
        in: query
        description: Include GroupsSubjects and Subjects resultsets
        required: false
        schema:
          type: boolean
      - name: includeStandardYeargroups
        in: query
        description: Include lookup for Standard Yeargroups
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: optional group id or externalid
        required: false
        schema:
          type: string
      - name: Type
        in: query
        description: Filter by type
        required: false
        schema:
          type: string
      - name: Code
        in: query
        description: Filter by code
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Filter groups that ended before date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: Filter groups that ended before date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of GroupHistory
          content:
            application/json:
              schema:
                type: object
                properties:
                  GroupHistory:
                    type: array
                    description: A JSON array of GroupHistory
                    items:
                      $ref: "#/components/schemas/GroupHistory"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Groups:
    get:
      tags:
      - School
      - Students
      summary: Groups
      description: "## Endpoint Description\r\n\r\nRetrieve active group definitions where a group has at least one student or staff member. Optionally, include student and staff memberships to the groups.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeStaffMembers** - Include staff memberships dataset in output. Includes all staff members of each group.\r\n- **includeStudentMembers** - Include student memberships dataset in output.\r\n- **includeMembersIds** - Include csv of Ids of group members (staff and students).\r\n- **includeMembersIdaasIds** - Include csv of IdaasIds of group members (staff and students).\r\n- **includeSubjects** - Include SubjectLocalId, SubjectCode, SubjectName on the Group result set.\r\n- **includeGroupTypes** - Include GroupIds on the Group result set and a separate GroupTypes result set.\r\n- **includeSubGroups** - Include the SubGroups result set.\r\n- **includeFutureGroups** - Include future groups in the returned resultsets. Should be used with includeStaffMembers and/or includeStudentMembers to obtain start and end dates of future memberships.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name  | Filter Description                                      |\r\n|-----------|--------------|---------------------------------------------------------|\r\n| Optional  | id           | Obtain group definition and optionally, members, of a specific group |\r\n| Optional  | Type         | Filter returned dataset to one or more group types. Accepts a csv of group types. |\r\n| Optional  | Code         | Obtain group definition and optionally, members using the group code |\r\n| Optional  | updatedSince | Filter by last updated date (return records greater than this date) |\r\n\r\n***\r\n\r\n### Types\r\n\r\n- **YearGrp:** Return only pastoral year groups.\r\n- **RegGrp:** Return only pastoral registration (form / tutor) groups.\r\n- **TeachingGrp:** Return only academic teaching groups (classes).\r\n- **HouseGrp:** Return only pastoral house groups.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                  | Primary Key                     | Foreign Key                         | Related Endpoint Description        |\r\n|---------------------------|--------------------------------|------------------------------------|------------------------------------|\r\n| school.students           | StudentMembers.StudentId       | Students.Id                        | Retrieves details for the student  |\r\n| school.staff              | StaffMembers.StaffId          | Staff.Id                          | Retrieves details for the staff member |\r\n| school.timetable          | Groups.Id                     | Lessons.ClassId                   | Retrieves instances of lessons in the timetable |\r\n| school.timetableforstaff  | Groups.Id                     | .ClassId                          | Retrieves timetable for specific staff member |\r\n| school.timetableforstudent | Groups.Id                     | .ClassId                          | Retrieves timetable for specific student |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Groups_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | 8811                                 | The MIS Id of the group                        | School / SchoolLite         |\r\n| ExternalId                     | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id of the group               | School / SchoolLite         |\r\n| IdaasId                        | GC-8811                              | The Idaas Id of the group                      | School / SchoolLite         |\r\n| Code                           | 9X1/Fr                              | The group code                                 | School / SchoolLite         |\r\n| Name                           | 9X1/Fr                              | The group name, often the same as Code        | School / SchoolLite         |\r\n| PrimaryStaffId                 | 25                                   | The MIS Id of the main teacher for this group  | School / SchoolLite         |\r\n| Staff                          | JXE,RM                               | MIS StaffCodes for staff members of this group | School / SchoolLite         |\r\n| NumStudents                    | 27                                   | Count of student members                        | School / SchoolLite         |\r\n| RowHash                        | E2824F8EE247AAFE866E2888A7AD471F6D630D95 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-07-28T04:04:50.112             | The last time this data was updated           | School / SchoolLite         |\r\n| TypeId                         | 2                                    | The MIS Id of the group                        | School / SchoolLite         |\r\n| Type                           | YearGrp                              | The group type                                 | School / SchoolLite         |\r\n| StudentIdaasIds               | PL-9919,PL-9925                     | Student IDaaS Ids                             | School / SchoolLite         |\r\n| StaffIdaasIds                 | PWT-10                              | Staff IDaaS Ids                               | School / SchoolLite         |\r\n| StudentIds                     | 9919,9925                           | Student MIS Ids                               | School / SchoolLite         |\r\n| StaffIds                       | 10                                   | Staff MIS Id                                  | School / SchoolLite         |\r\n| SubjectLocalId                | 111                                  | MIS Id of the subject                          | School / SchoolLite         |\r\n| SubjectCode                   | Fr                                   | The subject code                               | School / SchoolLite         |\r\n| SubjectName                   | French                               | The name of the subject                        | School / SchoolLite         |\r\n\r\n#### _GroupTypes_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | 2                                    | The MIS Id of the group                        | School / SchoolLite         |\r\n| TypeCode                       | TeachingGrp                          | Type of group                                  | School / SchoolLite         |\r\n| TypeDescription                | Teaching Group                       | Description of the group type                  | School / SchoolLite         |\r\n| ParentGroupTypeId              | 1                                    | The MIS Id for the parent group for this group | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _StaffMembers_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GC-8811.PWT-25                       | Unique membership Id                           | School / SchoolLite         |\r\n| GroupId                        | 8811                                 | The MIS Id for the group                      | School / SchoolLite         |\r\n| StaffId                        | 25                                   | The MIS Id for the staff member               | School / SchoolLite         |\r\n| StaffRole                      | Head of Year                        | Staff role within the group                    | School / SchoolLite         |\r\n| GroupExternalId                | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id for the group             | School / SchoolLite         |\r\n| StaffExternalId                | b7d1b212-4c51-4af4-b7c9-9d7a2ab68530| The MIS external Id for the staff member      | School / SchoolLite         |\r\n| StaffIdaasId                  | PWT-10                              | Staff IDaaS Id                                | School / SchoolLite         |\r\n| GroupIdaasId                  | GC-101                              | Group IDaaS Id                                | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _StudentMembers_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | GC-8811.PL-9660                     | Unique membership Id                           | School / SchoolLite         |\r\n| GroupId                        | GC-8811                              | The MIS Id for the group                      | School / SchoolLite         |\r\n| StudentId                      | PL-9660                              | The MIS Id for the student                    | School / SchoolLite         |\r\n| GroupExternalId                | 86779760-cb6e-40d9-b8f9-ea3ba86677d7| The MIS external Id for the group             | School / SchoolLite         |\r\n| StudentExternalId              | 3ea4efb0-ff91-4c15-a27c-25a7b4982665| The MIS external Id for the student           | School / SchoolLite         |\r\n| StudentIdaasId                | PL-9919                              | Student IDaaS Id                              | School / SchoolLite         |\r\n| GroupIdaasId                  | GC-101                              | Group IDaaS Id                                | School / SchoolLite         |\r\n| StartDate                     | 2018-09-01                          | Start date of the student membership          | School / SchoolLite         |\r\n| EndDate                       | 2019-06-24                          | End date of the student membership            | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n#### _SubGroups_ dataset\r\n\r\n| Field                          | Example                              | Notes                                          | Consent Scope              |\r\n|--------------------------------|--------------------------------------|------------------------------------------------|-----------------------------|\r\n| Id                             | 8811.4665                           | A composite Id for the group relationship      | School / SchoolLite         |\r\n| ChildGroupId                   | 8811                                 | The MIS Id of the child group                  | School / SchoolLite         |\r\n| ParentGroupId                  | 4665                                 | The MIS Id of the parent group                 | School / SchoolLite         |\r\n| ChildGroupTypeId               | 24                                   | The MIS Id of the child group type             | School / SchoolLite         |\r\n| ParentGroupTypeId              | 51                                   | The MIS Id of the parent group type            | School / SchoolLite         |\r\n| RowHash                        | 0ABBDC032F8896F557FCF0F6FA53272A2AAA5F54 | For change comparison                       | School / SchoolLite         |\r\n| LastUpdated                    | 2016-06-30T16:06:40.658             | The last time this data was updated           | School / SchoolLite         |\r\n\r\n***\r\n"
      operationId: Groups
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStaffMembers
        in: query
        description: Include staff membership of groups
        required: false
        schema:
          type: boolean
      - name: includeStudentMembers
        in: query
        description: Include student membership
        required: false
        schema:
          type: boolean
      - name: includeMembersIds
        in: query
        description: Include csv of Ids of group members
        required: false
        schema:
          type: boolean
      - name: includeMembersIdaasIds
        in: query
        description: Include csv of IdaasIds of group members
        required: false
        schema:
          type: boolean
      - name: includeMembersXIDs
        in: query
        description: Include csv of XIDs of group members
        required: false
        schema:
          type: boolean
      - name: includeSubGroups
        in: query
        description: Include SubGroups resultset
        required: false
        schema:
          type: boolean
      - name: includeSubjects
        in: query
        description: Include GroupsSubjects and Subjects resultsets
        required: false
        schema:
          type: boolean
      - name: includeStandardYeargroups
        in: query
        description: Include lookup for Standard Yeargroups
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: optional group id or externalid
        required: false
        schema:
          type: string
      - name: Type
        in: query
        description: Filter by type
        required: false
        schema:
          type: string
      - name: Code
        in: query
        description: Filter by code
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Filter groups that ended before date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: Filter groups that ended before date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Groups
          content:
            application/json:
              schema:
                type: object
                properties:
                  Group:
                    type: array
                    description: A JSON array of Group
                    items:
                      $ref: "#/components/schemas/Group"
                  StaffMembers:
                    type: array
                    description: A JSON array of StaffMembers
                    items:
                      $ref: "#/components/schemas/StaffMembers"
                  StudentMembers:
                    type: array
                    description: A JSON array of StudentMembers
                    items:
                      $ref: "#/components/schemas/StudentMembers"
                  GroupTypes:
                    type: array
                    description: A JSON array of GroupTypes
                    items:
                      $ref: "#/components/schemas/GroupTypes"
                  SubGroups:
                    type: array
                    description: A JSON array of SubGroups
                    items:
                      $ref: "#/components/schemas/SubGroups"
                  StandardYearGroupLookup:
                    type: array
                    description: A JSON array of StandardYearGroupLookup
                    items:
                      $ref: "#/components/schemas/StandardYearGroupLookup"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Health:
    get:
      tags:
      - School
      summary: Health
      description: "## School.Health Endpoint\r\n\r\nThe School.Health endpoint allows your application to programmatically check the availability of data for a given school from the Xporter on Demand (XoD) API. Key fields returned in this dataset help you provide a real-time status for each school's connection to XoD. You can also check the status of the data for any other request by passing the parameter `onlyGetDBStatus=true`.\r\n\r\nData is cached for up to 30 days before purging from our platform. Commonly requested data that is covered by all scopes authorized by a school is automatically cached every night. In cases where data is not successfully returned due to an issue with the school-side agent, the latest cache data will be served. Check the `meta` result set available on all endpoints to see when the data behind each endpoint was last updated.\r\n\r\n***\r\n\r\n### Key Fields\r\n\r\n- **SchoolDataStatus**: \r\n  - Indicates the cache status of the `XodSchoolData` database that provides information for many common endpoints including Students, Staff, Contacts, and Groups.\r\n  - Even if there is an issue with the school agent, cached data will be returned for up to 30 days.\r\n  - A status of `ok` will be returned during the entire 30-day period while the cache is available.\r\n  - Use in conjunction with `SchoolDataAgeDays`.\r\n\r\n- **SchoolDataAgeDays**: \r\n  - Identifies how many days ago the `XodSchoolData` cache was generated.\r\n\r\n- **XodStatus**: \r\n  - Indicates the overall status of the available data.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **estab**: When authenticated with your App Management Secret, use this filter to check a specific school.\r\n\r\n***\r\n"
      operationId: Health
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Health
          content:
            application/json:
              schema:
                type: object
                properties:
                  health:
                    type: array
                    description: A JSON array of health
                    items:
                      $ref: "#/components/schemas/health"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/HistoricalAttendanceSummary:
    get:
      tags:
      - Attendance
      summary: HistoricalAttendanceSummary
      description: "Retrieve active group definitions where a group has at least one student or staff member. Optionally, include student and staff memberships to the groups."
      operationId: HistoricalAttendanceSummary
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeMinutesLate
        in: query
        description: Set to include the minutes late resultset
        required: false
        schema:
          type: boolean
      - name: includeAttendanceNotes
        in: query
        description: Set to include the attendance notes resultset
        required: false
        schema:
          type: boolean
      - name: includeStatutoryComments
        in: query
        description: Set to include the statutory comments resultset
        required: false
        schema:
          type: boolean
      - name: SchoolYear
        in: query
        description: "Mandatory filter to determine which schoolyear the data is extracted for. Pass the start year of the academic year, e.g. \"2023\"."
        required: true
        schema:
          type: string
          format: yyyy
      - name: id
        in: query
        description: Optional filter to return details for a single student
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of HistoricalAttendanceSummary
          content:
            application/json:
              schema:
                type: object
                properties:
                  HistoricalAttendanceSummary:
                    type: array
                    description: A JSON array of HistoricalAttendanceSummary
                    items:
                      $ref: "#/components/schemas/HistoricalAttendanceSummary"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Interventions:
    get:
      tags:
      - School
      - Students
      summary: Interventions
      description: "## Endpoint Description\r\n\r\nThe **school.studentexclusions** endpoint returns temporary and permanent exclusions for current students.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeComments**: Set to enable the comments field.\r\n- **includeAppealInfo**: Set to enable the various appeal fields.\r\n- **includeLeavers**: Set to allow exclusions for leavers.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint:\r\n\r\n- **Id**: Option to filter on Student ID.\r\n- **DateFrom**: Option to filter on Start Date.\r\n- **DateTo**: Option to filter on End Date.\r\n- **ExclusionType**: Option to filter on Type.\r\n- **ExclusionReason**: Option to filter on Reason.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentExclusions_\r\n\r\n**StudentExclusions** includes the exclusions and its details for the selected students. Note that the Reason field is considered deprecated for some MIS. Where an MIS provides multiple exclusion reasons, the reason fields in the StudentExclusions result set will be null.\r\n\r\n| Field                           | Example             | Notes                                                      | Consent Scope                  |\r\n|---------------------------------|---------------------|------------------------------------------------------------|---------------------------------|\r\n| Id                              | 2318                | The Id of the exclusion event                               | StudentExclusions               |\r\n| StudentId                       | 9919                | The MIS Id of the excluded student                          | StudentExclusions               |\r\n| Forename                        | Graham              | Student forename                                           | StudentExclusions               |\r\n| Surname                         | Abbess              | Student surname                                            | StudentExclusions               |\r\n| ExclusionType                   | Fixed Term          | Type of exclusion                                          | StudentExclusions               |\r\n| ExclusionTypeCode               | FIXD                | Type of exclusion - code                                   | StudentExclusions               |\r\n| ExclusionReason                 | Theft               | Reason for exclusion - will be null if MIS provides multiple reasons | StudentExclusions               |\r\n| ExclusionReasonCode             | TH                  | Reason for exclusion - code - will be null if MIS provides multiple reasons | StudentExclusions               |\r\n| ExclusionSessions               | 1                   | Number of sessions the student is excluded from            | StudentExclusions               |\r\n| StartDate                       | 2017-05-01          | Exclusion start date                                      | StudentExclusions               |\r\n| EndDate                         | 2017-05-01          | Exclusion end date                                        | StudentExclusions               |\r\n| StartSession                    | AM                  | Exclusion start session                                   | StudentExclusions               |\r\n| EndSession                      | PM                  | Exclusion end session                                     | StudentExclusions               |\r\n| ExclusionDays                   | 1                   | Duration the student is excluded for                      | StudentExclusions               |\r\n| Comments                        | Misbehaviour        | Free-text comments regarding this item                   | StudentExclusions               |\r\n| DisciplinaryResult              | Exclusion Stands    | Disciplinary committee result                              | StudentExclusions               |\r\n| CommitteeHearingDate            | 2017-05-01          | Disciplinary committee date                               | StudentExclusions               |\r\n| ParentalRepresentation           | 1                   | Parents represented on disciplinary committee? (1/0)      | StudentExclusions               |\r\n| CommitteeReinstatementDate      | 2017-05-01          | Date if reinstatement recommended                          | StudentExclusions               |\r\n| AppealIndicator                 | 1                   | Appeal received? (1/0)                                   | StudentExclusions               |\r\n| AppealDate                      | 2017-05-01          | Date of appeal                                           | StudentExclusions               |\r\n| AppealResult                    |                     | Result of appeal                                         | StudentExclusions               |\r\n| HearingNoticeOfAppealDate      | 2017-05-01          | Date of hearing notice of appeal                          | StudentExclusions               |\r\n| AppealReinstatementDate         | 2017-05-01          | Date of appeal reinstatement                              | StudentExclusions               |\r\n| StudentStatus                   | On Roll             | Whether the student is still enrolled                     | StudentExclusions               |\r\n| Term                            | Spring Term         | The term of the exclusion                                  | StudentExclusions               |\r\n| AcademicYear                    | 2021/2022           | The academic year of the exclusion                        | StudentExclusions               |\r\n| AgenciesInvolved                |                     | Agencies relating to the exclusion                        | StudentExclusions               |\r\n| LastUpdated                     | 2017-04-19T14:57:04.144 | The last time this data was updated                      | StudentExclusions               |\r\n| RowHash                         | 9688A8DE75870A9EC0937BD2FADB15A39A31A52E | For change comparison                          | StudentExclusions               |\r\n\r\n#### _StudentExclusionReasons_\r\n\r\n**StudentExclusionReasons** links exclusions to their reasons where multiple reasons are supported by the MIS.\r\n\r\n| Field                   | Example              | Notes                              | Consent Scope          |\r\n|-------------------------|----------------------|------------------------------------|-------------------------|\r\n| StudentExclusionId      | 2318                 | The Id of the exclusion event       | StudentExclusions       |\r\n| ReasonId                | 14                   | The Id of the reason                | StudentExclusions       |\r\n\r\n#### _ExclusionReasons_\r\n\r\n**ExclusionReasons** details the reasons where multiple reasons are provided by the MIS.\r\n\r\n| Field                   | Example               | Notes                              | Consent Scope          |\r\n|-------------------------|-----------------------|------------------------------------|-------------------------|\r\n| Id                      | 14                    | The Id of the exclusion reason      | StudentExclusions       |\r\n| ReasonCode              | PA                    | The code of the exclusion reason    | StudentExclusions       |\r\n| ReasonDescription       | Physical assault against an adult | The description of the exclusion reason | StudentExclusions |\r\n\r\n***\r\n"
      operationId: Interventions
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DateFrom
        in: query
        description: The date from which to collect intervention records
        required: true
        schema:
          type: string
          format: yyyy
      - name: DateTo
        in: query
        description: The end of the date range for which intervention are collected
        required: true
        schema:
          type: string
          format: yyyy
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Interventions
          content:
            application/json:
              schema:
                type: object
                properties:
                  InterventionOvervews:
                    type: array
                    description: A JSON array of InterventionOvervews
                    items:
                      $ref: "#/components/schemas/InterventionOvervews"
                  Interventions:
                    type: array
                    description: A JSON array of Interventions
                    items:
                      $ref: "#/components/schemas/Interventions"
                  InterventionStaff:
                    type: array
                    description: A JSON array of InterventionStaff
                    items:
                      $ref: "#/components/schemas/InterventionStaff"
                  InterventionContacts:
                    type: array
                    description: A JSON array of InterventionContacts
                    items:
                      $ref: "#/components/schemas/InterventionContacts"
                  InterventionAgents:
                    type: array
                    description: A JSON array of InterventionAgents
                    items:
                      $ref: "#/components/schemas/InterventionAgents"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/KS4DiscountCodes:
    get:
      tags:
      - School
      summary: KS4DiscountCodes
      description: "## Endpoint Description\r\n\r\nRetrieve discount code information for key stage 4.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                   |\r\n|------------|-------------|-----------------------------------------------------|\r\n| Optional    | Year        | Filter the discount codes to a particular year; e.g. 2019 |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                  | Primary Key                  | Foreign Key                   | Related Endpoint Description                                  |\r\n|---------------------------|------------------------------|-------------------------------|--------------------------------------------------------------|\r\n| school.examstructure       | DiscountCodes.Qan            | QANS.Qan                      | Match against a QAN in the exams structure, allowing you to determine the discount code for a result. |\r\n| school.examstructure       | DiscountCodes.SyllabusCode   | SyllabusCodes.Code            | Match against a syllabus code in the exams structure, allowing you to determine the discount code for a result. |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DiscountCodes_ dataset\r\n\r\n| Field                     | Example                                      | Notes                                                               | Consent Scope        |\r\n|---------------------------|----------------------------------------------|---------------------------------------------------------------------|-----------------------|\r\n| Year                      | 2019                                       | The reference year for the discount code                             | School                |\r\n| QAN                       | 50026628                                    | The QAN that references the discount code                           | School                |\r\n| QualificationTitle        | Pearson Edexcel Level 3 Advanced Subsidiary GCE in Design and Technology | The qualification title                                             | School                |\r\n| SyllabusCode              | 8FT01                                       | The syllabus code that references the discount code. Empty if not dependent on the syllabus. | School                |\r\n| SyllabusTitle             | D&T: Product Design                         | The syllabus title that references the discount code. Empty if not dependent on the syllabus. | School                |\r\n| DiscountCode              | 9080                                       | The discount code.                                                  | School                |\r\n| DiscountCodeDescription    | D&T Product Design                         | The discount code title.                                           | School                |\r\n\r\n***\r\n\r\n"
      operationId: KS4DiscountCodes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Year
        in: query
        description: Optional year
        required: false
        schema:
          type: string
          format: yyyy
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DiscountCodes
          content:
            application/json:
              schema:
                type: object
                properties:
                  DiscountCodes:
                    type: array
                    description: A JSON array of DiscountCodes
                    items:
                      $ref: "#/components/schemas/DiscountCodes"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/KS5DiscountCodes:
    get:
      tags:
      - School
      summary: KS5DiscountCodes
      description: "## Endpoint Description\r\n\r\nRetrieve discount code information for key stage 5.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                   |\r\n|------------|-------------|-----------------------------------------------------|\r\n| Optional    | Year        | Filter the discount codes to a particular year; e.g. 2019 |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                  | Primary Key                  | Foreign Key                   | Related Endpoint Description                                  |\r\n|---------------------------|------------------------------|-------------------------------|--------------------------------------------------------------|\r\n| school.examstructure       | DiscountCodes.Qan            | QANS.Qan                      | Match against a QAN in the exams structure, allowing you to determine the discount code for a result. |\r\n| school.examstructure       | DiscountCodes.SyllabusCode   | SyllabusCodes.Code            | Match against a syllabus code in the exams structure, allowing you to determine the discount code for a result. |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DiscountCodes_ dataset\r\n\r\n| Field                     | Example                                      | Notes                                                               | Consent Scope        |\r\n|---------------------------|----------------------------------------------|---------------------------------------------------------------------|-----------------------|\r\n| Year                      | 2019                                       | The reference year for the discount code                             | School                |\r\n| QAN                       | 50026628                                    | The QAN that references the discount code                           | School                |\r\n| QualificationTitle        | Pearson Edexcel Level 3 Advanced Subsidiary GCE in Design and Technology | The qualification title                                             | School                |\r\n| SyllabusCode              | 8FT01                                       | The syllabus code that references the discount code. Empty if not dependent on the syllabus. | School                |\r\n| SyllabusTitle             | D&T: Product Design                         | The syllabus title that references the discount code. Empty if not dependent on the syllabus. | School                |\r\n| DiscountCode              | 9080                                       | The discount code.                                                  | School                |\r\n| DiscountCodeDescription    | D&T Product Design                         | The discount code title.                                           | School                |\r\n\r\n***\r\n\r\n"
      operationId: KS5DiscountCodes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Year
        in: query
        description: Optional year
        required: false
        schema:
          type: string
          format: yyyy
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DiscountCodes
          content:
            application/json:
              schema:
                type: object
                properties:
                  DiscountCodes:
                    type: array
                    description: A JSON array of DiscountCodes
                    items:
                      $ref: "#/components/schemas/DiscountCodes"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/linkeddocumentmeta:
    get:
      tags:
      - School
      summary: linkeddocumentmeta
      description: Retrieve linked document meta data
      operationId: linkeddocumentmeta
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DocumentAttachmentMeta
          content:
            application/json:
              schema:
                type: object
                properties:
                  DocumentAttachmentMeta:
                    type: array
                    description: A JSON array of DocumentAttachmentMeta
                    items:
                      $ref: "#/components/schemas/DocumentAttachmentMeta"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/LinkedDocuments:
    get:
      tags:
      - School
      summary: LinkedDocuments
      description: "## Endpoint Description\r\n\r\nRetrieves a list of Linked Documents and their Attachments. The **Document Type Name** is a required parameter and can be retrieved from the LinkedDocumentTypes endpoint. Because the file size of the attachments is potentially large, **StudentId**, **DateFrom**, and **DateTo** are also required parameters. If you require many attachments, please make multiple requests.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?   | Filter Name           | Filter Description                                                             |\r\n|-------------|-----------------------|-------------------------------------------------------------------------------|\r\n| **Mandatory** | DocumentTypeName      | Request linked documents for a single document type.                        |\r\n| **Mandatory** | StudentIds            | Request linked documents for a specific set of students (comma-separated).   |\r\n| **Mandatory** | DateFrom              | Request linked documents for a specific date range. Highly recommended when there are many documents. |\r\n| **Mandatory** | DateTo                | Request linked documents for a specific date range. Highly recommended when there are many documents. |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                          | Primary Key                             | Foreign Key                         | Related Endpoint Description              |\r\n|-----------------------------------|----------------------------------------|------------------------------------|-------------------------------------------|\r\n| school.linkeddocumenttypes         | DocumentAttachments.DocumentTypeName    | DocumentTypes.DocumentTypeName      | Linked document types                     |\r\n| school.students                    | DocumentAttachments.StudentId           | Students.Id                        | Students                                  |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DocumentAttachments_\r\n\r\nPublic documents and their attachments for the chosen document type.\r\n\r\n| Field                     | Example               | Notes                                               | Consent Scope            |\r\n|---------------------------|-----------------------|-----------------------------------------------------|---------------------------|\r\n| Id                        | 32                    | Id of the linked document                            | StudentFreeText           |\r\n| StudentId                | 6574                  | Id of the associated student                         | StudentFreeText           |\r\n| FileName                 | Photo1.jpg.gz        | Name of the file                                    | StudentFreeText           |\r\n| DocumentTypeName         | General Document      | The document type name                              | StudentFreeText           |\r\n| Size                     | 65616                 | Original size of the attachment (bytes)            | StudentFreeText           |\r\n| CompressedSize            | 59833                 | Compressed size of the attachment (bytes)          | StudentFreeText           |\r\n| Attachment                |                       | The document attachment (binary)                    | StudentFreeText           |\r\n| Summary                   | Inadequate Work in Class (02/11/2017) | Summary of the document contents                      | StudentFreeText           |\r\n| LastModified              | 2017-11-23            | Date the document was last modified (yyyy-MM-dd)   | StudentFreeText           |\r\n| Confidential              | 1                     | Boolean indicating whether the document is confidential | StudentFreeText           |\r\n\r\n***\r\n\r\n"
      operationId: LinkedDocuments
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DocumentTypeId
        in: query
        description: Mandatory document type id
        required: true
        schema:
          type: string
      - name: StudentIds
        in: query
        description: Mandatory CSV of student ids
        required: true
        schema:
          type: string
          format: CSV
      - name: DateFrom
        in: query
        description: Mandatory start date
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: Mandatory end date
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DocumentAttachments
          content:
            application/json:
              schema:
                type: object
                properties:
                  DocumentAttachments:
                    type: array
                    description: A JSON array of DocumentAttachments
                    items:
                      $ref: "#/components/schemas/DocumentAttachments"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/LinkedDocumentTypes:
    get:
      tags:
      - School
      summary: LinkedDocumentTypes
      description: "## Endpoint Description\r\n\r\nRetrieves a list of Document Types. The **Document Type Name** is a required parameter for the LinkedDocuments endpoint.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                        | Primary Key                           | Foreign Key                        | Related Endpoint Description         |\r\n|---------------------------------|---------------------------------------|-----------------------------------|-------------------------------------|\r\n| school.linkeddocuments          | DocumentTypes.DocumentTypeName        | DocumentAttachments.DocumentTypeName | Linked document attachments          |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DocumentTypes_\r\n\r\nAll document types available.\r\n\r\n| Field                     | Example               | Notes                                              | Consent Scope            |\r\n|---------------------------|-----------------------|----------------------------------------------------|---------------------------|\r\n| Id                        | 32                    | Id of the document type                            | StudentFreeText           |\r\n| DocumentTypeName         | General Document       | The document type name, used as a parameter in LinkedDocuments | StudentFreeText           |\r\n| Code                      | GENERAL                | The document type code                             | StudentFreeText           |\r\n\r\n***\r\n\r\n"
      operationId: LinkedDocumentTypes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DocumentTypes
          content:
            application/json:
              schema:
                type: object
                properties:
                  DocumentTypes:
                    type: array
                    description: A JSON array of DocumentTypes
                    items:
                      $ref: "#/components/schemas/DocumentTypes"
          links:
            LinkedDocumentsType:
              operationRef: "#/paths/School/{estab}/LinkedDocumentTypes"
              parameters:
                DocumentTypeId: $response.body#/result/id
              description: "The `id` value returned in the response must be used as the `DocumentTypeId` parameter in `GET /School/{estab}/LinkedDocuments` and `GET /School/{estab}/StaffLinkedDocuments.        \n\n                                            \n"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/LookupMeta:
    get:
      tags:
      - School
      summary: LookupMeta
      description: Retrieves a list of Lookup entries. The Lookup Type Name is an optional parameter whose values are found in the school.lookuptypes endpoint.
      operationId: LookupMeta
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: LookupType
        in: query
        description: Optional filter to a specific type of lookup
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of LookupMeta
          content:
            application/json:
              schema:
                type: object
                properties:
                  LookupMeta:
                    type: array
                    description: A JSON array of LookupMeta
                    items:
                      $ref: "#/components/schemas/LookupMeta"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/lookuptypes:
    get:
      tags:
      - School
      summary: lookuptypes
      description: Retrieves a list of Lookup Types. The Lookup Type Name is an optional parameter for the LookupMeta endpoint.
      operationId: lookuptypes
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: LookupType
        in: query
        description: Optional filter to a specific type of lookup
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of LookupTypes
          content:
            application/json:
              schema:
                type: object
                properties:
                  LookupTypes:
                    type: array
                    description: A JSON array of LookupTypes
                    items:
                      $ref: "#/components/schemas/LookupTypes"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/payscales:
    get:
      tags:
      - School
      summary: payscales
      description: Retrieves a list of pay scales
      operationId: payscales
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of payscales
          content:
            application/json:
              schema:
                type: object
                properties:
                  payscales:
                    type: array
                    description: A JSON array of payscales
                    items:
                      $ref: "#/components/schemas/payscales"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/MISEndpointSupport:
    get:
      tags:
      - School
      summary: MISEndpointSupport
      description: ""
      operationId: MISEndpointSupport
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: FieldName
        in: query
        description: Filter to specific field
        required: false
        schema:
          type: string
      - name: EndpointName
        in: query
        description: Filter to specific Endpoint
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of EndpointSupport
          content:
            application/json:
              schema:
                type: object
                properties:
                  EndpointSupport:
                    type: array
                    description: A JSON array of EndpointSupport
                    items:
                      $ref: "#/components/schemas/EndpointSupport"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/parentalconsents:
    get:
      tags:
      - School
      summary: parentalconsents
      description: "## Endpoint Description\r\n\r\nThe **school.parentalconsents** endpoint provides access to parental consent information. The endpoint returns records for students with parental consent information and a lookup table of parental consent descriptions.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **id** - Optional filter to return a single student using their id property.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### ParentalConsents\r\n\r\n| Field                           | Example         | Notes                                             | Consent Scope            |\r\n|---------------------------------|------------------|---------------------------------------------------|---------------------------|\r\n| Id                              | PL.99119.2       | The unique ID of the record                       | ParentalConsents          |\r\n| StudentMisId                   | 99119            | The MIS ID of the student                         | ParentalConsents          |\r\n| StudentLocalID                  | PL.12851         | The local ID of the student                       | ParentalConsents          |\r\n| ParentalConsentLookupId         | 2                | The ID of the corresponding record in the ParentalConsentLookups table | ParentalConsents          |\r\n\r\n#### ParentalConsentLookups\r\n\r\n| Field                           | Example         | Notes                                             | Consent Scope            |\r\n|---------------------------------|------------------|---------------------------------------------------|---------------------------|\r\n| Id                              | 2                | The ID of the consent record                      | ParentalConsents          |\r\n| ConsentDescription              | \"Data Exchange\" | The description of the consent scope provided by the MIS | ParentalConsents          |\r\n\r\n***\r\n\r\n"
      operationId: parentalconsents
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ParentalConsents
          content:
            application/json:
              schema:
                type: object
                properties:
                  ParentalConsents:
                    type: array
                    description: A JSON array of ParentalConsents
                    items:
                      $ref: "#/components/schemas/ParentalConsents"
                  ParentalConsentLookups:
                    type: array
                    description: A JSON array of ParentalConsentLookups
                    items:
                      $ref: "#/components/schemas/ParentalConsentLookups"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/PersonComms:
    get:
      tags:
      - School
      summary: PersonComms
      description: "## Endpoint Description\r\n\r\nRetrieve additional communication methods for students, staff, and contacts. Telephone, email, and mobile details will be included for home and work locations, where available from the MIS.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name    | Filter Description                                                  |\r\n|------------|----------------|--------------------------------------------------------------------|\r\n| Optional    | id             | Specify a particular person id to return records for that person. |\r\n| Optional    | CommsType      | Specify the communication method to retrieve.                     |\r\n| Optional    | LocationCode    | Specify whether you want home or work details.                    |\r\n| Optional    | Priority       | Some MIS provide priority for which method to use first; choose that here. |\r\n| Optional    | IsDefault      | Some MIS provide a default communication method to use; filter by this flag (1 or 0). |\r\n| Optional    | PersonType     | Retrieve details for a specific person type.                      |\r\n\r\n***\r\n\r\n### Types\r\n\r\n**CommsType**\r\n- **E:** Email\r\n- **T:** Telephone\r\n- **M:** Mobile\r\n\r\n**LocationCode**\r\n- **H:** Home\r\n- **W:** Work\r\n- **M:** Mobile\r\n\r\n**PersonType**\r\n- **Student:** Filter to additional communication details for students.\r\n- **Staff:** Filter to additional communication details for staff.\r\n- **Contact:** Filter to additional communication details for contacts.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\nBased on **PersonType** in the data returned, you can link to the following tables:\r\n\r\n| Endpoint                  | Primary Key                | Foreign Key             | PersonType | Related Endpoint Description           |\r\n|---------------------------|----------------------------|-------------------------|------------|---------------------------------------|\r\n| school.students            | PersonComms.PersonId      | Students.Id             | Student    | Student record information            |\r\n| school.staff               | PersonComms.PersonId      | Staff.Id                | Staff      | Staff record information              |\r\n| school.contacts            | PersonComms.PersonId      | Contacts.Id             | Contact    | Contact record information            |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\nThis endpoint and the data returned are available if your application has access to either the Staff, Student, or Contact scopes, and will provide data appropriate to the scopes you have access to.\r\n\r\n| Field                     | Example                        | Notes                                             | Consent Scope            |\r\n|---------------------------|--------------------------------|---------------------------------------------------|---------------------------|\r\n| Id                        | PC-10001.13067.T               | Crafted unique composite key                       | Staff / Student / Contact  |\r\n| PersonId                 | 10001                          | The Id of the person record                       | Staff / Student / Contact  |\r\n| PersonType               | Contact                        | The type of the person record                     | Staff / Student / Contact  |\r\n| CommsType                | T                              | The type of the comms record                      | Staff / Student / Contact  |\r\n| LocationCode             | H                              | The type of the location                          | Staff / Student / Contact  |\r\n| Priority                 | 2                              | The importance of the record                      | Staff / Student / Contact  |\r\n| IsDefault                | 1                              | Definition of whether this is the default communication device | Staff / Student / Contact  |\r\n| Value                    | 01632211143                    | The email or phone number                         | Staff / Student / Contact  |\r\n| Notes                    | null                           | Any notes relating to the number                  | Staff / Student / Contact  |\r\n| LastUpdated              | 2017-01-19T22:03:31.617       | The last time this data was updated               | Staff / Student / Contact  |\r\n| RowHash                  | 87D6ECDB0183B9F77F3AE3F9EB744E345817CA0F | For change comparison                          | Staff / Student / Contact  |\r\n\r\n***\r\n\r\n"
      operationId: PersonComms
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional contact id or student id
        required: false
        schema:
          type: string
      - name: CommsType
        in: query
        description: comms type
        required: false
        schema:
          type: string
          enum:
          - E
          - T
          - M
      - name: LocationCode
        in: query
        description: Location code
        required: false
        schema:
          type: string
          enum:
          - H
          - W
          - M
      - name: Priority
        in: query
        description: Priority filter
        required: false
        schema:
          type: string
      - name: IsDefault
        in: query
        description: Is default filter
        required: false
        schema:
          type: string
      - name: PersonType
        in: query
        description: Person  type
        required: false
        schema:
          type: string
          enum:
          - Student
          - Staff
          - Contact
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of PersonComms
          content:
            application/json:
              schema:
                type: object
                properties:
                  PersonComms:
                    type: array
                    description: A JSON array of PersonComms
                    items:
                      $ref: "#/components/schemas/PersonComms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Photos:
    get:
      tags:
      - School
      summary: Photos
      description: "## Endpoint Description\r\n\r\nPhotos for students and staff. Photos are also available directly on the Student and Staff endpoints by enabling the option to include photos.\r\n\r\n***\r\n\r\n### Options\r\n\r\n> **option** - description\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name    | Filter Description                                 |\r\n|------------|----------------|---------------------------------------------------|\r\n| Optional    | id             | Specific Id of Student or Staff record            |\r\n| Optional    | PersonType     | Filter to Staff or Student                         |\r\n\r\n***\r\n\r\n### Types\r\n\r\n**PersonType**\r\n- **Student:** Filter down to student records only.\r\n- **Staff:** Filter down to staff records only.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n> **Important:** Remember to specify the PersonType when linking to either Students or Staff endpoints to avoid overlapping Ids.\r\n\r\n| Endpoint            | Primary Key           | Foreign Key      | Related Endpoint Description         |\r\n|---------------------|-----------------------|------------------|-------------------------------------|\r\n| School.Students      | Photos.PersonId      | Students.Id      | Student record information          |\r\n| School.Staff         | Photos.PersonId      | Staff.Id         | Staff record information            |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                     | Example                     | Notes                                             | Consent Scope            |\r\n|---------------------------|-----------------------------|---------------------------------------------------|---------------------------|\r\n| Id                        | 1                           | Id of the photo                                  | Photos                    |\r\n| PersonId                 | 1                           | Id of the person                                 | Photos                    |\r\n| PersonType               | Staff                       | The type of person record                        | Photos                    |\r\n| PersonName               | Mr A Blacker               | The display name of the person                   | Photos                    |\r\n| Photo                     | /9j/4AAQSkZJR...UVoiWf/2Q== | Base64 encoded image                             | Photos                    |\r\n| LastUpdated              | 2017-01-19T22:03:31.617    | The last time this data was updated              | Photos                    |\r\n| RowHash                  | 87D6ECDB0183B9F77F3AE3F9EB744E345817CA0F | For change comparison                      | Photos                    |\r\n\r\n***\r\n\r\n"
      operationId: Photos
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional person id student or staff
        required: false
        schema:
          type: string
      - name: PersonType
        in: query
        description: Person  type
        required: false
        schema:
          type: string
          enum:
          - Student
          - Staff
      - name: updatedSince
        in: query
        description: Filter by LastUpdated greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Photos
          content:
            application/json:
              schema:
                type: object
                properties:
                  Photos:
                    type: array
                    description: A JSON array of Photos
                    items:
                      $ref: "#/components/schemas/Photos"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Post16Study:
    get:
      tags:
      - Students
      summary: Retrieve information about post 16 study.
      description: "## Endpoint Description\r\n\r\nRetrieve information about post 16 study.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                       |\r\n|------------|-------------|-----------------------------------------|\r\n| Optional    | StudentId   | Retrieve records relating to a specific student |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key                     | Foreign Key                     | Related Endpoint Description    |\r\n|-------------------------------|---------------------------------|---------------------------------|---------------------------------|\r\n| school.students                | StudentPost16Study.StudentMis_Id| Students.Mis_Id                 | Student record information      |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentPost16Study_\r\n\r\n| Field                     | Example               | Notes                                                            | Consent Scope        |\r\n|---------------------------|-----------------------|------------------------------------------------------------------|-----------------------|\r\n| Id                        | 1                     | Id of the student funding and monitoring record                  | Post16Study           |\r\n| StudentMis_Id            | 23                    | Id of the student                                               | Post16Study           |\r\n| AcademicYear             | 2018/2019             | Academic year of the record                                      | Post16Study           |\r\n| ProgrammeType             | Study Programme       | The type of post 16 study                                        | Post16Study           |\r\n| StartDate                | 2018-09-01            | Start date of the post 16 study                                  | Post16Study           |\r\n| EndDate                  | 2019-02-12            | End date of the post 16 study                                    | Post16Study           |\r\n| PlannedEnd               | 2019-03-12            | Planned end date of the post 16 study                            | Post16Study           |\r\n| Status                    | Continuing            | Status of the post 16 study                                      | Post16Study           |\r\n| Reason                    |                       | Reason for the post 16 study                                     | Post16Study           |\r\n| Traineeship              | 1                     | Flag indicating whether the post 16 study is a traineeship (boolean) | Post16Study       |\r\n| QualHours                | 600                   | Qualification hours for the post 16 study                        | Post16Study           |\r\n| NonQualHours             | 56                    | Non-qualification hours for the post 16 study                   | Post16Study           |\r\n| TotalHours               | 656                   | Total hours for the post 16 study                                | Post16Study           |\r\n| CoreAim                  |                       | Core aim of the post 16 study                                    | Post16Study           |\r\n| Notes                    |                       | Free text notes relating to the post 16 study                    | Post16Study           |\r\n\r\n#### _Post16StudyCourses_\r\n\r\n| Field                     | Example                      | Notes                                                            | Consent Scope        |\r\n|---------------------------|------------------------------|------------------------------------------------------------------|-----------------------|\r\n| Id                        | 1                            | Id of the course record                                          | Post16Study           |\r\n| CourseID                 | 2113                         | MIS Id for the course                                            | Post16Study           |\r\n| Name                      | Digital Design Core (TLevC) | Name of the course                                               | Post16Study           |\r\n| StartDate                | 2018-09-01                   | Start date of the post 16 study course                          | Post16Study           |\r\n| EndDate                  | 2019-02-12                   | End date of the post 16 study course                            | Post16Study           |\r\n| PlannedEndDate           | 2019-03-12                   | Planned end date of the post 16 study course                   | Post16Study           |\r\n| CompletionStatus         | Continuing                   | Completion Status of the post 16 study course                   | Post16Study           |\r\n| PlannedQualificationHours | 400                          | Planned qualification hours of the course                        | Post16Study           |\r\n| PlannedNonQualHours      | 300                          | Planned non-qualification hours of the course                   | Post16Study           |\r\n| QualHours                | 600                          | Qualification hours for the post 16 study                       | Post16Study           |\r\n| Subject                  | Ma                           | Subject associated with the post 16 study course                | Post16Study           |\r\n| ClassificationCode       |                              | Subject classification code associated with the post 16 study course | Post16Study      |\r\n| CoreAim                  |                              | Core aim of the post 16 study course                            | Post16Study           |\r\n\r\n***\r\n\r\n"
      operationId: Post16Study
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Post16Study
          content:
            application/json:
              schema:
                type: object
                properties:
                  Post16Study:
                    type: array
                    description: A JSON array of Post16Study
                    items:
                      $ref: "#/components/schemas/Post16Study"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/PriorAttainment:
    get:
      tags:
      - Students
      summary: Retrieval of PriorAttainment date relating to Early Years / KS1 and KS2
      description: "## Endpoint Description\r\n\r\nRetrieval of Prior Attainment date relating to Early Years / KS1 and KS2.\r\n\r\n***\r\n\r\n### Quick Links\r\n\r\n- [Related Endpoints](#Related)\r\n- [Fields by Scope](#Fields)\r\n- [Filters](#Filters)\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                                  |\r\n|------------|-------------|---------------------------------------------------------------------|\r\n| Optional    | StudentId   | Retrieve records relating to a specific student                    |\r\n| Optional    | DateFrom    | Retrieve records on or after the date specified (yyyy-mm-dd)      |\r\n| Optional    | DateTo      | Retrieve records on or before the date specified (yyyy-mm-dd)     |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                            | Primary Key                 | Foreign Key                     | Related Endpoint Description             |\r\n|-------------------------------------|-----------------------------|---------------------------------|-----------------------------------------|\r\n| school.students                     | StudentMembers.StudentId    | Students.Id                     | Retrieves details for the student      |\r\n| school.assessmentstructure          | AsmResults,AspectId        | Aspects.Id                      | Aspect for which the result relates     |\r\n| school.assessmentstructure          | AsmResults.ResultSetId      | ResultSets.Id                   | The specific resultset for which the results was recorded |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                     | Example     | Notes                                                            | Consent Scope             |\r\n|---------------------------|-------------|------------------------------------------------------------------|----------------------------|\r\n| Id                        | 1233114     | The MIS Id of the group                                          | School / SchoolLite       |\r\n| StudentId                 | 10496       | The Student ID                                                   | School / SchoolLite       |\r\n| AspectID                 | 3441        | The Aspect Id of the group                                       | School / SchoolLite       |\r\n| AspectName               | KS2-MAT-MAM-TT-NE | Aspect name of group, e.g., \"MA KS2: Maths Outcome AWL\"     | School / SchoolLite       |\r\n| ResultId                 | 1233114     | The Result ID of group                                          | Assessment results        |\r\n| ResultsetId              | 1           | The Result Set ID for this group                                | Assessment results        |\r\n| Result                    | 2A          | The Result description                                          | Assessment results        |\r\n| ResultValue              | null        | The Result value                                                | Assessment results        |\r\n\r\n***\r\n\r\n"
      operationId: PriorAttainment
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: StudentId
        in: query
        description: Optional student id
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of PriorAttainment
          content:
            application/json:
              schema:
                type: object
                properties:
                  PriorAttainment:
                    type: array
                    description: A JSON array of PriorAttainment
                    items:
                      $ref: "#/components/schemas/PriorAttainment"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/SchoolInfo:
    get:
      tags:
      - School
      summary: Retrieval of SchoolInfo
      description: "## Endpoint Description\r\n\r\nRetrieve information about the school establishment including contact and address details where available from the MIS.\r\n\r\n***\r\n\r\n### Quick Links\r\n\r\n- [Fields by Scope](#Fields)\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                     | Example                      | Notes                                                         | Consent Scope             |\r\n|---------------------------|------------------------------|---------------------------------------------------------------|----------------------------|\r\n| Id                        | 1                            | Record Id of the school (always 1)                           | School / SchoolLite       |\r\n| Name                      | Aisley Secondary              | The name of the school                                        | School / SchoolLite       |\r\n| Head                      | Adrian Blacker               | The name of the head teacher                                  | School / SchoolLite       |\r\n| MainContact               | Mr Adrian Blacker            | Full title of the head teacher                                | School / SchoolLite       |\r\n| Telephone                 | 0208851234                   | School telephone number                                       | School / SchoolLite       |\r\n| Web                       | www.aisleyschool.com         | School website address                                        | School / SchoolLite       |\r\n| Email                     | office@aisleyschool.com      | School email address                                          | School / SchoolLite       |\r\n| DeniNo                    | 328SSCO4321                  | (Northern Ireland Specific)                                   | School / SchoolLite       |\r\n| Governance                | Community                    | Type of school governance                                      | School / SchoolLite       |\r\n| Phase                     | Secondary                    | Type of school phase                                          | School / SchoolLite       |\r\n| ExamCentre                | 12348                        | School exam centre number                                     | School / SchoolLite       |\r\n| Address                   | School Road, Eduville, London| School address                                                | School / SchoolLite       |\r\n| EstabId                  | 3285502                      | The DfE establishment code for the school                     | School / SchoolLite       |\r\n\r\n***\r\n\r\n"
      operationId: SchoolInfo
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeSites
        in: query
        description: Additional result set with site information
        required: false
        schema:
          type: boolean
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of SchoolInfo
          content:
            application/json:
              schema:
                type: object
                properties:
                  SchoolInfo:
                    type: array
                    description: A JSON array of SchoolInfo
                    items:
                      $ref: "#/components/schemas/SchoolInfo"
                  Sites:
                    type: array
                    description: A JSON array of Sites
                    items:
                      $ref: "#/components/schemas/Sites"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/ScopeFields:
    get:
      tags:
      - School
      summary: Retrieval of scope fields
      description: Retrieval of scope fields
      operationId: ScopeFields
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Scope
        in: query
        description: Show fields accessible with this scope
        required: false
        schema:
          type: string
      - name: APIEndpoint
        in: query
        description: Show all fields in an endpoint
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ScopeFieldDictionary
          content:
            application/json:
              schema:
                type: object
                properties:
                  ScopeFieldDictionary:
                    type: array
                    description: A JSON array of ScopeFieldDictionary
                    items:
                      $ref: "#/components/schemas/ScopeFieldDictionary"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/SeatingPlans:
    get:
      tags:
      - School
      summary: Fetch seating plans for a group
      description: Fetch seating plans for a group
      operationId: SeatingPlans
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: GroupId
        in: query
        description: Optional GroupID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of SeatingPlan
          content:
            application/json:
              schema:
                type: object
                properties:
                  SeatingPlan:
                    type: array
                    description: A JSON array of SeatingPlan
                    items:
                      $ref: "#/components/schemas/SeatingPlan"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/SEN:
    get:
      tags:
      - Students
      summary: Special Educational Needs
      description: "## School.SEN Endpoint\r\n\r\nThe School.SEN (Special Education Needs) endpoint retrieves students with special education needs (or optionally one student) at the school for which you have requested data. We provide filters to help you determine what type of disability and what severity you are looking at.\r\n\r\n***\r\n\r\n### Quick Links\r\n\r\n- [Filters](#Filters)\r\n- [Types](#Types)\r\n- [Fields by Scope](#Fields)\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name       | Filter Description                                                    |\r\n|------------|-------------------|----------------------------------------------------------------------|\r\n| Optional    | StudentId         | Obtain SEN and disability details for a particular Student           |\r\n| Optional    | SENProvision      | Choose what type of provision is returned from StudentSENProvisionHistory type |\r\n| Optional    | SENTypeRank       | Specifies the severity of SEN Type where 1 is most severe           |\r\n| Optional    | Active            | Return currently active Types, Provisions, and Disabilities          |\r\n\r\n***\r\n\r\n### Types\r\n\r\n**Type**\r\n- **StudentSENTypeHistory:** Returns current and historical SEN types for a student.\r\n- **StudentSENProvisionHistory:** Returns current and historical SEN provisions for a student.\r\n- **StudentDisabilities:** Returns current and historical student disabilities.\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StudentSENTypeHistory_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 100                  | The MIS Id of the SEN type item                        | SENTypes                 |\r\n| StudentMis_Id            | 9999                 | The MIS Id for the Student                              | SENTypes                 |\r\n| NeedTypeDescription      | Hearing Impairment    | SEN Type description                                    | SENTypes                 |\r\n| NeedTypeCode             | HI                   | SEN Type code                                          | SENTypes                 |\r\n| Rank                      | 2                    | Rank (lowest is most severe)                           | SENTypes                 |\r\n| NeedNotes                | Has a hearing impairment | Additional notes                                      | SENTypes                 |\r\n| NeedStartDate            | 2015-01-01           | Start date                                             | SENTypes                 |\r\n| NeedEndDate              | 2016-01-01           | End date                                               | SENTypes                 |\r\n| Active                    | 0                    | Currently active flag (1/0)                            | SENTypes                 |\r\n\r\n#### _StudentSENProvisionHistory_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 9876654321987        | The MIS Id of the SEN provision item                    | SEN / SENTypes           |\r\n| StudentMis_Id            | 9999                 | The MIS Id for the Student                              | SEN / SENTypes           |\r\n| SENProvisionCode         | K                    | SEN Provision type code                                  | SEN / SENTypes           |\r\n| SENProvisionDescription   | SEN Support          | SEN Provision description                                | SEN / SENTypes           |\r\n| SENProvisionStartDate    | 2015-01-01           | Start date                                             | SEN / SENTypes           |\r\n| SENProvisionEndDate      | 2016-01-01           | End date                                               | SEN / SENTypes           |\r\n| Active                    | 0                    | Currently active flag (1/0)                            | SEN / SENTypes           |\r\n\r\n#### _StudentDisabilities_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 20                   | The MIS Id of the student disability                    | SENTypes                 |\r\n| StudentMis_Id            | 9999                 | The MIS Id for the Student                              | SENTypes                 |\r\n| Disability               | Problems with Mobility | Type of student disability                               | SENTypes                 |\r\n| DisabilityStartDate      | 2015-01-01           | Start date                                             | SENTypes                 |\r\n| DisabilityEndDate        | 2015-01-01           | End date                                               | SENTypes                 |\r\n| Active                    | 0                    | Currently active flag (1/0)                            | SENTypes                 |\r\n\r\n#### _StudentSENReviews_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 20                   | The MIS Id of SEN Review                                | SENReviews               |\r\n| StudentMis_Id            | 20                   | The MIS Id of the student that is the subject of the review | SENTypes               |\r\n| ReviewType               | Annual               | The type of review                                      | SENTypes                 |\r\n| ReviewStatus             | Planned              | The status of the review                                | SENTypes                 |\r\n| ReviewDate               | 2021-01-15           | The date of the review                                  | SENTypes                 |\r\n| SENStatus                | SEN Support          | The SEN status                                          | SENTypes                 |\r\n| Comments                  | Review to be conducted soon | Comments relating to the review                      | SENTypes                 |\r\n| SenCoordinatorName       | Mrs A Zelinskova     | Name of the SEN coordinator                             | SENTypes                 |\r\n| Roles                    | Agent,Employee,Teacher | Roles that the SEN coordinator has                     | SENTypes                 |\r\n| StaffLocalId             | PWT-14               | If the SEN coordinator is a staff member, their local id | SENTypes               |\r\n| StaffMis_Id              | 14                   | If the SEN coordinator is a staff member, their MIS id | SENTypes                 |\r\n| AgentLocalId             | PA-14                | If the SEN coordinator is an agent, their local id     | SENTypes                 |\r\n| AgentMis_id              | 14                   | If the SEN coordinator is an agent, their MIS id       | SENTypes                 |\r\n\r\n#### _SENEvents_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 20                   | The MIS Id of the SEN event                             | SENEvents                |\r\n| Student_MisId            | 2                    | The MIS Id of the student the event relates to         | SENEvents                |\r\n| EventType                | Educational Psychologist | The type of SEN event                                  | SENEvents                |\r\n| EventDate                | 2023-01-02           | The date of the SEN event                              | SENEvents                |\r\n| Comments                 |                      | Free text comments relating to the event                | SENEvents                |\r\n\r\n#### _SENEventPersons_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 1                    | Id of the relationship between SEN event and person     | SENEvents                |\r\n| SENEventsId              | 20                   | Id of the SEN event                                    | SENEvents                |\r\n| PersonName               | Mrs Ann Smith        | Name of the person                                     | SENEvents                |\r\n| Roles                    | Agent,Employee,Teacher | CSV of roles the person has                            | SENEvents                |\r\n| StaffLocalId             | PWT-20               | If the person is a member of staff, their unique local ID | SENEvents               |\r\n| StaffMis_Id              | 20                   | If the person is a member of staff, their MIS ID      | SENEvents                |\r\n| AgentLocalId             | PA-72                | If the person is an agent, their unique local ID      | SENEvents                |\r\n| AgentMis_Id              | 72                   | If the person is an agent, their MIS ID               | SENEvents                |\r\n| ContactLocalId           | PC-13                | If the person is a contact, their unique local ID     | SENEvents                |\r\n| ContactMis_Id            | 13                   | If the person is a contact, their MIS ID              | SENEvents                |\r\n\r\n#### _SENStatements_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 20                   | ID of the SEN statement                                 | SENStatements             |\r\n| StudentMis_Id            | 67                   | MIS id of the student                                   | SENStatements             |\r\n| DateRequested             | 2023-02-12           | Date the SEN statement was requested                    | SENStatements             |\r\n| ConsultationDate          | 2023-04-01           | Date of the SEN consultation                             | SENStatements             |\r\n| TemporaryDisapplicationSubjects | Dance,Drama    | Subjects that are temporarily disapplied                | SENStatements             |\r\n| PermanentDisapplicationSubjects | PE            | Subjects that are permanently disapplied                | SENStatements             |\r\n| StatutoryAssessment       | LA Agreed            | Status of the statutory assessment                       | SENStatements             |\r\n| StatementOutcome          | Proposed Statement made | Outcome of the statutory assessment                     | SENStatements             |\r\n| SubjectToTribunal        | 1                    | Flag indicating whether the statement is subject to tribunal (boolean) | SENStatements      |\r\n| AppealNotes              |                      | Free text notes relating to the appeal                  | SENStatements             |\r\n| DateCeased               | 2022-01-01           | Cease date of the statement                             | SENStatements             |\r\n| DateFinalised            | 2022-03-12           | Date Statement finalised                                | SENStatements             |\r\n| Comments                 |                      | Free text comments relating to the Statement            | SENStatements             |\r\n| LEAAgentId               | 4                    | MIS id of the Agent relating to the Statement           | SENStatements             |\r\n\r\n#### _SENStatementDocuments_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 2                    | Id of the relationship between the Statement and the document | SENStatements         |\r\n| StatementId               | 3                    | Id of the Statement                                     | SENStatements             |\r\n| DocumentId                | 7                    | Id of the document                                      | SENStatements             |\r\n\r\n#### _SENEHCPlans_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 1                    | Id of the EHCP                                         | SENEHCP                   |\r\n| StudentMis_Id            | 2                    | Id of the student the EHCP relates to                  | SENEHCP                   |\r\n| DateRequested             | 2020-01-01           | Date the EHCP was requested                             | SENEHCP                   |\r\n| ConsultationDate          | 2020-02-01           | Consultation date of the EHCP                           | SENEHCP                   |\r\n| TemporaryDisapplicationSubjects | Drama,PE    | Subjects that are temporarily disapplied                | SENEHCP                   |\r\n| PermanentDisapplicationSubjects | Dance       | Subjects that are permanently disapplied                | SENEHCP                   |\r\n| StatutoryAssessment       | LA Agreed            | Status of the statutory assessment                       | SENEHCP                   |\r\n| StatementOutcome          | Proposed statement made | Outcome of the statutory assessment                     | SENEHCP                   |\r\n| SubjectToTribunal        | 1                    | Flag indicating whether the EHCP is subject to tribunal (boolean) | SENEHCP               |\r\n| UndergoingSENDMediation   | 1                    | Flag indicating whether undergoing SEND mediation (boolean) | SENEHCP               |\r\n| AppealNotes              |                      | Free text notes relating to the appeal                  | SENEHCP                   |\r\n| DateCeased               | 2021-01-01           | Cease date of the EHCP                                  | SENEHCP                   |\r\n| DateFinalised            | 2021-01-01           | Date EHCP finalised                                     | SENEHCP                   |\r\n| Comments                 | 20                   | Free text comments relating to the EHCP                  | SENEHCP                   |\r\n\r\n#### _SENEHCPlanDocuments_ Dataset\r\n\r\n| Field                    | Example              | Notes                                                   | Consent Scope            |\r\n|---------------------------|----------------------|---------------------------------------------------------|---------------------------|\r\n| Id                        | 1                    | Id of the relationship between the plan and the document | SENEHCP                   |\r\n| SENEHCPlanId             | 3                    | Id of the plan                                         | SENEHCP                   |\r\n| DocumentId                | 6                    | Id of the document                                      | SENEHCP                   |\r\n\r\n***\r\n\r\n"
      operationId: SEN
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeSENReviews
        in: query
        description: includeSENReviews
        required: false
        schema:
          type: boolean
      - name: includeSENEvents
        in: query
        description: includeSENEvents
        required: false
        schema:
          type: boolean
      - name: includeSENStatements
        in: query
        description: includeSENStatements
        required: false
        schema:
          type: boolean
      - name: includeSENEHCP
        in: query
        description: includeSENEHCP
        required: false
        schema:
          type: boolean
      - name: StudentId
        in: query
        description: Optional Studentid
        required: false
        schema:
          type: string
      - name: SENProvision
        in: query
        description: Optional provision filter
        required: false
        schema:
          type: string
      - name: SENTypeRank
        in: query
        description: Specify type rank
        required: false
        schema:
          type: string
      - name: Active
        in: query
        description: Filter to current records
        required: false
        schema:
          type: number
          enum:
          - 0
          - 1
      - name: updatedSince
        in: query
        description: Filter by LastUpdate greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Sen
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentSENTypeHistory:
                    type: array
                    description: A JSON array of StudentSENTypeHistory
                    items:
                      $ref: "#/components/schemas/StudentSENTypeHistory"
                  StudentSENProvisionHistory:
                    type: array
                    description: A JSON array of StudentSENProvisionHistory
                    items:
                      $ref: "#/components/schemas/StudentSENProvisionHistory"
                  StudentDisabilities:
                    type: array
                    description: A JSON array of StudentDisabilities
                    items:
                      $ref: "#/components/schemas/StudentDisabilities"
                  StudentSENReviews:
                    type: array
                    description: A JSON array of StudentSENReviews
                    items:
                      $ref: "#/components/schemas/StudentSENReviews"
                  SENEvents:
                    type: array
                    description: A JSON array of SENEvents
                    items:
                      $ref: "#/components/schemas/SENEvents"
                  SENEventPersons:
                    type: array
                    description: A JSON array of SENEventPersons
                    items:
                      $ref: "#/components/schemas/SENEventPersons"
                  SENStatements:
                    type: array
                    description: A JSON array of SENStatements
                    items:
                      $ref: "#/components/schemas/SENStatements"
                  SENStatementDocuments:
                    type: array
                    description: A JSON array of SENStatementDocuments
                    items:
                      $ref: "#/components/schemas/SENStatementDocuments"
                  SENEHCP:
                    type: array
                    description: A JSON array of SENEHCP
                    items:
                      $ref: "#/components/schemas/SENEHCP"
                  SENEHCPDocuments:
                    type: array
                    description: A JSON array of SENEHCPDocuments
                    items:
                      $ref: "#/components/schemas/SENEHCPDocuments"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Staff:
    get:
      tags:
      - Staff
      summary: Staff
      description: "## School.Staff Endpoint\r\n\r\nThe School.Staff endpoint returns data on all current staff members at the school for which you have requested data. This includes teachers and non-teaching staff such as teaching support and administrators. We provide flags to help you determine what type of staff you are looking at.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includePhotos**: Set to enable the staff photo column in the result set.\r\n- **teachersOnly**: Only include members of staff where `IsTeacher = 1`.\r\n- **includeGroupIds**: Set to include CSV of GroupIds the staff member belongs to.\r\n- **includeGroupIdaasIds**: Set to include CSV of Idaas GroupIds the staff member belongs to.\r\n- **includeGroupXIDs**: Set to enable GroupXIDs column.\r\n- **includeFuture**: Set to include future staff.\r\n- **includePrevious**: Set to include staff who have left either in the current or the previous academic year.\r\n- **includeTemporary**: Set to include staff who are considered temporary. In SIMS, this means that they do not have an employment start date but they are associated with active groups.\r\n- **includeHierarchy**: Set to include staff hierarchy.\r\n- **includeStaffSWAC**: Set to include staff SWAC roles.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **id**: Optional filter to return a single staff member using their id property.\r\n- **updatedSince**: Optional filter to return records that have been updated since this value.\r\n\r\n***\r\n\r\n### Types\r\n\r\n*Details about specific types can be added here if relevant.*\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n*Details about related endpoints can be added here if relevant.*\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Staff_ Dataset\r\n\r\n| Field                     | Example                        | Notes                                                    | Consent Scope             |\r\n|---------------------------|--------------------------------|----------------------------------------------------------|----------------------------|\r\n| Id                        | 5                              | The MIS Id of the staff member                           | Staff / StaffLite         |\r\n| ExternalId                | 8ad4a7ae-aa02-49aa-8901-528d3c44bcc6 | The external Id of the staff member                 | Staff / StaffLite         |\r\n| IdaasId                   | PWT-5                          | The Idaas Id of the staff member                         | Staff / StaffLite         |\r\n| Title                     | Mr                             | Title of the staff member                                | Staff / StaffLite         |\r\n| Suffix                    | BSc                            | Suffix of the staff member                               | Staff / StaffLite         |\r\n| StaffCode                 | ML                             | Abbreviated staff code from the MIS                     | Staff / StaffLite         |\r\n| StaffStatus               | Current                        | Whether the staff member is current, previous or future  | Staff / StaffLite         |\r\n| TeacherCategory           | Qualified Teacher              | The category of teacher                                  | Staff / StaffLite         |\r\n| Forename                  | Mark                           | Forename of the staff member                             | Staff / StaffLite         |\r\n| Surname                   | Lubbock                        | Surname of the staff member                              | Staff / StaffLite         |\r\n| DisplayName               | Mr M Lubbock                  | Staff title, first initial and surname                   | Staff / StaffLite         |\r\n| IdaasEmail                | test@work.net                 | Email address provisioned by Idaas, if available        | Staff / StaffLite         |\r\n| WorkEmail                 | test@work.net                 | Work email for the staff member                          | Staff / StaffLite         |\r\n| WorkPhone                 | 02221348798                   | Work telephone for the staff member                      | Staff / StaffLite         |\r\n| IsTeacher                 | 1                              | Flag defining if the staff member is a teacher          | Staff / StaffLite         |\r\n| IsSupport                 | 0                              | Flag defining if the staff member is support staff      | Staff / StaffLite         |\r\n| IsSupply                  | 0                              | Flag defining if the staff member is supply staff       | Staff / StaffLite         |\r\n| IsGovernor                | 0                              | Flag defining if the staff member is a Governor         | Staff / StaffLite         |\r\n| RegGroup                  | 10A                            | The registration group(s) the staff member belongs to    | School GroupIds           |\r\n| GroupIds                  | 9576,9543,9555,9521           | CSV of GroupIds the staff member belongs to              | School GroupIds           |\r\n| GroupIdaasIds            | GC-9576,GC-9543,GC-9555,GC-9521| CSV of Idaas GroupIds the staff member belongs to       | School GroupIdaasIds      |\r\n| Gender                    | M                              | The gender of the staff member                           | StaffExtended             |\r\n| MiddleName                | James                          | The middle name of the staff member                      | StaffExtended             |\r\n| LegalForename             | Mark                           | The legal forename of the staff member                   | StaffExtended             |\r\n| LegalSurname              | Lubbock                        | The legal surname of the staff member                    | StaffExtended             |\r\n| DateOfBirth              | 1960-03-19                     | The date of birth of the staff member                    | StaffExtended             |\r\n| MobilePhone               | 07912345678                   | The main mobile phone of the staff member                | StaffExtended             |\r\n| PayrollNumber             | R275628                       | The payroll number of the staff member                   | StaffEmployment           |\r\n| NINumber                  | ZN248685D                     | The NI number of the staff member                        | StaffEmployment           |\r\n| TeacherNumber             | 72/10896                      | The teacher number of the staff member                   | StaffEmployment           |\r\n| EmploymentStart           | 1972-03-02                     | The employment term start date                           | StaffEmployment           |\r\n| EmploymentEnd             | null                           | The employment term end date                             | StaffEmployment           |\r\n| Roles                     | Teacher,Headteacher            | CBDS standardized list of roles associated with the staff | StaffEmployment           |\r\n| RoleCodes                 | TCHR,HDTR                     | CBDS standardized list of role codes                     | StaffEmployment           |\r\n| HomeEmail                 | marklubs@homemail.net         | The main home email address of the staff member          | StaffPersonalContact      |\r\n| HomePhone                 | 02038888888                   | The main home telephone number of the staff member       | StaffPersonalContact      |\r\n| AddressBlock              | 11\\nUpham Road\\nSwindon\\nSN3 1EE\\nUnited Kingdom | Address block data for the staff home address | StaffAddress        |\r\n| HouseNo                   | null                           | The number of the Primary Addressable Object             | StaffAddress              |\r\n| HouseName                 | Charlton House                | The name or description of the Primary Addressable Object | StaffAddress           |\r\n| Apartment                 | Flat 1                        | The number or description of the Secondary Addressable Object | StaffAddress         |\r\n| Street                    | Upham Road                    | The street name of the address                           | StaffAddress              |\r\n| District                  | null                           | The local area of the address                             | StaffAddress              |\r\n| TownOrCity                | Swindon                       | The main town or city of the address                     | StaffAddress              |\r\n| County                    | null                           | The county of the address                                | StaffAddress              |\r\n| PostCode                  | SN3 1EE                       | The post code of the address                              | StaffAddress              |\r\n| Country                   | United Kingdom                | The country of the address                                | StaffAddress              |\r\n| LastUpdated               | 2016-07-07T18:09:06.46        | The last time this data was updated                      | Staff / StaffLite        |\r\n| RowHash                   | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                                   | Staff / StaffLite        |\r\n\r\n#### _StaffHierarchy_ Dataset\r\n\r\n| Field                     | Example                        | Notes                                                    | Consent Scope             |\r\n|---------------------------|--------------------------------|----------------------------------------------------------|----------------------------|\r\n| Id                        | Man.5.7                       | The MIS Id of the staff hierarchy record                 | StaffEmployment           |\r\n| ParentStaffId             | 5                              | The MIS Id of the parent staff member                    | StaffEmployment           |\r\n| ChildStaffId              | 7                              | The MIS Id of the child staff member                     | StaffEmployment           |\r\n| ParentRelationshipTitle    | Manager                       | The relationship title of the parent staff member        | StaffEmployment           |\r\n| ChildRelationshipTitle     | Reportee                     | The relationship title of the child staff member         | StaffEmployment           |\r\n| StartDate                 | 2014-09-10                    | The start date of the hierarchy record                   | StaffEmployment           |\r\n| EndDate                   | 2020-09-10                    | The end date of the hierarchy record                     | StaffEmployment           |\r\n\r\n#### _StaffMotorVehicles_ Dataset\r\n\r\n| Field                     | Example                        | Notes                                                    | Consent Scope             |\r\n|---------------------------|--------------------------------|----------------------------------------------------------|----------------------------|\r\n| StaffId                   | 24                             | The MIS Id of the staff member                           | StaffExtended             |\r\n| VehicleID                 | 2                              | The MIS id of the vehicle                                | StaffExtended             |\r\n| VehicleModel              | Ford                           | The model of the vehicle                                 | StaffExtended             |\r\n| VehicleColour             | Red                            | The colour of the vehicle                                | StaffExtended             |\r\n| VehicleRegistration        | MR03DRM                       | The registration number of the vehicle                   | StaffExtended             |\r\n\r\n#### _StaffNextOfKin_ Dataset\r\n\r\n| Field                     | Example                        | Notes                                                    | Consent Scope             |\r\n|---------------------------|--------------------------------|----------------------------------------------------------|----------------------------|\r\n| StaffId                   | 1                              |                                                          | StaffNextOfKin            |\r\n| ContactId                 | 2                              |                                                          | StaffNextOfKin            |\r\n| StaffMis_Id               | 1                              |                                                          | StaffNextOfKin            |\r\n| ContactMis_Id             | 2                              |                                                          | StaffNextOfKin            |\r\n| FullName                  | Jane Smith                    |                                                          | StaffNextOfKin            |\r\n| Forename                  | Jane                           |                                                          | StaffNextOfKin            |\r\n| Surname                   | Smith                          |                                                          | StaffNextOfKin            |\r\n| MiddleName                | Regard                         |                                                          | StaffNextOfKin            |\r\n| Title                     | Mrs                           |                                                          | StaffNextOfKin            |\r\n| Gender                    | F                              |                                                          | StaffNextOfKin            |\r\n| Role                     |                                |                                                          | StaffNextOfKin            |\r\n| DOB                       |                                |                                                          | StaffNextOfKin            |\r\n| HomeEmail                 |                                |                                                          | StaffNextOfKin            |\r\n| WorkEmail                 |                                |                                                          | StaffNextOfKin            |\r\n| PrimaryEmail              |                                |                                                          | StaffNextOfKin            |\r\n| HomePhone                 |                                |                                                          | StaffNextOfKin            |\r\n| WorkPhone                 |                                |                                                          | StaffNextOfKin            |\r\n| MobilePhone               |                                |                                                          | StaffNextOfKin            |\r\n| HouseNumber               |                                |                                                          | StaffNextOfKin            |\r\n| HouseName                 |                                |                                                          | StaffNextOfKin            |\r\n| Apartment                 |                                |                                                          | StaffNextOfKin            |\r\n| Street                    |                                |                                                          | StaffNextOfKin            |\r\n| District                  |                                |                                                          | StaffNextOfKin            |\r\n| Town                      |                                |                                                          | StaffNextOfKin            |\r\n| County                    |                                |                                                          | StaffNextOfKin            |\r\n| Country                   |                                |                                                          | StaffNextOfKin            |\r\n| PostCode                  |                                |                                                          | StaffNextOfKin            |\r\n| AddressBlock              |                                |                                                          | StaffNextOfKin            |\r\n\r\n#### _StaffSWAC_ Dataset\r\n\r\n| Field                     | Example                        | Notes                                                    | Consent Scope             |\r\n|---------------------------|--------------------------------|----------------------------------------------------------|----------------------------|\r\n| Id                        | 1                              | Id of the staff - SWAC record                            | StaffEmployment           |\r\n| StaffMis_Id               | 26                             | MIS id of the staff member                               | StaffEmployment           |\r\n| SWACRole                  | Qualified Teacher              | SWAC role of the staff member                            | StaffEmployment           |\r\n| MainRole                  | 1                              | Whether this role is the main role for the staff member, boolean | StaffEmployment   |\r\n| FTE                       | 0.5                            | Full-time equivalent for this role                       | StaffEmployment           |\r\n\r\n***\r\n"
      operationId: Staff
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includePhotos
        in: query
        description: Set to enable the staff photo column in the result set
        required: false
        schema:
          type: boolean
      - name: includeGroupIds
        in: query
        description: Set to enable GroupIds column
        required: false
        schema:
          type: boolean
      - name: includeGroupIdaasIds
        in: query
        description: Set to enable GroupIdaasIds column
        required: false
        schema:
          type: boolean
      - name: includeGroupXIDs
        in: query
        description: Set to enable GroupXIDs column
        required: false
        schema:
          type: boolean
      - name: teachersOnly
        in: query
        description: Only include teachers in the response
        required: false
        schema:
          type: boolean
      - name: includeFuture
        in: query
        description: Set to include future staff
        required: false
        schema:
          type: boolean
      - name: includePrevious
        in: query
        description: Set to include staff who have left either in the current or the previous academic year
        required: false
        schema:
          type: boolean
      - name: includeTemporary
        in: query
        description: Set to include staff who are considered temporary
        required: false
        schema:
          type: boolean
      - name: includeHierarchy
        in: query
        description: Set to include staff hierarchy
        required: false
        schema:
          type: boolean
      - name: includeStaffVehicles
        in: query
        description: Set to include data about staff vehicle
        required: false
        schema:
          type: boolean
      - name: includeStaffNextOfKin
        in: query
        description: Set to include data about staff next of kin
        required: false
        schema:
          type: boolean
      - name: includeStaffSWAC
        in: query
        description: Set to include data about staff SWAC roles
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: staffStatus
        in: query
        description: Filter by staff status
        required: false
        schema:
          type: string
          enum:
          - Current
          - Future
          - Previous
          - Temporary
      - name: updatedSince
        in: query
        description: Filter by LastUpdate greater than this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Staff
          content:
            application/json:
              schema:
                type: object
                properties:
                  Staff:
                    type: array
                    description: A JSON array of Staff
                    items:
                      $ref: "#/components/schemas/Staff"
                  StaffHierarchy:
                    type: array
                    description: A JSON array of StaffHierarchy
                    items:
                      $ref: "#/components/schemas/StaffHierarchy"
                  StaffVehicles:
                    type: array
                    description: A JSON array of StaffVehicles
                    items:
                      $ref: "#/components/schemas/StaffVehicles"
                  StaffNextOfKin:
                    type: array
                    description: A JSON array of StaffNextOfKin
                    items:
                      $ref: "#/components/schemas/StaffNextOfKin"
                  StaffSWAC:
                    type: array
                    description: A JSON array of StaffSWAC
                    items:
                      $ref: "#/components/schemas/StaffSWAC"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffAbsence:
    get:
      tags:
      - Staff
      summary: StaffAbsence
      description: "## Endpoint Description\r\n\r\nRetrieve staff absence data.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name | Filter Description                       |\r\n|-----------|-------------|-----------------------------------------|\r\n| Optional  | FromDate    | Only return absence on or after this date.   |\r\n| Optional  | ToDate      | Only return absence on or before this date.   |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint          | Primary Key | Foreign Key                | Related Endpoint Description       |\r\n|-------------------|-------------|---------------------------|-----------------------------------|\r\n| school.staff      | Staff.Id   | StaffAbsence.StaffId      | Main endpoint for staff information|\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StaffAbsence_ Dataset\r\n\r\n| Field                       | Example                        | Notes                                                             | Consent Scope       |\r\n|-----------------------------|--------------------------------|-------------------------------------------------------------------|----------------------|\r\n| Id                          | 100                            | Primary Key                                                       | StaffAbsence         |\r\n| StaffId                    | 27                             | Foreign key references Staff endpoint                              | StaffAbsence         |\r\n| AbsenceStartDate           | 2006-06-05T00:00:00           | Start date of the absence, including time. Can be filtered on    | StaffAbsence         |\r\n| AbsenceStartTime           | 00:00                          | Start time of the absence                                         | StaffAbsence         |\r\n| AbsenceEndDate             | 2006-06-05T23:59:00           | End date of the absence, including time. Can be filtered on      | StaffAbsence         |\r\n| AbsenceEndTime             | 23:59                          | End time of the absence                                           | StaffAbsence         |\r\n| AbsenceType                | Self-certificated             | Absence type from the MIS                                         | StaffAbsence         |\r\n| IllnessCategory             | Not specified                 | Specific illness category from the MIS                             | StaffAbsence         |\r\n| WorkingDaysLost             | 1                              | Number of working days lost                                       | StaffAbsence         |\r\n| HoursLost                   | 0                              | Specific number of working hours lost                             | StaffAbsence         |\r\n| SSPExclusion                | 0                              | Statutory sick pay (1 / 0)                                       | StaffAbsence         |\r\n| AnnualLeave                 | 0                              | Counted as annual leave (1 / 0)                                  | StaffAbsence         |\r\n| IndustrialInjury            | 0                              | Marked as industrial injury (1 / 0)                               | StaffAbsence         |\r\n| PayrollAbsenceCategory      | Absent                        | Category for payroll purposes                                      | StaffAbsence         |\r\n| AuthorisedPayRate           | Full Pay Rate                | Pay rate determined for absence period                            | StaffAbsence         |\r\n| AbsenceNote                 | Please review in future       | Additional description for the absence                            | StaffAbsence         |\r\n\r\n#### _AbsenceCertificate_ Dataset\r\n\r\n| Field                       | Example                        | Notes                                                             | Consent Scope       |\r\n|-----------------------------|--------------------------------|-------------------------------------------------------------------|----------------------|\r\n| Id                          | 86                             | Primary key                                                       | StaffAbsence         |\r\n| AbsenceId                  | 108                            | Foreign key references StaffAbsence                                | StaffAbsence         |\r\n| CertDateReceived            | 2006-05-16T00:00:00           | Date the certificate was received                                  | StaffAbsence         |\r\n| CertDateSigned              | 2006-05-16T00:00:00           | Date the certificate was signed                                    | StaffAbsence         |\r\n| CertCertType                | Refrain from Work             | Certificate type from the MIS                                      | StaffAbsence         |\r\n| CertSignedBy                | Self                           | Certificate signed by lookup from the MIS                          | StaffAbsence         |\r\n| CertSignatoryType           | Self                           | Signatory type from the MIS                                       | StaffAbsence         |\r\n\r\n***\r\n"
      operationId: StaffAbsence
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: FromDate
        in: query
        description: Only return absence on or after this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: ToDate
        in: query
        description: Only return absence aon or before this date
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffAbsence
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffAbsence:
                    type: array
                    description: A JSON array of StaffAbsence
                    items:
                      $ref: "#/components/schemas/StaffAbsence"
                  AbsenceCertificate:
                    type: array
                    description: A JSON array of AbsenceCertificate
                    items:
                      $ref: "#/components/schemas/AbsenceCertificate"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffChecks:
    get:
      tags:
      - Staff
      summary: StaffChecks
      description: "## School.StaffChecks Endpoint\r\n\r\nThe School.StaffChecks endpoint returns information about checks conducted on staff. An optional StaffId can be used to filter to a single staff member.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeFuture**: Set to include records for future staff.\r\n- **includePrevious**: Set to include records for previous staff from either the current or the previous academic year.\r\n- **includeTemporary**: Set to include records for temporary staff.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **staffId**: Optional filter to return details for a single staff member.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint          | Primary Key | Foreign Key                | Related Endpoint Description       |\r\n|-------------------|-------------|---------------------------|-----------------------------------|\r\n| school.staff      | Staff.Id   | StaffChecks.StaffMis_Id   | Main endpoint for staff information|\r\n| school.staff      | Staff.IdaasId | StaffChecks.StaffLocalId  | Main endpoint for staff information|\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StaffChecks_ Dataset\r\n\r\n| Field                       | Example                        | Notes                                                             | Consent Scope       |\r\n|-----------------------------|--------------------------------|-------------------------------------------------------------------|----------------------|\r\n| Id                          | 5                              | The unique id of the check                                         | StaffChecks          |\r\n| StaffMis_Id                | 761                            | The MIS Id of the staff member                                     | StaffChecks          |\r\n| StaffLocalId               | PWT-761                        | The local Id of the staff member                                   | StaffChecks          |\r\n| CheckCode                  | DBS                            | The code of the check type                                         | StaffChecks          |\r\n| CheckDescription            | DBS Check                      | The description of the check type                                  | StaffChecks          |\r\n| RequestDate                | 2019-07-09                     | The date the check was requested                                   | StaffChecks          |\r\n| ClearanceDate              | 2019-07-09                     | The date the check cleared                                         | StaffChecks          |\r\n| ClearanceLevel             | Enhanced Clearance              | The level of the check clearance                                   | StaffChecks          |\r\n| ExpiryDate                 | 2021-07-09                     | The date the check expires                                         | StaffChecks          |\r\n| ReferenceNumber             | 09866091                       | The check reference number                                         | StaffChecks          |\r\n| DocumentNumber              | 001287901123                   | The contract weeks per year                                       | StaffChecks          |\r\n| AuthenticatedBy            | Head Teacher                   | Reference to the person who authenticated the check                | StaffChecks          |\r\n| LastUpdated                | 2016-07-07T18:09:06.46        | The last time this data was updated                                | StaffChecks          |\r\n| RowHash                    | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                                   | StaffChecks          |\r\n\r\n***\r\n"
      operationId: StaffChecks
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeFuture
        in: query
        description: Set to include future staff
        required: false
        schema:
          type: boolean
      - name: includePrevious
        in: query
        description: Set to include staff who have left either in the current or the previous academic year
        required: false
        schema:
          type: boolean
      - name: includeTemporary
        in: query
        description: Set to include staff who are considered temporary
        required: false
        schema:
          type: boolean
      - name: StaffId
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffChecks
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffChecks:
                    type: array
                    description: A JSON array of StaffChecks
                    items:
                      $ref: "#/components/schemas/StaffChecks"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffContracts:
    get:
      tags:
      - Staff
      summary: StaffContracts
      description: "## School.StaffContracts Endpoint\r\n\r\nThe School.StaffContracts endpoint returns contract and role information for current staff members. An optional StaffId can be used to filter to a single staff member.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeStaffSalaries**: Set to include information about staff salaries.\r\n- **includeStaffScales**: Set to include information about staff scales.\r\n- **includeStaffAllowances**: Set to include information about staff allowances.\r\n- **includeFuture**: Set to include future contracts.\r\n- **includePrevious**: Set to include previous contracts from either the current or the previous academic year.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **staffId**: Optional filter to return contract and role information for a single staff member.\r\n\r\n***\r\n\r\n### Types\r\n\r\n*Details about specific types can be added here if relevant.*\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n*Details about related endpoints can be added here if relevant.*\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StaffContracts_ Dataset\r\n\r\n| Field                                   | Example         | Notes                                                       | Consent Scope       |\r\n|-----------------------------------------|------------------|-------------------------------------------------------------|----------------------|\r\n| Id                                      | 5                | The MIS Id of the contract                                   | StaffContractual     |\r\n| StaffId                                 | 761              | The MIS Id of the staff member                               | StaffContractual     |\r\n| EmploymentType                          | Permanent        | The employment type of the contract                          | StaffContractual     |\r\n| ServiceTerm                             | Leadership       | The contract service term                                    | StaffContractual     |\r\n| Post                                    | Assistant Head   | The contract post                                           | StaffContractual     |\r\n| PostCategory                            | Assistant Head   | The contract post category                                   | StaffContractual     |\r\n| StdPostCode                             | AHT              | Standardised contract post code                              | StaffContractual     |\r\n| StdPostName                             | Assistant Head Teacher | Standardised contract post name                          | StaffContractual     |\r\n| ContractStartDate                       | 2016-01-26      | The contract start date                                      | StaffContractual     |\r\n| ContractEndDate                         | 2016-01-26      | The contract end date                                        | StaffContractual     |\r\n| ContractHoursPerWeek                    | 35               | The contract hours per week                                  | StaffContractual     |\r\n| ContractWeeksPerYear                    | 38.2             | The contract weeks per year                                  | StaffContractual     |\r\n| ContractFTE                             | 0.9              | The contract full time equivalent                            | StaffContractual     |\r\n| PayrollNumber                           | PR577326         | The contract / payroll number                                 | StaffContractual     |\r\n| PayFactor                               | 1.0              | The pay factor                                              | StaffContractual     |\r\n| Salary                                  | 16491.5          | The salary for the contract                                  | StaffContractual     |\r\n| SalaryFTE                              | 16491.5          | The full time equivalent salary for the contract            | StaffContractual     |\r\n| TotalPay                                | 0.9              | The total pay for the contract                               | StaffContractual     |\r\n| LastPayReview                           | 2017-01-23       | The date of the latest pay review                            | StaffContractual     |\r\n| PensionType                             | 0.9              | The pension type or superannuation for the contract         | StaffContractual     |\r\n| LastUpdated                             | 2016-07-07T18:09:06.46 | The last time this data was updated                      | StaffContractual     |\r\n| RowHash                                 | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                                   | StaffContractual     |\r\n\r\n#### _StaffRoles_ Dataset\r\n\r\n| Field                                   | Example         | Notes                                                       | Consent Scope       |\r\n|-----------------------------------------|------------------|-------------------------------------------------------------|----------------------|\r\n| Id                                      | 5                | The MIS Id of the contract role                             | StaffContractual     |\r\n| ContractId                              | 761              | The Id of the contract                                      | StaffContractual     |\r\n| Role                                    | Assistant Head   | The role name                                              | StaffContractual     |\r\n| RoleStartDate                          | 2016-01-26      | The role start date                                        | StaffContractual     |\r\n| RoleEndDate                            | 2016-01-26      | The role end date                                          | StaffContractual     |\r\n| LastUpdated                             | 2016-07-07T18:09:06.46 | The last time this data was updated                      | StaffContractual     |\r\n| RowHash                                 | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                                   | StaffContractual     |\r\n\r\n#### _StaffScales_ Dataset\r\n\r\n| Field                                   | Example         | Notes                                                       | Consent Scope       |\r\n|-----------------------------------------|------------------|-------------------------------------------------------------|----------------------|\r\n| Id                                      | 5                | The MIS Id of the contract scale                            | StaffContractual     |\r\n| ContractId                              | 761              | The Id of the contract                                      | StaffContractual     |\r\n| StartDate                               | 2016-01-26      | The scale start date                                        | StaffContractual     |\r\n| EndDate                                 | 2016-01-26      | The scale end date                                          | StaffContractual     |\r\n| ScalePoint                              | 6.2              | The scale point                                            | StaffContractual     |\r\n| PayScale                                | Teachers Main Scale | The name of the pay scale                                  | StaffContractual     |\r\n| PayScaleCode                            | TMS              | The code of the pay scale                                   | StaffContractual     |\r\n| MinimumAmount                           | 38984.5          | The minimum amount for the pay scale                        | StaffContractual     |\r\n| MaximumAmount                           | 59264.5          | The maximum amount for the pay scale                        | StaffContractual     |\r\n\r\n#### _StaffAllowances_ Dataset\r\n\r\n| Field                                   | Example         | Notes                                                       | Consent Scope       |\r\n|-----------------------------------------|------------------|-------------------------------------------------------------|----------------------|\r\n| Id                                      | 5                | The MIS Id of the contract allowance                        | StaffContractual     |\r\n| ContractId                              | 761              | The Id of the contract                                      | StaffContractual     |\r\n| StartDate                               | 2016-01-26      | The allowance start date                                    | StaffContractual     |\r\n| EndDate                                 | 2016-01-26      | The allowance end date                                      | StaffContractual     |\r\n| Amount                                  | 6450.5           | The allowance amount                                        | StaffContractual     |\r\n| Type                                    | Permanent        | The allowance type                                          | StaffContractual     |\r\n| Description                             | Teacher Learning 2C | The allowance description                                   | StaffContractual     |\r\n| Code                                    | TL2C             | The allowance code                                          | StaffContractual     |\r\n| Reason                                  | None given       | The allowance reason                                        | StaffContractual     |\r\n\r\n***\r\n"
      operationId: StaffContracts
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeStaffSalaries
        in: query
        description: Includes salary information in the StaffContracts table.
        required: false
        schema:
          type: boolean
      - name: includeStaffScales
        in: query
        description: Includes information about pay scales in the StaffScales table.
        required: false
        schema:
          type: boolean
      - name: includeStaffAllowances
        in: query
        description: Includes information about allowances in the StaffAllowances table.
        required: false
        schema:
          type: boolean
      - name: includeFuture
        in: query
        description: Set to include future staff
        required: false
        schema:
          type: boolean
      - name: includePrevious
        in: query
        description: Set to include staff who have left either in the current or the previous academic year
        required: false
        schema:
          type: boolean
      - name: StaffId
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffContracts
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffContracts:
                    type: array
                    description: A JSON array of StaffContracts
                    items:
                      $ref: "#/components/schemas/StaffContracts"
                  StaffRoles:
                    type: array
                    description: A JSON array of StaffRoles
                    items:
                      $ref: "#/components/schemas/StaffRoles"
                  StaffScales:
                    type: array
                    description: A JSON array of StaffScales
                    items:
                      $ref: "#/components/schemas/StaffScales"
                  StaffAllowances:
                    type: array
                    description: A JSON array of StaffAllowances
                    items:
                      $ref: "#/components/schemas/StaffAllowances"
                  StaffWorkingPatterns:
                    type: array
                    description: A JSON array of StaffWorkingPatterns
                    items:
                      $ref: "#/components/schemas/StaffWorkingPatterns"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffLinkedDocuments:
    get:
      tags:
      - Staff
      summary: StaffLinkedDocuments
      description: "## Endpoint Description\r\n\r\nRetrieves a list of staff linked documents and their attachments. The Document Type Name is a required parameter and can be retrieved from the LinkedDocumentTypes endpoint. Because the filesize of the attachments is potentially large, StaffId, DateFrom, and DateTo are also required parameters. If you require many attachments, please make multiple requests.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name        | Filter Description                                                                 |\r\n|-----------|---------------------|------------------------------------------------------------------------------------|\r\n| Mandatory  | DocumentTypeName    | Request linked documents for a single document type.                               |\r\n| Mandatory  | StaffIds            | Request linked documents for a specific set of staff (comma-separated).           |\r\n| Mandatory  | DateFrom            | Request linked documents for a specific date range. This is highly recommended when there are a lot of documents. |\r\n| Mandatory  | DateTo              | Request linked documents for a specific date range. This is highly recommended when there are a lot of documents. |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                                  | Primary Key                                 | Foreign Key                                  | Related Endpoint Description     |\r\n|-------------------------------------------|---------------------------------------------|---------------------------------------------|----------------------------------|\r\n| school.linkeddocumenttypes                | DocumentAttachments.DocumentTypeName        | DocumentTypes.DocumentTypeName              | Linked document types            |\r\n| school.staff                              | DocumentAttachments.StaffId                 | Staff.Id                                   | Staff                            |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _DocumentAttachments_ Dataset\r\n\r\nPublic documents and their attachments for the chosen document type.\r\n\r\n| Field                          | Example               | Notes                                              | Consent Scope        |\r\n|--------------------------------|-----------------------|----------------------------------------------------|-----------------------|\r\n| Id                             | 32                    | Id of the linked document                          | StaffFreeText        |\r\n| StaffId                        | 6574                  | Id of the associated staff                         | StaffFreeText        |\r\n| FileName                       | Photo1.jpg.gz        | Name of the file                                   | StaffFreeText        |\r\n| DocumentTypeName               | General Document      | The document type name                             | StaffFreeText        |\r\n| Size                           | 65616                 | Original size of the attachment (bytes)           | StaffFreeText        |\r\n| CompressedSize                 | 59833                 | Compressed size of the attachment (bytes)         | StaffFreeText        |\r\n| Attachment                     |                       | The document attachment (binary)                   | StaffFreeText        |\r\n| Summary                        | Approach to Class (02/11/2017) | Summary of the document contents                | StaffFreeText        |\r\n| LastModified                   | 2017-11-23            | Date the document was last modified (yyyy-MM-dd) | StaffFreeText        |\r\n\r\n***\r\n"
      operationId: StaffLinkedDocuments
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DocumentTypeId
        in: query
        description: Mandatory document type id
        required: true
        schema:
          type: string
      - name: StaffIds
        in: query
        description: Mandatory CSV of staff ids
        required: true
        schema:
          type: string
          format: CSV
      - name: DateFrom
        in: query
        description: Mandatory start date
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: Mandatory end date
        required: true
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of DocumentAttachments
          content:
            application/json:
              schema:
                type: object
                properties:
                  DocumentAttachments:
                    type: array
                    description: A JSON array of DocumentAttachments
                    items:
                      $ref: "#/components/schemas/DocumentAttachments"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffImpairments:
    get:
      tags:
      - Staff
      summary: StaffImpairments
      description: Staff Impairments
      operationId: StaffImpairments
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffImpairments
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffImpairments:
                    type: array
                    description: A JSON array of StaffImpairments
                    items:
                      $ref: "#/components/schemas/StaffImpairments"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffQualifications:
    get:
      tags:
      - Staff
      summary: StaffQualifications
      description: "## School.StaffQualifications Endpoint\r\n\r\nThe School.StaffQualifications endpoint returns information about staff qualifications. An optional StaffId can be used to filter to a single staff member.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeFuture**: Set to include records for future staff.\r\n- **includePrevious**: Set to include records for previous staff from either the current or the previous academic year.\r\n- **includeTemporary**: Set to include records for temporary staff.\r\n\r\n***\r\n\r\n### Filters\r\n\r\n- **staffId**: Optional filter to return details for a single staff member.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint          | Primary Key | Foreign Key                | Related Endpoint Description       |\r\n|-------------------|-------------|---------------------------|-----------------------------------|\r\n| school.staff      | Staff.Id   | StaffChecks.StaffMis_Id   | Main endpoint for staff information|\r\n| school.staff      | Staff.IdaasId | StaffChecks.StaffLocalId  | Main endpoint for staff information|\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _StaffQualifications_ Dataset\r\n\r\n| Field                       | Example                        | Notes                                                     | Consent Scope       |\r\n|-----------------------------|--------------------------------|-----------------------------------------------------------|----------------------|\r\n| Id                          | 5                              | The unique id of the qualification                         | StaffQualifications   |\r\n| StaffMis_Id                | 761                            | The MIS Id of the staff member                             | StaffQualifications   |\r\n| StaffLocalId               | PWT-761                        | The local Id of the staff member                           | StaffQualifications   |\r\n| QualificationName          | BA                             | The name of the qualification                              | StaffQualifications   |\r\n| QualificationDescription     | Bachelor of Arts               | The qualification description                              | StaffQualifications   |\r\n| DateAwarded                | 2019-04-05                     | The date the qualification was awarded                     | StaffQualifications   |\r\n| QualificationLevel         | Other First Degree or equivalent | The level of the qualification                            | StaffQualifications   |\r\n| FirstSubject               | French studies - R100          | The first subject of the qualification                     | StaffQualifications   |\r\n| SecondSubject              | Fine art - W100                | The second subject of the qualification                    | StaffQualifications   |\r\n| DegreeClass                | Lower second class honours      | The qualification degree class                             | StaffQualifications   |\r\n| OriginCountry              | British                        | The qualification origin country                           | StaffQualifications   |\r\n| Verified                   | 1                              | Whether the qualification has been verified (1 or 0)     | StaffQualifications   |\r\n| LastUpdated                | 2016-07-07T18:09:06.46        | The last time this data was updated                        | StaffQualifications   |\r\n| RowHash                    | 88DE1756AB2FA02D445B37CFC22DE2827925CA38 | For change comparison                                 | StaffQualifications   |\r\n\r\n***\r\n"
      operationId: StaffQualifications
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeFuture
        in: query
        description: Set to include future staff
        required: false
        schema:
          type: boolean
      - name: includePrevious
        in: query
        description: Set to include staff who have left either in the current or the previous academic year
        required: false
        schema:
          type: boolean
      - name: includeTemporary
        in: query
        description: Set to include staff who are considered temporary
        required: false
        schema:
          type: boolean
      - name: StaffId
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffQualifications
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffQualifications:
                    type: array
                    description: A JSON array of StaffQualifications
                    items:
                      $ref: "#/components/schemas/StaffQualifications"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StaffTraining:
    get:
      tags:
      - Staff
      summary: StaffTraining
      description: Staff training
      operationId: StaffTraining
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Id
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffTraining
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffTraining:
                    type: array
                    description: A JSON array of StaffTraining
                    items:
                      $ref: "#/components/schemas/StaffTraining"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/staffuserdefinedfields:
    get:
      tags:
      - Staff
      summary: staffuserdefinedfields
      description: "## Endpoint Description\r\n\r\nRetrieve User Defined Field values for staff. Use the UserDefinedFields endpoint to get a list of fields for use with this endpoint.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name | Filter Description                                      |\r\n|-----------|-------------|--------------------------------------------------------|\r\n| **Mandatory** | UDFName     | CSV of UDF Names to retrieve.                          |\r\n| Optional   | StaffId     | Filter to a specific staff member.                    |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                             | Primary Key                          | Foreign Key                  | Related Endpoint Description |\r\n|--------------------------------------|--------------------------------------|------------------------------|-------------------------------|\r\n| school.userdefinedfields             | StaffUDFs.UDFName                   | UDFs.UDFName                | UDF Names                     |\r\n| school.Staff                         | StaffUDFs.StaffId                   | Staff.Id                    | Main staff record             |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field        | Example      | Notes                            | Consent Scope          |\r\n|--------------|--------------|----------------------------------|-------------------------|\r\n| Id           | 11242        | Id of UDF / Stafflink           | StaffFreeText          |\r\n| StaffId      | 9919         | Staff Id                        | StaffFreeText          |\r\n| UDFName      | Locker Number | Name of UDF                    | StaffFreeText          |\r\n| UDFValue     | 120          | Value of the UDF                | StaffFreeText          |\r\n\r\n***\r\n"
      operationId: staffuserdefinedfields
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: Id
        in: query
        description: Optional staff ID
        required: false
        schema:
          type: string
      - name: UDFName
        in: query
        description: Mandatory CSV of UDF values to return
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of StaffUDFs
          content:
            application/json:
              schema:
                type: object
                properties:
                  StaffUDFs:
                    type: array
                    description: A JSON array of StaffUDFs
                    items:
                      $ref: "#/components/schemas/StaffUDFs"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/tags:
    get:
      tags:
      - School
      summary: Tags
      description: Tags
      operationId: Tags
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Tags
          content:
            application/json:
              schema:
                type: object
                properties:
                  Tags:
                    type: array
                    description: A JSON array of Tags
                    items:
                      $ref: "#/components/schemas/Tags"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/testerror:
    get:
      tags:
      - School
      summary: testerror
      description: Returns an error for testing purposes
      operationId: testerror
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  Message:
                    type: string
                  ExceptionType:
                    type: string
                  ExceptionMessage:
                    type: string
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/Timetable:
    get:
      tags:
      - Timetable
      summary: Timetable
      description: "## Endpoint Description\r\n\r\nThis endpoint returns structural timetable information to allow you to build a view of the timetables, lessons, staff, and physical locations being used in the school day-to-day. The endpoint will return an empty set unless at least one of the options below are selected.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeLessons**: Return the list of lesson definitions.\r\n- **includeLessonStaff**: Return the list of staff linked to timetabled lessons.\r\n- **includeLessonRooms**: Return the list of rooms to which the timetabled lessons are allocated.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                               |\r\n|------------|-------------|-----------------------------------------------------------------|\r\n| **Optional** | DateFrom   | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to one week before the current date. |\r\n| **Optional** | DateTo     | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to two weeks from the current date. |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key              | Foreign Key                 | Related Endpoint Description       |\r\n|--------------------------------|-------------------------|-----------------------------|------------------------------------|\r\n| school.staff                    | LessonStaff.StaffId     | Staff.Id                    | Staff member details               |\r\n| school.groups                   | Lessons.ClassId         | Groups.Id                   | Group definitions                   |\r\n| school.groups                   | Lessons.ClassId         | StudentMembers.StudentId     | Student group memberships           |\r\n| POST.LessonAttendance           | Lessons.PeriodId        | Marks.InstanceId            | Lesson attendance writeback         |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Lessons_\r\n\r\n| Field                | Example                         | Notes                                               | Consent Scope          |\r\n|----------------------|---------------------------------|-----------------------------------------------------|-------------------------|\r\n| Id                   | 81                              | Id of the specific lesson                            | School                  |\r\n| PeriodId             | 46297                           | Id of this specific instance                         | School                  |\r\n| ClassId              | 9929                            | Id of the group taught in this lesson                | School                  |\r\n| JoinedId             | 82                              | Id of subsequent lesson in double period            | School                  |\r\n| ClassName            | 7A\\Hi                          | Name of the group taught in this lesson              | School                  |\r\n| Period               | Mon:3                          | The occurrence in the cycle                          | School                  |\r\n| StartDateTime        | 2016-11-28T11:35:00            | Specific start date and time                         | School                  |\r\n| EndDateTime          | 2016-11-28T12:35:00            | Specific end date and time                           | School                  |\r\n| StaffCodes           | BPA,ABA                        | Staff short codes for display                         | School                  |\r\n| RoomCodes            | H3                              | Room codes for display                                | School                  |\r\n| SubjectCode          | Hi                              | Subject code for display                              | School                  |\r\n| SubjectName          | History                         | Full subject name                                    | School                  |\r\n\r\n#### _LessonStaff_\r\n\r\n| Field                | Example                         | Notes                                               | Consent Scope          |\r\n|----------------------|---------------------------------|-----------------------------------------------------|-------------------------|\r\n| Id                   | 576.1                           | Unique Id for changesets                            | School                  |\r\n| LessonId             | 81                              | Id of the related lesson                            | School                  |\r\n| StaffId              | 1                               | Id of the staff member                              | School                  |\r\n| StaffCode            | ABA                             | Short code for the staff member                    | School                  |\r\n\r\n#### _LessonRooms_\r\n\r\n| Field                | Example                         | Notes                                               | Consent Scope          |\r\n|----------------------|---------------------------------|-----------------------------------------------------|-------------------------|\r\n| Id                   | 576.24                          | Unique Id for changesets                            | School                  |\r\n| LessonId             | 81                              | Id of the related lesson                            | School                  |\r\n| RoomId               | 24                              | Id of the Room                                     | School                  |\r\n| Code                 | H3                              | Short code for the staff member                    | School                  |\r\n\r\n***\r\n"
      operationId: Timetable
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: includeLessons
        in: query
        description: IncludeLessons
        required: false
        schema:
          type: boolean
      - name: includeLessonStaff
        in: query
        description: includeLessonStaff
        required: false
        schema:
          type: boolean
      - name: includeLessonRooms
        in: query
        description: includeLessonRooms
        required: false
        schema:
          type: boolean
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Timetable
          content:
            application/json:
              schema:
                type: object
                properties:
                  Lessons:
                    type: array
                    description: A JSON array of Lessons
                    items:
                      $ref: "#/components/schemas/Lessons"
                  LessonStaff:
                    type: array
                    description: A JSON array of LessonStaff
                    items:
                      $ref: "#/components/schemas/LessonStaff"
                  LessonRooms:
                    type: array
                    description: A JSON array of LessonRooms
                    items:
                      $ref: "#/components/schemas/LessonRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/TimetableForGroup:
    get:
      tags:
      - Timetable
      summary: Timetable for Group
      description: "Return the timetable for a group, with optional date range. You must specify the groupId which can be obtained from the school.groups endpoint."
      operationId: TimetableForGroup
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: bypassDateFilter
        in: query
        description: Set to return all dates in the dataset
        required: false
        schema:
          type: boolean
      - name: includeTTStructure
        in: query
        description: "Include Timetables,TimetableDays and TimetablePeriods in the result set"
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Group id
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Timetable#
          content:
            application/json:
              schema:
                type: object
                properties:
                  Lessons:
                    type: array
                    description: A JSON array of Lessons
                    items:
                      $ref: "#/components/schemas/Lessons"
                  LessonStaff:
                    type: array
                    description: A JSON array of LessonStaff
                    items:
                      $ref: "#/components/schemas/LessonStaff"
                  LessonRooms:
                    type: array
                    description: A JSON array of LessonRooms
                    items:
                      $ref: "#/components/schemas/LessonRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/TimetableForStaff:
    get:
      tags:
      - Timetable
      summary: Timetable for Staff
      description: "## Endpoint Description\r\n\r\nAccess timetable data for today or a date range for a specific member of staff with summary data pre-collated for fast display of timetable information. Timetable data is collected and cached for a minimum of the current week and a maximum of two weeks including the current week.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                                |\r\n|------------|-------------|------------------------------------------------------------------|\r\n| **Mandatory** | Id          | Id of staff member                                             |\r\n| **Optional** | From        | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to one week before the current date. |\r\n| **Optional** | To          | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to two weeks from the current date. |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key              | Foreign Key            | Related Endpoint Description       |\r\n|--------------------------------|-------------------------|------------------------|------------------------------------|\r\n| School.Groups                   | Timetable.ClassId       | Group.Id               | Group definitions and details      |\r\n| POST.LessonAttendance           | Timetable.Id            | Marks.InstanceId       | Writeback endpoint for lesson attendance |\r\n| School.Timetable                | Timetable.Id            | Lesson.PeriodId        | School timetable definitions        |\r\n| School.TimetableStructure       | Timetable.Id            | TTPeriods.Id           | Timetable structure details        |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field               | Example                         | Notes                                               | Consent Scope          |\r\n|---------------------|---------------------------------|-----------------------------------------------------|-------------------------|\r\n| Id                  | 44901                           | Instance Id of this specific lesson                  | School                  |\r\n| LessonId            | 2872                            | Id of this lesson in the timetable cycle             | School                  |\r\n| JoinedId            | 2873                            | Id of subsequent period if following period is part of a double lesson | School                  |\r\n| PeriodId            | 44902                           | Instance Id of this specific lesson                  | School                  |\r\n| ClassId             | 9644                            | Id of the group for this lesson                      | School                  |\r\n| Period              | Thu:1                          | Display name of the timetable period                 | School                  |\r\n| Date                | 2017-05-11T00:00:00            | Date this lesson occurs                              | School                  |\r\n| StartDateTime       | 2017-05-11T09:15:00            | Specific date and start time for this lesson        | School                  |\r\n| EndDateTime         | 2017-05-11T10:15:00            | Specific date and end time for this lesson          | School                  |\r\n| ClassName           | 12V1/Hb1                       | Display name of the group being taught              | School                  |\r\n| RoomCodes           | SAL                             | Display names of rooms where this lesson is being taught | School                  |\r\n| StaffCodes          | JXE                             | Display codes for the staff teaching this lesson     | School                  |\r\n| SubjectCode         | Hb                              | Display code for the subject of the lesson being taught | School                  |\r\n| SubjectName         | Hair & Beauty                  | Display name for the subject of the lesson being taught | School                  |\r\n\r\n***\r\n"
      operationId: TimetableForStaff
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: bypassDateFilter
        in: query
        description: Set to return all dates in the dataset
        required: false
        schema:
          type: boolean
      - name: includeTTStructure
        in: query
        description: "Include Timetables,TimetableDays and TimetablePeriods in the result set"
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Group id
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Timetable#
          content:
            application/json:
              schema:
                type: object
                properties:
                  Lessons:
                    type: array
                    description: A JSON array of Lessons
                    items:
                      $ref: "#/components/schemas/Lessons"
                  LessonStaff:
                    type: array
                    description: A JSON array of LessonStaff
                    items:
                      $ref: "#/components/schemas/LessonStaff"
                  LessonRooms:
                    type: array
                    description: A JSON array of LessonRooms
                    items:
                      $ref: "#/components/schemas/LessonRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/TimetableForStudent:
    get:
      tags:
      - Timetable
      summary: Timetable for Student
      description: "## Endpoint Description\r\n\r\nAccess timetable data for today or a date range for a specific student with summary data pre-collated for fast display of timetable information. Timetable data is collected and cached for a minimum of the current week and a maximum of two weeks including the current week.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required?  | Filter Name | Filter Description                                               |\r\n|------------|-------------|-----------------------------------------------------------------|\r\n| **Mandatory** | Id          | Id of student                                               |\r\n| **Optional** | From        | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to one week before the current date. |\r\n| **Optional** | To          | The date requested for which to return timetable data. Format \"yyyy-mm-dd\". If left blank, this is set to two weeks from the current date. |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                       | Primary Key              | Foreign Key            | Related Endpoint Description       |\r\n|--------------------------------|-------------------------|------------------------|------------------------------------|\r\n| School.Groups                   | Timetable.ClassId       | Group.Id               | Group definitions and details      |\r\n| POST.LessonAttendance           | Timetable.Id            | Marks.InstanceId       | Writeback endpoint for lesson attendance |\r\n| School.Timetable                | Timetable.Id            | Lesson.PeriodId        | School timetable definitions        |\r\n| School.TimetableStructure       | Timetable.Id            | TTPeriods.Id           | Timetable structure details        |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field               | Example                         | Notes                                               | Consent Scope          |\r\n|---------------------|---------------------------------|-----------------------------------------------------|-------------------------|\r\n| Id                  | 44901                           | Instance Id of this specific lesson                  | School                  |\r\n| LessonId            | 2872                            | Id of this lesson in the timetable cycle             | School                  |\r\n| JoinedId            | 2873                            | Id of subsequent period if following period is part of a double lesson | School                  |\r\n| PeriodId            | 44901                           | Instance Id of this specific lesson                  | School                  |\r\n| ClassId             | 9644                            | Id of the group for this lesson                      | School                  |\r\n| Period              | Thu:1                          | Display name of the timetable period                 | School                  |\r\n| Date                | 2017-05-11T00:00:00            | Date this lesson occurs                              | School                  |\r\n| StartDateTime       | 2017-05-11T09:15:00            | Specific date and start time for this lesson        | School                  |\r\n| EndDateTime         | 2017-05-11T10:15:00            | Specific date and end time for this lesson          | School                  |\r\n| ClassName           | 12V1/Hb1                       | Display name of the group being taught              | School                  |\r\n| RoomCodes           | SAL                             | Display names of rooms where this lesson is being taught | School                  |\r\n| StaffCodes          | JXE                             | Display codes for the staff teaching this lesson     | School                  |\r\n| SubjectCode         | Hb                              | Display code for the subject of the lesson being taught | School                  |\r\n| SubjectName         | Hair & Beauty                  | Display name for the subject of the lesson being taught | School                  |\r\n\r\n***\r\n"
      operationId: TimetableForStudent
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: bypassDateFilter
        in: query
        description: Set to return all dates in the dataset
        required: false
        schema:
          type: boolean
      - name: includeTTStructure
        in: query
        description: "Include Timetables,TimetableDays and TimetablePeriods in the result set"
        required: false
        schema:
          type: boolean
      - name: id
        in: query
        description: Group id
        required: false
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Timetable#
          content:
            application/json:
              schema:
                type: object
                properties:
                  Lessons:
                    type: array
                    description: A JSON array of Lessons
                    items:
                      $ref: "#/components/schemas/Lessons"
                  LessonStaff:
                    type: array
                    description: A JSON array of LessonStaff
                    items:
                      $ref: "#/components/schemas/LessonStaff"
                  LessonRooms:
                    type: array
                    description: A JSON array of LessonRooms
                    items:
                      $ref: "#/components/schemas/LessonRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/TimetableModel:
    get:
      tags:
      - Timetable
      summary: Timetable model
      description: "## Endpoint Description\r\n\r\nTimetable model for all timetables in the academic year. Includes days, periods, lessons, and relationships between lessons, staff, rooms, and classes.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint               | Primary Key              | Foreign Key             | Related Endpoint Description       |\r\n|------------------------|-------------------------|-------------------------|------------------------------------|\r\n| school.groups           | Groups.Id               | LessonClasses.GroupId   | School groups                      |\r\n| school.staff            | Staff.Id                | LessonStaff.StaffId     | School staff                       |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Timetables_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 3                     | Id of the timetable                                | School                  |\r\n| Description          | 186                   | Timetable name                                    | School                  |\r\n| StartDate            | 2017-09-01            | Date the timetable starts                          | School                  |\r\n| EndDate              | 2017-05-01            | Date the timetable ends                            | School                  |\r\n| DaysPerCycle         | 5                     | Number of days in a timetable cycle               | School                  |\r\n| PeriodsPerCycle      | 25                    | Number of periods in a timetable cycle            | School                  |\r\n| TeachingPeriodsPerCycle | 25                  | Number of teaching periods in a timetable cycle   | School                  |\r\n\r\n#### _TimetableDays_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 678                   | Id of the timetable day                           | School                  |\r\n| TimetableId          | 2                     | Id of the timetable the day is a part of         | School                  |\r\n| DayName              | Mon                   | Name of the timetable day                         | School                  |\r\n| Sequence             | 1                     | Sequence number of the day in the timetable       | School                  |\r\n\r\n#### _TimetablePeriods_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 1065                  | Id of the timetable period                        | School                  |\r\n| TimetableDayId       | 678                   | Id of the timetable day the period is a part of  | School                  |\r\n| PeriodName           | Mon5                  | Name of the period                                | School                  |\r\n| StartTime            | 15:10                 | Time (hh:mm) that the period starts              | School                  |\r\n| EndTime              | 16:10                 | Time (hh:mm) that the period ends                | School                  |\r\n| PeriodSequence       | 5                     | Sequence number of the period in the timetable    | School                  |\r\n\r\n#### _TimetableLessons_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 1765                  | Id of the lesson                                  | School                  |\r\n| TimetablePeriodId    | 1065                  | Id of the period that the lesson occurs in       | School                  |\r\n\r\n#### _LessonClasses_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the class in the lesson     | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| GroupId              | 7651                  | Id of the class or group                          | School                  |\r\n| GroupName            | 10MA1                 | Name of the class or group                        | School                  |\r\n| SubjectId            | 91                    | Id of the subject                                | School                  |\r\n| SubjectName          | Maths                 | Name of the subject                               | School                  |\r\n\r\n#### _LessonStaff_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the staff in the lesson     | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| Staff                | 18611                 | Id of the staff                                   | School                  |\r\n\r\n#### _LessonRooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the room in the lesson      | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| RoomId               | 4043                  | Id of the room                                   | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                 | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _Rooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the room                    | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                  | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _TimetableDayInstances_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the day                     | School                  |\r\n| TimetableDayId       | 34                    | Id of the timetable day                           | School                  |\r\n| Date                 | 16-11-2017            | Date the day instance occurs                      | School                  |\r\n\r\n#### _LessonInstances_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the lesson instance        | School                  |\r\n| TimetableLessonId    | 34                    | Id of the timetable lesson                        | School                  |\r\n| StartDate            | 16-11-2017T14:00:00   | Datetime the lesson instance occurs               | School                  |\r\n| EndDate              | 16-11-2017T15:00:00   | Datetime the lesson instance occurs               | School                  |\r\n\r\n#### _CoverLessons_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| Type                 | StaffCover            | Type of cover                                    | School                  |\r\n\r\n#### _CoverLessonStaff_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| Staff                | 18611                 | Id of the staff                                   | School                  |\r\n\r\n#### _CoverLessonRooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| RoomId               | 4043                  | Id of the room                                   | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                 | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _RoomClosures_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the room closure                            | School                  |\r\n| Description          | Exams                 | Description of why the room is closed             | School                  |\r\n| StartDate            | 16-11-2017T14:00:00   | Datetime the room closure occurs                  | School                  |\r\n| EndDate              | 16-11-2017T15:00:00   | Datetime the room closure occurs                  | School                  |\r\n\r\n***\r\n"
      operationId: TimetableModel
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: excludeLessonInstances
        in: query
        description: Add this option to remove lesson instances from the data
        required: false
        schema:
          type: boolean
      - name: LessonInstancesDateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: LessonInstancesDateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: SchoolYear
        in: query
        description: Optional School Year
        required: false
        schema:
          type: string
          format: yyyy
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of TimetableModel
          content:
            application/json:
              schema:
                type: object
                properties:
                  Timetables:
                    type: array
                    description: A JSON array of Timetables
                    items:
                      $ref: "#/components/schemas/Timetables"
                  TimetableDays:
                    type: array
                    description: A JSON array of TimetableDays
                    items:
                      $ref: "#/components/schemas/TimetableDays"
                  TimetablePeriods:
                    type: array
                    description: A JSON array of TimetablePeriods
                    items:
                      $ref: "#/components/schemas/TimetablePeriods"
                  TimetableLessons:
                    type: array
                    description: A JSON array of TimetableLessons
                    items:
                      $ref: "#/components/schemas/TimetableLessons"
                  LessonClasses:
                    type: array
                    description: A JSON array of LessonClasses
                    items:
                      $ref: "#/components/schemas/LessonClasses"
                  LessonStaff:
                    type: array
                    description: A JSON array of LessonStaff
                    items:
                      $ref: "#/components/schemas/LessonStaff"
                  LessonRooms:
                    type: array
                    description: A JSON array of LessonRooms
                    items:
                      $ref: "#/components/schemas/LessonRooms"
                  Rooms:
                    type: array
                    description: A JSON array of Rooms
                    items:
                      $ref: "#/components/schemas/Rooms"
                  TimetableDayInstances:
                    type: array
                    description: A JSON array of TimetableDayInstances
                    items:
                      $ref: "#/components/schemas/TimetableDayInstances"
                  LessonInstances:
                    type: array
                    description: A JSON array of LessonInstances
                    items:
                      $ref: "#/components/schemas/LessonInstances"
                  CoverLessons:
                    type: array
                    description: A JSON array of CoverLessons
                    items:
                      $ref: "#/components/schemas/CoverLessons"
                  CoverLessonStaff:
                    type: array
                    description: A JSON array of CoverLessonStaff
                    items:
                      $ref: "#/components/schemas/CoverLessonStaff"
                  CoverLessonRooms:
                    type: array
                    description: A JSON array of CoverLessonRooms
                    items:
                      $ref: "#/components/schemas/CoverLessonRooms"
                  RoomClosures:
                    type: array
                    description: A JSON array of RoomClosures
                    items:
                      $ref: "#/components/schemas/RoomClosures"
                  AllRooms:
                    type: array
                    description: A JSON array of AllRooms
                    items:
                      $ref: "#/components/schemas/AllRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/TimetableStructure:
    get:
      tags:
      - Timetable
      summary: Timetable Structure
      description: "## Endpoint Description\r\n\r\nTimetable model for all timetables in the academic year. Includes days, periods, lessons, and relationships between lessons, staff, rooms, and classes.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint               | Primary Key              | Foreign Key             | Related Endpoint Description       |\r\n|------------------------|-------------------------|-------------------------|------------------------------------|\r\n| school.groups           | Groups.Id               | LessonClasses.GroupId   | School groups                      |\r\n| school.staff            | Staff.Id                | LessonStaff.StaffId     | School staff                       |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n#### _Timetables_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 3                     | Id of the timetable                                | School                  |\r\n| Description          | 186                   | Timetable name                                    | School                  |\r\n| StartDate            | 2017-09-01            | Date the timetable starts                          | School                  |\r\n| EndDate              | 2017-05-01            | Date the timetable ends                            | School                  |\r\n| DaysPerCycle         | 5                     | Number of days in a timetable cycle               | School                  |\r\n| PeriodsPerCycle      | 25                    | Number of periods in a timetable cycle            | School                  |\r\n| TeachingPeriodsPerCycle | 25                  | Number of teaching periods in a timetable cycle   | School                  |\r\n\r\n#### _TimetableDays_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 678                   | Id of the timetable day                           | School                  |\r\n| TimetableId          | 2                     | Id of the timetable the day is a part of         | School                  |\r\n| DayName              | Mon                   | Name of the timetable day                         | School                  |\r\n| Sequence             | 1                     | Sequence number of the day in the timetable       | School                  |\r\n\r\n#### _TimetablePeriods_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 1065                  | Id of the timetable period                        | School                  |\r\n| TimetableDayId       | 678                   | Id of the timetable day the period is a part of  | School                  |\r\n| PeriodName           | Mon5                  | Name of the period                                | School                  |\r\n| StartTime            | 15:10                 | Time (hh:mm) that the period starts              | School                  |\r\n| EndTime              | 16:10                 | Time (hh:mm) that the period ends                | School                  |\r\n| PeriodSequence       | 5                     | Sequence number of the period in the timetable    | School                  |\r\n\r\n#### _TimetableLessons_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 1765                  | Id of the lesson                                  | School                  |\r\n| TimetablePeriodId    | 1065                  | Id of the period that the lesson occurs in       | School                  |\r\n\r\n#### _LessonClasses_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the class in the lesson     | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| GroupId              | 7651                  | Id of the class or group                          | School                  |\r\n| GroupName            | 10MA1                 | Name of the class or group                        | School                  |\r\n| SubjectId            | 91                    | Id of the subject                                 | School                  |\r\n| SubjectName          | Maths                 | Name of the subject                               | School                  |\r\n\r\n#### _LessonStaff_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the staff in the lesson     | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| Staff                | 18611                 | Id of the staff                                   | School                  |\r\n\r\n#### _LessonRooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the room in the lesson      | School                  |\r\n| TimetableLessonId    | 1765                  | Id of the lesson                                  | School                  |\r\n| RoomId               | 4043                  | Id of the room                                   | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                 | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _Rooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the room                    | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                  | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _TimetableDayInstances_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the day                     | School                  |\r\n| TimetableDayId       | 34                    | Id of the timetable day                           | School                  |\r\n| Date                 | 16-11-2017            | Date the day instance occurs                      | School                  |\r\n\r\n#### _LessonInstances_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the instance of the lesson instance        | School                  |\r\n| TimetableLessonId    | 34                    | Id of the timetable lesson                        | School                  |\r\n| StartDate            | 16-11-2017T14:00:00   | Datetime the lesson instance occurs               | School                  |\r\n| EndDate              | 16-11-2017T15:00:00   | Datetime the lesson instance occurs               | School                  |\r\n\r\n#### _CoverLessons_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| Type                 | StaffCover            | Type of cover                                    | School                  |\r\n\r\n#### _CoverLessonStaff_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| Staff                | 18611                 | Id of the staff                                   | School                  |\r\n\r\n#### _CoverLessonRooms_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 90                    | Id of the instance of the cover lesson            | School                  |\r\n| LessonInstanceId      | 8                     | Id of the timetable lesson                        | School                  |\r\n| RoomId               | 4043                  | Id of the room                                   | School                  |\r\n| RoomName             | Red 1                 | Name of the room                                 | School                  |\r\n| RoomCode             | R1                    | Room code                                        | School                  |\r\n\r\n#### _RoomClosures_\r\n\r\n| Field                | Example                | Notes                                             | Consent Scope          |\r\n|----------------------|-----------------------|---------------------------------------------------|-------------------------|\r\n| Id                   | 8                     | Id of the room closure                            | School                  |\r\n| Description          | Exams                 | Description of why the room is closed             | School                  |\r\n| StartDate            | 16-11-2017T14:00:00   | Datetime the room closure occurs                  | School                  |\r\n| EndDate              | 16-11-2017T15:00:00   | Datetime the room closure occurs                  | School                  |\r\n\r\n***\r\n"
      operationId: TimetableStructure
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: DateFrom
        in: query
        description: Start Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: DateTo
        in: query
        description: End Date yyyy-MM-dd
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of TimetableStructure
          content:
            application/json:
              schema:
                type: object
                properties:
                  TTDays:
                    type: array
                    description: A JSON array of TTDays
                    items:
                      $ref: "#/components/schemas/TTDays"
                  TTSessions:
                    type: array
                    description: A JSON array of TTSessions
                    items:
                      $ref: "#/components/schemas/TTSessions"
                  TTPeriods:
                    type: array
                    description: A JSON array of TTPeriods
                    items:
                      $ref: "#/components/schemas/TTPeriods"
                  TTSubjects:
                    type: array
                    description: A JSON array of TTSubjects
                    items:
                      $ref: "#/components/schemas/TTSubjects"
                  TTRooms:
                    type: array
                    description: A JSON array of TTRooms
                    items:
                      $ref: "#/components/schemas/TTRooms"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/UserDefinedFields:
    get:
      tags:
      - School
      summary: User Defined Fields
      description: "## Endpoint Description\r\n\r\nRetrieve a list of available User Defined fields. Use UDFName values from this endpoint with `school.StudentUserDefinedFields` to retrieve the values for students.\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                                 | Primary Key                  | Foreign Key                   | Related Endpoint Description       |\r\n|------------------------------------------|------------------------------|-------------------------------|------------------------------------|\r\n| school.studentuserdefinedfields          | UDFs.UDFName                 | StudentUDFs.UDFName          | Student UDF values                 |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field       | Example        | Notes                        | Consent Scope          |\r\n|-------------|----------------|-------------------------------|-------------------------|\r\n| UDFType     | Student        | UDF person type              | StudentFreeText         |\r\n| UDFName     | Locker Number  | Name of UDF                  | StudentFreeText         |\r\n\r\n***\r\n"
      operationId: UserDefinedFields
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of UserDefinedFields
          content:
            application/json:
              schema:
                type: object
                properties:
                  UDFs:
                    type: array
                    description: A JSON array of UDFs
                    items:
                      $ref: "#/components/schemas/UDFs"
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
  /School/{estab}/validationerrors:
    get:
      tags:
      - School
      summary: Validation Errors
      description: Validation errors
      operationId: validationerrors
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of ValidationErrors
          content:
            application/json:
              schema:
                type: object
                properties:
                  ValidationErrors:
                    type: array
                    description: A JSON array of ValidationErrors
                    items:
                      $ref: "#/components/schemas/ValidationErrors"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/XIDs:
    get:
      tags:
      - School
      summary: XIDs
      description: XIDs
      operationId: XIDs
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of XIDs
          content:
            application/json:
              schema:
                type: object
                properties:
                  XIDs:
                    type: array
                    description: A JSON array of XIDs
                    items:
                      $ref: "#/components/schemas/XIDs"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /Attendance/{estab}:
    post:
      tags:
      - Writeback
      - Attendance
      summary: Attendance Writeback
      description: "## Endpoint Description\r\n\r\nWriteback endpoint to create or update either AM & PM session or lesson attendance marks in the MIS. \r\n\r\n**Important:** Currently, only SIMS MIS is supported for Attendance Writeback. Write back to the MIS by calling this endpoint with a JSON object as the POST body containing the required information. Attendance information can be written for multiple students in one POST, but only for a single date at a time. If you attempt to write back information for more than one date, the API will return a validation error and will not attempt to send the information to the MIS. We will validate your writeback POST before we send it to the school to ensure that the information provided contains valid data (student IDs, correct marks, etc.). If there is an error, we will fail the request and provide you an error message detailing the issue.\r\n\r\n**SIMS Note:** All write backs are treated as atomic. If your request passes validation but for some reason does not complete successfully at SIMS, all records contained within the request can be considered to have failed.\r\n\r\n* We would consider this a very rare scenario, so if you do encounter this, please let us know so we can assist in troubleshooting the problem.\r\n\r\n## Session Attendance\r\n### Sections & Fields for Writeback Object\r\n\r\n#### Marks - Mandatory\r\n\r\nThe Marks object contains a list of objects to write back to the MIS to set attendance marks for students for a given session of a given day. Valid marks can be found in the `school.AttendanceCodes` endpoint. \r\n\r\n| Property       | Example                | Data Type | Description                                               | Mandatory? |\r\n|----------------|------------------------|-----------|-----------------------------------------------------------|------------|\r\n| StudentId      | 9919                   | String    | Id of the student record                                   | Yes        |\r\n| MarkType       | S                      | String    | Set S for session in all cases for this endpoint          | Yes        |\r\n| Date           | 2017-05-11             | String    | Date of the attendance (yyyy-mm-dd)                       | Yes        |\r\n| Session        | AM                     | String    | AM or PM session                                          | Yes        |\r\n| Mark           | \\\\                     | String    | Mark to be written back (escape backslash)               | Yes        |\r\n| Mins           | 5                      | Integer   | Number of minutes late                                     | No         |\r\n| Notes          | Missed the bus        | String    | Comments for the mark - **MAX 500 Character Limit**      | No         |\r\n| StatutoryComment| Referral order        | String    | Statutory comment for marks B, K, and Y7 - **MAX 500 Character Limit**. Presently only supported for SIMS | Mandatory for codes B, K, and Y7 |\r\n\r\n#### Callback - Optional\r\n\r\n| Property | Example                                                                                     | Data Type | Description                                 | Mandatory? |\r\n|----------|---------------------------------------------------------------------------------------------|-----------|---------------------------------------------|------------|\r\n| Method   | POST                                                                                        | String    | Pass POST for this property                 | Yes        |\r\n| Url      | https://xporter.groupcall.com/TryIt/Callback/?id=Attendance&estab=3281102               | String    | Your URL that will receive the callback from us | Yes        |\r\n\r\n### Callback on Completion\r\n\r\nBy specifying a callback URL in the POST data, you will inform XporterOnDemand that you would like us to call you back when the writeback has completed, so you don't have to wait around for it to finish. The example JSON in the sandbox is sending a callback to our URL, which you can open and examine to see what it will look like:\r\n\r\n* **Callback URL example:** https://xporter.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the **id** and **estab** parameters that you provided in the writeback POST. We will also include an additional parameter **XodCompleted** with a value of **True** or **False** indicating the success or failure of the writeback attempt.\r\n\r\n## Lesson Attendance\r\n\r\n### Sections & Fields for Writeback Object\r\n\r\n#### Marks - Mandatory\r\n\r\nThe Marks object contains a list of objects to write back to the MIS to set attendance marks for students for a given session of a given day. Valid marks can be found in the school.AttendanceCodes endpoint.\r\n\r\n| Property    | Example | Data Type | Description                                                   | Mandatory? |\r\n|-------------|---------|-----------|---------------------------------------------------------------|------------|\r\n| StudentId   | 9919    | String    | Id of the student record                                      | Yes        |\r\n| MarkType    | L       | String    | Set L for lesson attendance in all cases for this endpoint    | Yes        |\r\n| Date        | 2017-05-11 | String  | Date of the attendance (yyyy-mm-dd)                          | Yes        |\r\n| InstanceId  | 44905   | String    | PeriodId of the lesson from the timetable information         | Yes        |\r\n| Mark        | \\\\      | String    | Mark to be written back (escape backslash)                   | Yes        |\r\n\r\n#### Callback - Optional\r\n\r\n| Property    | Example                                                 | Data Type | Description                                                   | Mandatory? |\r\n|-------------|---------------------------------------------------------|-----------|---------------------------------------------------------------|------------|\r\n| Method      | POST                                                    | String    | Pass POST for this property                                   | Yes        |\r\n| Url         | https://xporter.groupcall.com/TryIt/Callback/?id=LessonAttendance&estab=3281102 | String | Your URL that will receive the callback from us               | Yes        |\r\n\r\n### Callback on Completion\r\n\r\nBy specifying a callback URL in the POST data, you will let XporterOnDemand know that you would like us to call you back when the writeback has completed so you don't have to wait around for it to finish. The example JSON in the sandbox is sending a callback to our URL which you can open and have a look at so you can see what it will look like:\r\n\r\n> * **Callback URL example:** https://xporter.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the **id** and **estab** parameters that you passed in the writeback POST. We will also include an additional parameter **XodCompleted** with a value of **True** or **False**, which determines the success or failure of the writeback attempt.\r\n"
      operationId: AttendanceWriteback
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/AttendanceWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /AttendanceAsync/{estab}:
    post:
      tags:
      - Writeback
      - Attendance
      summary: Attendance Writeback Async
      description: "## Endpoint Description \r\nAsynchronous writeback endpoint to create or update AM & PM session and Lesson attendance marks in the MIS. Receive a tracking ID and be called back when the action is completed successfully or has failed.\r\n\r\n> **Important:** Currently only SIMS MIS is supported for Attendance Writeback.\r\n\r\nWrite back to the MIS by calling this endpoint with a JSON object as the POST body containing the required information. \r\n\r\n> **Info:** This endpoint supports both formats for Session and Lesson JSON objects as defined in POST.Attendance and POST.LessonAttendance examples\r\n\r\n\r\nAttendance information can be written for multiple students in one POST, but only for a single date at a time. If you attempt to write back information for more than one date, the API will return a validation error and will not attempt to send the information to the MIS.\r\n\r\nWe will validate your writeback POST before we send to the school to ensure that the information provided contains valid information (student Ids, correct marks etc). If there is an error, we will fail the request and provide you an error message detailing the issue.\r\n\r\nOn submission of your request we respond immediately with a success status to let you know we have queued your request and will issue you with a TrackingId that you can use to match up your writeback request with the call back we will respond with on completion.\r\n\r\n**Example response:**\r\n\r\n    {\r\n      \"TrackingId\": \"20171101121545.66a1289c-5186-4448-9847-ccdd28054230\",\r\n      \"DataSet\": {\r\n        \"trackingid\": [\r\n          {\r\n            \"trackingid\": \"20171101121545.66a1289c-5186-4448-9847-ccdd28054230\",\r\n            \"errorquery\": \"Writeback.AttendanceAsync_OnError\"\r\n          }\r\n        ]\r\n      },\r\n      \"Message\": \"success\",\r\n      \"ExceptionType\": null,\r\n      \"ExceptionMessage\": null,\r\n      \"InnerException\": null\r\n    }\r\n \r\n \r\n \r\n ## Validation Errors\r\n \r\n Writeback requests need to pass a series of validations before they are accepted. This avoids erroneous data being sent to the MIS. \r\n \r\n Validation errors will be returned immediately\r\n \r\n | Validation Error | Description | Action Required |\r\n | --- | --- | --- |\r\n | Missing mandatory field StudentId  | A studentId must be specified for every writeback record  |  Validate / correct writeback payload |\r\n |Attendance writeback is not supported for {MIS}|We detected a writeback attempt for an MIS that does not yet support it| Stop making writeback requests for this school|\r\n |Invalid StudentId: {StudentId}|StudentId specified is not a valid on roll StudentId|Validate StudentIds sent in writeback requests to ensure they are all valid on roll students|\r\n |InstanceId required for Lesson attendance writeback for StudentId: {StudentId|L was specified for MarkType but no InstanceId was provided|Validate creation of writeback payload to ensure it contains mandatory fields|\r\n |Notes field max character limit (500) exceeded for StudentId: {StudentId}|MIS notes field length cannot be exceeded|Ensure that inputs for attendance notes are limited to 500 characters|\r\n |Invalid Session provided: {SessionCode}|AM or PM must be provided|Validate creation of writeback payload to ensure it contains mandatory fields|\r\n |Invalid Mark provided: {Mark}|The provided mark is not recognised as a valid code|Ensure that attendance codes are valid based on the school.AttendanceCodes endpoint|\r\n |Only write back a set of marks for the same date|Attendance must be written back in batches containing data for only a single date| Ensure writeback batches contain only marks for a single date at a time|\r\n |School appears to be closed to students on this date|Existing code found for this session that indicates school closed|Attendance cannot be recorded on this date, refresh attendance/timetable data|\r\n |Invalid lesson InstanceId provided|We could not find a matching lesson instance Id on the specified date|Validate timetable data to ensure correct instanceId is used|\r\n \r\n > **Handling the N Code:** To ensure data saved directly in the MIS is not overwritten by applications using the API, we have special rules for handling its use:\r\n * MIS has no mark or N: Writeback will set N\r\n * MIS has any other mark: Writeback will leave existing mark\r\n\r\n\r\n\r\n\r\n> **SIMS Note:** All write backs are treated as atomic. If your request passes validate, but for some reason does not complete successfully at SIMS, all records contained within the request can be considered to have failed.\r\n> \r\n> * We would consider this a very rare scenario so if you do encounter this, please let us know so we can assist in troubleshooting the problem.\r\n\r\n\r\n### Sections & Fields for Writeback Object \r\n\r\n\r\n####Marks - Mandatory\r\nThe Marks object contains a list of objects to write back to the MIS to set attendance marks for students for a given session of a given day.\r\n\r\nValid marks can be found in the school.AttendanceCodes endpoint.\r\n\r\nProperty|Example|Data Type|Description|Mandatory?\r\n----|----|----|----|----\r\nStudentId|9919|String|Id of the student record|Yes\r\nMarkType|S|String|Set S for session in all cases for this endpoint|Yes\r\nDate|2017-05-11|String|Date of the attendance (yyyy-mm-dd)|Yes\r\nSession|AM|String|AM or PM session|Yes\r\nMark|\\\\\\ |String|Mark to be written back (escape backslash)|yes\r\nMins|5|Integer|Number of minutes late|No\r\nNotes|Missed the bus|String|Comments for the mark - **MAX 500 Character Limit**|No\r\nStatutoryComment|Referral order|String|Statutory comment for marks B, K and Y7 - **MAX 500 Character Limit**. Presently only supported for SIMS|Mandatory for codes B, K and Y7\r\n\r\n\r\n\r\n***\r\n\r\n#### Callback - Mandatory Section for Async Calls\r\n\r\nProperty|Example|Data Type|Description|Mandatory?\r\n----|----|----|----|----\r\nMethod|POST|String|Pass POST for this propery|Yes\r\nUrl|https://xporter.groupcall.com/TryIt/Callback/?id=Attendance&estab=3281102|String|Your URL that will receive the callback from us|Yes\r\n\r\n### Request Validation \r\nBefore a request is sent to the MIS, we carry out a number of validations to ensure that you have made a valid request.\r\n\r\nDue to the asynchronous nature of the request we perform the validation in 2 tiers. The first tier validates against information we already have (student/structural), the 2nd tier validates against existing attendance data which we need a valid cache for so may need to make a request to the school before executing the validations. \r\n\r\nTier 1 validation failures will be responded immediately and we will not queue a writeback request. \r\n\r\nTier 2 validations will be performed asynchronously and cause a failed callback (**XodCompleted=False**) if they do not pass.\r\n\r\n> **Tier 1 Validations**\r\n> \r\n> * Invalid StudentId\r\n> * InstanceId Required for Lesson Attendance Writeback\r\n> * Notes field 500 character limit\r\n> * Invalid Session code provided (Not AM or PM)\r\n> * Invalid Mark provided\r\n> \r\n> **Tier 2 Validations**\r\n> \r\n> *  School appears to be closed to students on this date\r\n> * Invalid lesson InstanceId provided\r\n\r\n\r\n### Async Callback on Completion \r\nRequests using this endpoint must provide a call back object so the API can tell the caller the result of the request.\r\n\r\nWriteback requests on using this endpoint will automatically retry the call to the school MIS every 5 minutes for the period of 1 hour if we are unable to connect successfully to the school agent. If we are unable to connect after 1 hour we will respond with **XodCompleted=False** and an appropriate error message to indicate the communications issue.\r\n\r\nThe example JSON in the sandbox is sending a callback to our URL which you can open and have a look at so you can see what a callback response will look like:\r\n\r\n> * **Callback URL example:** https://xporter.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the following URL parameters:\r\n\r\n*  **id** - Value of the id param passed in the callback object in the original request\r\n* **estab** - Value of the estab param passed in the callback object in the original request\r\n* **trackingid** - Value of the TrackingId property in the initial response from the API\r\n* **XodCompleted** - This will be True the writeback was successfully complete. It will be false if the writeback payload failed validation before sending to the mis. If the writeback payload passed validation but we were unable to write back to the MIS, this will be empty - we will instead provide the ErrorMessage instead.\r\n* **ErrorMessage** - If we failed to write back to the MIS, this will be populated with the URL encoded error from the MIS. This means that we have already retried the writeback up to 10 times. You can still re-submit the writeback payload as a new writeback post.\r\n\r\n\r\n***"
      operationId: AttendanceWritebackAsync
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/AttendanceWriteback"
      responses:
        "200":
          $ref: "#/components/responses/AsyncWritebackResponse"
        "401":
          description: Invalid Authentication Token
      callbacks:
        AttendanceWriteback:
          $ref: "#/components/callbacks/AttendanceWritebackCallback"
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/Conduct/{estab}:
    post:
      tags:
      - Writeback
      - Achievement
      - Behaviour
      summary: Conduct Writeback
      description: "## Endpoint Description\r\n\r\nWriteback endpoint to create achievement records in the MIS.\r\n\r\n> **Important:** Currently only SIMS MIS is supported for Conduct Achievement Writeback. Write back to the MIS by calling this endpoint with a JSON object as the POST body containing the required information.\r\n\r\n### Sections & Fields for Writeback Object\r\n\r\n#### Conducts - Mandatory\r\n\r\nThe conduct section defines the achievement event itself. The Id column is an internal reference to related records in this specific writeback object. Multiple Conducts can be defined, increment the Id field to identify separate Conduct records. Related objects such as Participants and Staff will need to reference the respective ConductId in those records.\r\n\r\n| Property | Example | Data Type | Description | Mandatory? |\r\n| --- | --- | --- | --- | --- |\r\n| Id | 1 | Integer | Unique identifier of the conduct record for this writeback data | Yes |\r\n| IncidentType | Ach | Text | The type of conduct being written. Must be \"Ach\" | Yes |\r\n| RecordedById | 1 | Integer | Id of the staff member that recorded this event | Yes |\r\n| EntryDate | 2017-02-21 (yyyy-MM-dd) | Text | Date that this event occurred | Yes |\r\n| TypeId | 4 | Integer | Id of the behaviour type selectable from school.conductlookups ConductTypes.LocalId values | Yes |\r\n| ActivityId | 13 | Integer | Id of BehActivity from school.conductlookups ConductLookups.LocalId | No |\r\n| Note | Great piece of work | Text | Free text description or comment for event - **MAX 500 Character Limit** | No |\r\n\r\n#### Participants - Mandatory\r\n\r\nThe participants section lists the involved students. There can be multiple students associated with a single Conduct - ensure the ConductId for multiple students all references the intended Conduct record.\r\n\r\n| Property | Example | Data Type | Description | Mandatory? |\r\n| --- | --- | --- | --- | --- |\r\n| ConductId | 1 | Integer | Id of the linked conduct event in this writeback | Yes |\r\n| Points | 10 | Integer | Set the points for the student | Yes |\r\n| StudentId | 9919 | Integer | Id of the student | Yes |\r\n| OutcomeId | 1 | Integer | Id of the AchOutcome lookup | No |\r\n\r\n#### Staff - Optional\r\n\r\nThe Staff section lists the involved staff members. It is optional and can be omitted entirely. There can be multiple staff associated with a single Conduct - ensure the ConductId for multiple staff all references the intended Conduct record.\r\n\r\n| Property | Example | Data Type | Description | Mandatory? |\r\n| --- | --- | --- | --- | --- |\r\n| ConductId | 1 | Integer | Id of the linked conduct event in this writeback | Yes |\r\n| StaffId | 1 | Integer | The Id of the staff member | Yes |\r\n| StaffRoleId | 3 | Integer | Id of BehStaffRole from school.conductlookups ConductLookups.LocalId | No |\r\n\r\n#### MediaFiles - Optional\r\n\r\nThe MediaFiles section allows you to attach media data to a specific conduct incident, it is optional and can be omitted entirely. Multiple media files can be linked with a single Conduct record - you will need to increment the Id property and ensure all MediaFiles intended for the same Conduct record have the correct corresponding ConductId set.\r\n\r\n| Property | Example | Data Type | Description | Mandatory? |\r\n| --- | --- | --- | --- | --- |\r\n| Id | 1 | Integer | Incremental Id of the MediaFile linked to a specific Conduct record | Yes |\r\n| ConductId | 1 | Integer | Id of the linked conduct event in this writeback | Yes |\r\n| MediaDateTime | 2017-04-26T12:00:00 | DateTime | Timestamp for when media was created | Yes |\r\n| Description | Example image | Text | Description or comment for media | Yes |\r\n| MediaType | png | Text | Media attachment filetype | Yes |\r\n| FileName | small_tick.png | Text | Media attachment filename | Yes |\r\n| MediaBase64 | iVBORw0KGgo....RK5CYII= | Text | Base64 encoded string of media attachment | Yes |\r\n\r\n#### Callback - Optional\r\n\r\n| Property | Example | Data Type | Description | Mandatory? |\r\n| --- | --- | --- | --- | --- |\r\n| Method | POST | String | Pass POST for this property | Yes |\r\n| Url | https://xporter.groupcall.com/TryIt/Callback/?id=ConductBeh&estab=3281102 | String | Your URL that will receive the callback from us | Yes |\r\n\r\n### Callback on Completion\r\n\r\nBy specifying a callback URL in the POST data, you will let XporterOnDemand know that you would like us to call you back when the writeback has completed so you don't have to wait around for it to finish. The example JSON in the sandbox is sending a callback to our URL which you can open and have a look at so you can see what it will look like:\r\n\r\n> * **Callback URL example:** https://xportertesting.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the **id** and **estab** parameters that you passed in the writeback POST. We will also include an additional parameter **XodCompleted** with a value of **True** or **False** which determines the success or failure of the writeback attempt. When an Achievement Conduct is successfully written back, we will also include POST body data with the Id of the event that was created in the MIS so you can reconcile a successful writeback being made. The JSON we will return to you will look similar to the below example:\r\n\r\n```{\r\n  \"result\":[\r\n    {\r\n      \"IncidentId\":1,\r\n      \"ActualId\":1811\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n> **IncidentId:** The incremental Id of the conduct record that was specified in the JSON you POSTed  \r\n> **ActualId:** The MIS Id of the record that was created for that conduct record\r\n"
      operationId: ConductWriteback
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/ConductWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/ConductAsync/{estab}:
    post:
      tags:
      - Writeback
      - Achievement
      - Behaviour
      summary: Conduct Writeback Async
      description: "## Endpoint Description\r\n\r\nWriteback endpoint to create conduct records in the MIS using our preferred Async method.\r\n\r\n> **Important:** Currently only SIMS and Bromcom MIS are supported for Conduct Writeback.  \r\n> **Important:** Please refer to the **POST.ConductAch** or **POST.ConductBeh** endpoints for specific information about each type. Both respective payloads can be submitted to this endpoint.  \r\n> **Important:** Many **MIS** have **different structures** for Conduct data. Please read the relevant information in this document carefully.\r\n\r\n### Validation Errors\r\n\r\nWriteback requests need to pass a series of validations before they are accepted. This avoids erroneous data being sent to the MIS. We will validate your writeback POST before we send to the school to ensure that the information provided contains valid information (student Ids, correct lookupIds etc). If there is an error, we will fail the request and provide you an error message detailing the issue. Validation errors will be returned immediately in response to your request.\r\n\r\n| Validation Error | Description | Action Required |\r\n| --- | --- | --- |\r\n| Conduct writeback is not supported for {MIS} | We detected a writeback attempt for an MIS that does not yet support it | Stop making writeback requests for this school |\r\n| Invalid StudentId: {StudentID} | StudentId specified is not a valid on roll StudentId | Validate StudentIds sent in writeback requests to ensure they are all valid on roll students |\r\n| Deletion of conduct records is not supported for {MIS} | Not all MIS providers support the deletion of conduct records | Stop making deletion requests for this school |\r\n| Invalid Student RoleId for StudentId: {StudentId} | The RoleId supplied for the Student is not a valid RoleId | Validate the Role against the data in the ConductLookups endpoint |\r\n| Invalid StaffId: {StaffID} | StaffId specified is not a valid member of Staff | Validate StaffIds sent in writeback requests to ensure that they are all valid members of staff |\r\n| Invalid Staff RoleId for StaffId: {StaffId} | The RoleId supplied for the member of Staff is not a valid RoleId | Validate the Role against the data in the ConductLookups endpoint |\r\n| Note field max character limit (500) exceeded for Conduct Id: {ConductId} | The Note field is limited to 500 characters in length | Ensure that the Note field in the Conduct payload does not exceed 500 characters |\r\n| Invalid IncidentType {IncidentType} should be Ach or Beh | Only two values are valid for the Incident Type. These values are Ach for positive achievements, or Beh for negative behaviours. This field is mandatory. | Ensure you are supplying an IncidentType and that it is valid. |\r\n| Invalid TypeId {TypeId} | The TypeId supplied for the Conduct is not a valid TypeId | Validate the TypeId against the data in the ConductLookups endpoint |\r\n| Invalid ActivityId {ActivityId} | The ActivityId supplied for the Conduct is not a valid ActivityId | Validate the ActivityId against the data in the ConductLookups endpoint |\r\n| Invalid LocationId {LocationId} | The LocationId supplied for the Conduct is not a valid LocationId | Validate the LocationId against the data in the ConductLookups endpoint |\r\n| Invalid StatusId {StatusId} | The StatusId supplied for the Conduct is not a valid StatusId | Validate the StatusId against the data in the ConductLookups endpoint |\r\n| Mandatory field StatusId missing | The field StatusId is mandatory | Ensure you are supplying a StatusId with each Conduct record |\r\n| Invalid RecordedById {RecordedById} | The RecordedById supplied for the Conduct is not a valid RecordedById | Validate the RecordedById against the data in the ConductLookups endpoint |\r\n| Invalid BullTypeId {BullTypeId} | The BullTypeId supplied for the Conduct is not a valid BullTypeId | Validate the BullTypeId against the data in the ConductLookups endpoint |\r\n| Invalid EntryTimeId {EntryTimeId} | The EntryTimeId supplied for the Conduct is not a valid EntryTimeId | Validate the EntryTimeId against the data in the ConductLookups endpoint |\r\n| Invalid Achievement OutcomeId {OutcomeId} | The OutcomeId supplied for the Conduct is not a valid OutcomeId for an Achievement | Validate the OutcomeId against the data for Achievements in the ConductLookups endpoint |\r\n| Invalid Behaviour OutcomeId {OutcomeId} | The OutcomeId supplied for the Conduct is not a valid OutcomeId for a Behaviour | Validate the OutcomeId against the data for Behaviour in the ConductLookups endpoint |\r\n| You must provide an UpdateId when trying to remove students from a behaviour record | You have supplied a Conduct payload with negative StudentIds, indicating an intention to remove Students from a Conduct Record. However, you have not supplied an UpdateId to tell us which Conduct record you would like to update. | Ensure you are supplying an UpdateId with the Id of the Conduct when removing records. |\r\n| You must provide an UpdateId when trying to remove staff from a behaviour record | You have supplied a Conduct payload with negative StaffIds, indicating an intention to remove Staff from a Conduct Record. However, you have not supplied an UpdateId to tell us which Conduct record you would like to update. | Ensure you are supplying an UpdateId with the Id of the Conduct when removing records. |\r\n| You must provide an UpdateId when trying to remove media from a behaviour record | You have supplied a Conduct payload with negative Ids for Media, indicating an intention to remove Media from a Conduct Record. However, you have not supplied an UpdateId to tell us which Conduct record you would like to update. | Ensure you are supplying an UpdateId with the Id of the Conduct when removing records. |\r\n| You have assigned the same student to the same conduct more than once | You have linked a Student to the same Conduct multiple times | Ensure you only link a Student once to a single Conduct record |\r\n| You have assigned the same staff to the same conduct more than once | You have linked a Staff member to the same Conduct multiple times | Ensure you only link a Staff member once to a single Conduct record |\r\n| You have defined the same conduct more than once | You have repeated a Conduct record in your payload, or assigned two Conducts the same Id | Ensure that each Conduct is unique and has a unique Id |\r\n| Missing mandatory field TypeId | The field TypeId is mandatory and must be part of a Conduct writeback | Ensure you are always supplying a TypeId |\r\n\r\n### Response\r\n\r\nOn submission of your request, we respond immediately with a success status to let you know we have queued your request and will issue you with a TrackingId that you can use to match up your writeback request with the callback we will respond with on completion.\r\n\r\n**Example response:**\r\n```\r\n{\r\n  \"TrackingId\": \"20171101121545.66a1289c-5186-4448-9847-ccdd28054230\",\r\n  \"DataSet\": {\r\n    \"trackingid\": [\r\n      {\r\n        \"trackingid\": \"20171101121545.66a1289c-5186-4448-9847-ccdd28054230\",\r\n        \"errorquery\": \"Writeback.ConductAsync_OnError\"\r\n      }\r\n    ]\r\n  },\r\n  \"Message\": \"success\",\r\n  \"ExceptionType\": null,\r\n  \"ExceptionMessage\": null,\r\n  \"InnerException\": null\r\n}\r\n```\r\n### Callback on Completion\r\n\r\nBy specifying a callback URL in the POST data, you will let XporterOnDemand know that you would like us to call you back when the writeback has completed so you don't have to wait around for it to finish. The example JSON in the sandbox is sending a callback to our URL which you can open and have a look at so you can see what it will look like:\r\n\r\n> * **Callback URL example:** https://xporter.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the **id** and **estab** parameters that you passed in the writeback POST. We will also include an additional parameter **XodCompleted** with a value of **True** or **False** which determines the success or failure of the writeback attempt. When a Conduct record is successfully written back, we will include POST body data with an array of results that include the IncidentId and ActualId for each event that was created in the MIS so you can reconcile a successful writeback being made.\r\n\r\nThe JSON we will return to you will look similar to the below example:\r\n```\r\n{\r\n  \"result\":[\r\n    {\r\n      \"IncidentId\":1,\r\n      \"ActualId\":1811\r\n    }\r\n  ]\r\n}\r\n```\r\n> **IncidentId:** The Id of the conduct record that was specified in the JSON you POSTed to us.  \r\n> **ActualId:** The MIS Id of the record that was created for that conduct record.\r\n\r\nDepending on how each MIS handles conduct writeback, you may receive a single ActualId for a given IncidentId OR multiple ActualId records for a given IncidentId. Your application should support and understand that it may receive 1 or multiple instances of ActualId links for a conduct record. For this reason, we suggest that the Id (returned as IncidentId) in your writeback request can be uniquely referenced by your own application.\r\n\r\n> **Example 1 (SIMSNET):**\r\n> * You submit a writeback payload where a Conduct has more than one linked student.\r\n> * Xporter will submit the conduct record with related students to SIMSNET.\r\n> * Xporter will return you a single ActualId with the associated ConductId you provided, that it has created for the Conduct record in the MIS.\r\n> * When you fetch data next time from the API, there will be one Conduct record returned that corresponds to your record that was written back. The conduct will have more than one related student.\r\n\r\n**Example Response:**\r\n```\r\n{\r\n  \"result\": [\r\n    {\r\n      \"IncidentId\": 1,\r\n      \"ActualId\": \"43534\"\r\n    }\r\n  ]\r\n}\r\n```\r\n> **Example 2 (BROMCOM):**\r\n> * You submit a writeback payload where a Conduct has 3 linked students.\r\n> * Xporter will split the Conduct into one Conduct record per Student to submit to Bromcom.\r\n> * Xporter will return you a list of ActualId with the associated ConductId you passed that it has created for each Conduct record in the MIS.\r\n> * When you fetch data next time from the API, there will be 3 conduct records that correspond to the ActualId you were returned from your record that was written back. Each conduct will have only one related student.\r\n> * You may wish to aggregate these records in your platform for display depending on your use case.\r\n\r\n**Example Response:**\r\n```\r\n{\r\n  \"result\": [\r\n    {\r\n      \"IncidentId\": 1,\r\n      \"ActualId\": \"B78894\"\r\n    },\r\n    {\r\n      \"IncidentId\": 1,\r\n      \"ActualId\": \"B78893\"\r\n    },\r\n    {\r\n      \"IncidentId\": 1,\r\n      \"ActualId\": \"B78892\"\r\n    }\r\n  ]\r\n}\r\n```\r\n### Conduct Feature Support\r\n\r\n| MIS | Linked Students | Linked Staff | Record Deletion Support |\r\n| --- | --- | --- | --- |\r\n| SIMSNET | One Conduct to Many Students | Multiple Staff Roles Supported | Yes |\r\n| Bromcom | One Conduct to One Student | Witness Role Supported only | No |\r\n\r\n### MIS Specific Notes\r\n\r\nWhere there are specific features that deviate from default documentation for a given MIS, we will highlight below.\r\n\r\n> **Bromcom**\r\n> * Mandatory field StatusId in Conduct object is not required\r\n> * Media object is not supported\r\n"
      operationId: ConductAsync
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/ConductWriteback"
      responses:
        "200":
          $ref: "#/components/responses/AsyncWritebackResponse"
        "401":
          description: Invalid Authentication Token
      callbacks:
        ConductWriteback:
          $ref: "#/components/callbacks/ConductWritebackCallback"
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/DetentionAsync:
    post:
      tags:
      - Writeback
      summary: Detention Writeback Async
      description: "## Endpoint Description\r\n\r\n> **Important:** Detention Writeback requires the **WritebackConduct** scope.  \r\n> Writeback endpoint to create detention records in the MIS.  \r\n> **Important:** Currently only SIMS MIS is supported for Detention Writeback. Write back to the MIS by calling this endpoint with a JSON object as the POST body containing the required information.\r\n\r\n### Sections & Fields for Writeback Object\r\n\r\n#### Detentions - Mandatory\r\n\r\nThe detention section defines the detention event itself. The Id column is an internal reference to related records in this specific writeback object. Multiple Detentions can be defined—increment the Id field to identify separate conduct records. Related objects such as DetentionStudents and DetentionStaff will need to reference the respective Id with a matching DetentionId.\r\n\r\n| Property              | Example | Data Type | Description                                                        | Mandatory? |\r\n|-----------------------|---------|-----------|--------------------------------------------------------------------|------------|\r\n| Id                    | 1       | Integer   | Unique identifier of the conduct record for this writeback data   | Yes        |\r\n| UpdateId              | 3467    | Integer   | MIS identifier of the conduct record, used when updating records   | No         |\r\n| DetentionTypeId       | 24      | Text      | The detention type id of detention being written                   | Yes        |\r\n| LocationId            | 1       | Text      | Id of the default location                                          | Yes        |\r\n| DetentionDate         | 2017-02-21 | Text    | Date that this event occurred. Defaults to today if not sent      | No         |\r\n| StartTime             | 15:20   | Text      | Detention start time                                               | No         |\r\n| EndTime               | 15:50   | Text      | Detention end time                                                 | No         |\r\n| AssignedStaffId       | 23      | Text      | Default end time                                                   | No         |\r\n| RecordedDate          | 2017-02-21 | Text    | Date event was recorded; future dates will be set to current date | No         |\r\n| RecordedByStaffId     | 23      | Text      | Id of the staff who recorded the event                             | No         |\r\n\r\n#### DetentionStudents - Optional\r\n\r\nThe DetentionStudents section lists the involved students. There can be multiple students associated with a single Detention—ensure the DetentionId for multiple students all reference the intended Detention record.\r\n\r\n> *Please note that when writing back to SIMS, it is possible to exceed the fixed maximum number of students in a detention, and it is possible to place a student in two clashing detentions.*\r\n\r\n| Property              | Example | Data Type | Description                                                | Mandatory? |\r\n|-----------------------|---------|-----------|------------------------------------------------------------|------------|\r\n| DetentionId           | 1       | Integer   | Id of the linked conduct event in this writeback          | Yes        |\r\n| StudentId             | 9919    | Text      | Id of the student                                          | Yes        |\r\n| ReasonId              | 1       | Text      | Id of the detention reason                                 | No         |\r\n| AttendedId            | 1       | Text      | Id of the detention attended                               | No         |\r\n| NonAttendanceReason    | Personal errand | Text | Description of reason for non-attendance                   | No         |\r\n| BehaviourId           | 1       | Text      | Id of the associated behaviour incident                    | No         |\r\n| AddedByStaffId        | 1       | Text      | Id of the staff who added the student to the event        | No         |\r\n| Comments              | Biology homework | Text    | Comments associated with the student                       | No         |\r\n\r\n#### DetentionStaff - Optional\r\n\r\nThe DetentionStaff section lists the involved staff members. It can be omitted entirely. There can be multiple staff associated with a single Detention—ensure the DetentionId for multiple staff all reference the intended Detention record.\r\n\r\n| Property              | Example | Data Type | Description                                          | Mandatory? |\r\n|-----------------------|---------|-----------|------------------------------------------------------|------------|\r\n| DetentionId           | 1       | Integer   | Id of the linked conduct event in this writeback    | Yes        |\r\n| StaffId               | 9919    | Text      | Id of the staff member                               | Yes        |\r\n\r\n#### Callback - Optional\r\n\r\n| Property              | Example                                                 | Data Type | Description                                | Mandatory? |\r\n|-----------------------|---------------------------------------------------------|-----------|--------------------------------------------|------------|\r\n| Method                | POST                                                    | String    | Pass POST for this property                | Yes        |\r\n| Url                   | https://xporter.groupcall.com/TryIt/Callback/?id=ConductBeh&estab=3281102 | String    | Your URL that will receive the callback    | Yes        |\r\n\r\n### Updating Records\r\n\r\nTo update a record rather than add a new record, include the additional field **UpdateId** in the Detention section of the JSON object. You do not need to include UpdateId in other child sections. Child records will be amended or added according to the appropriate MIS id field in its section.\r\n\r\nThis example will update the student detention record relating to conduct MIS id of 3785 and student MIS id of 9919, setting their Points to 11.\r\n```\r\n{\r\n  \"Conducts\": [\r\n    {\r\n      \"Id\": 1,\r\n      \"UpdateId\": 3785,\r\n      \"IncidentType\": \"Ach\"\r\n    }\r\n  ],\r\n  \"Participants\": [\r\n    {\r\n      \"ConductId\": 1,\r\n      \"Points\": 11,\r\n      \"StudentId\": 9919\r\n    }\r\n  ]\r\n}\r\n```\r\n### Deleting Records\r\n\r\nTo delete a record, first include an **UpdateId** to update the record. You can then place a minus symbol in front of the **StudentId** or **StaffId** of any child sections that you wish to delete (for example, -3786). You can use this to remove students and staff from the detention.\r\n\r\n> *Please note that the parent Detention record cannot be deleted in SIMS.*\r\n\r\nThis example will delete the student with MIS id of 9919 from the conduct record with MIS id 3788:\r\n```\r\n{\r\n  \"Conducts\": [\r\n    {\r\n      \"Id\": 1,\r\n      \"UpdateId\": 3788,\r\n      \"IncidentType\": \"Ach\"\r\n    }\r\n  ],\r\n  \"Participants\": [\r\n    {\r\n      \"ConductId\": 1,\r\n      \"StudentId\": -9919\r\n    }\r\n  ]\r\n}\r\n```\r\n### Callback on Completion\r\n\r\nBy specifying a callback URL in the POST data, you will let XporterOnDemand know that you would like us to call you back when the writeback has completed so you don't have to wait around for it to finish. The example JSON in the sandbox is sending a callback to our URL which you can open and have a look at so you can see what it will look like:\r\n\r\n> * **Callback URL example:** https://xportertesting.groupcall.com/TryIt/Callback/\r\n\r\nWe will call you back on your URL with the **id** and **estab** parameters that you passed in the writeback POST. We will also include an additional parameter **XodCompleted** with a value of **True** or **False**, which determines the success or failure of the writeback attempt. When a Detention is successfully written back, we will also include POST body data with the Id of the event that was created in the MIS so you can reconcile a successful writeback being made.\r\n\r\n**Example JSON response:**\r\n```\r\n{\r\n  \"result\": [\r\n    {\r\n      \"DetentionId\": 1,\r\n      \"ActualId\": 1811\r\n    }\r\n  ]\r\n}\r\n```\r\n> **DetentionId:** The incremental Id of the detention record that was specified in the JSON you POSTed.  \r\n> **ActualId:** The MIS Id of the record that was created for that detention record.\r\n"
      operationId: DetentionAsync
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/DetentionWriteback"
      responses:
        "200":
          $ref: "#/components/responses/AsyncWritebackResponse"
        "401":
          description: Invalid Authentication Token
      callbacks:
        DetentionWriteback:
          $ref: "#/components/callbacks/DetentionWritebackCallback"
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/EntityAttributes:
    post:
      tags:
      - Writeback
      summary: EntityAttributes Writeback
      description: Writeback extra entity attributes for an XID
      operationId: EntityAttributesWriteback
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/EntityAttributesWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/GDPRfilter:
    post:
      tags:
      - Writeback
      summary: GDPRfilter Writeback
      description: Writeback GDPRfilter ids
      operationId: GDPRfilter
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      requestBody:
        $ref: "#/components/requestBodies/GDPRfilterWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/Photos:
    post:
      tags:
      - Writeback
      summary: Photos Writeback
      description: Writeback Photos
      operationId: PhotosWriteback
      requestBody:
        $ref: "#/components/requestBodies/PhotosWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/SeatingPlan:
    post:
      tags:
      - Writeback
      summary: SeatingPlan Writeback
      description: SeatingPlan Photos
      operationId: SeatingPlanWriteback
      requestBody:
        $ref: "#/components/requestBodies/SeatingPlanWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/TagDefinitions:
    post:
      tags:
      - Writeback
      summary: TagDefinitions Writeback
      description: TagDefinitions Photos
      operationId: TagDefinitionsWriteback
      requestBody:
        $ref: "#/components/requestBodies/TagDefinitionsWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/Tags:
    post:
      tags:
      - Writeback
      summary: Tags Writeback
      description: Tags Photos
      operationId: TagsWriteback
      requestBody:
        $ref: "#/components/requestBodies/TagsWriteback"
      responses:
        "200":
          description: Success
        "401":
          description: Invalid Authentication Token
      security:
      - IdaasSTSToken:
        - Idaas
  /Writeback/UserAsync:
    post:
      tags:
      - Writeback
      summary: UserAsync Writeback Async
      description: Writeback endpoint to assign Student/Staff/Contact records to provisioned AD Users in the MIS.
      operationId: UserAsync
      requestBody:
        $ref: "#/components/requestBodies/UserAsyncWriteback"
      responses:
        "200":
          $ref: "#/components/responses/AsyncWritebackResponse"
        "401":
          description: Invalid Authentication Token
      callbacks:
        UserAsyncWriteback:
          $ref: "#/components/callbacks/UserAsyncWritebackCallback"
      security:
      - IdaasSTSToken:
        - Idaas
  /School/{estab}/StudentContacts:
    get:
      tags:
      - Students
      - Contacts
      summary: Student Contacts
      description: "## Endpoint Description\r\n\r\nRetrieve the relationship details between students and contacts, allowing the two result sets to be linked. Returns all available contacts by default. Use the available filters to limit the data returned.\r\n\r\n***\r\n\r\n### Options\r\n\r\n- **includeExternalIds**: Include the student and contact external ID field in the response.\r\n- **includeLeavers**: Include records where the student is a leaver.\r\n- **includePreAdmissions**: Include records where the student is pre-admission.\r\n\r\n***\r\n\r\n### Filters\r\n\r\nAvailable query parameters for this endpoint to refine the returned dataset:\r\n\r\n| Required? | Filter Name     | Filter Description                                          |\r\n|-----------|------------------|-----------------------------------------------------------|\r\n| Optional  | id               | Provide a student or contact ID to retrieve all relevant records. |\r\n| Optional  | relationship     | Specify a specific relationship filter (e.g., \"Mother\"). |\r\n| Optional  | priority         | Filter to contacts with a specific priority.              |\r\n| Optional  | parresp          | Filter to contacts with or without parental responsibility (1 or 0). |\r\n\r\n***\r\n\r\n### Related Endpoints\r\n\r\n| Endpoint                             | Primary Key                      | Foreign Key                           | Related Endpoint Description      |\r\n|--------------------------------------|----------------------------------|---------------------------------------|-----------------------------------|\r\n| school.students                      | StudentContact.StudentId         | Students.Id                          | Retrieves details for the student  |\r\n| school.contacts                      | Contacts.Id                     |                                      | Retrieves details for the contact   |\r\n\r\n***\r\n\r\n### Fields by Scope\r\n\r\n| Field                 | Example                | Notes                                                   | Consent Scope                   |\r\n|-----------------------|------------------------|---------------------------------------------------------|----------------------------------|\r\n| Id                    | PL-10000.PC-10001      | Unique Id for change comparison                          | Student/StudentLite + Contact    |\r\n| StudentId             | 10000                  | The Id of the student                                    | Student/StudentLite + Contact    |\r\n| ContactId             | 10001                  | The Id of the related contact                            | Student/StudentLite + Contact    |\r\n| Relationship          | Mother                 | The relationship of the contact to the student          | Student/StudentLite + Contact    |\r\n| Priority              | 2                      | The contact priority where lowest is higher priority     | Student/StudentLite + Contact    |\r\n| ParResp               | 1                      | Parental responsibility flag defines legal responsibility| Student/StudentLite + Contact    |\r\n| LastUpdated           | 2016-07-21T12:17:16.74| The last time this data was updated                      | Student/StudentLite + Contact    |\r\n| RowHash               | 05BA1E3777DC654DCAA81F1083EFF939CCEBFE06 | For change comparison                         | Student/StudentLite + Contact    |\r\n\r\n***\r\n"
      operationId: StudentContacts
      parameters:
      - name: estab
        in: path
        description: establishment ID
        required: true
        schema:
          type: string
      - name: id
        in: query
        description: Optional ContactID or StudentID
        required: false
        schema:
          type: string
      - name: relationship
        in: query
        description: Only return these relationships TODO- add list?
        required: false
        schema:
          type: string
      - name: priority
        in: query
        description: Limit to priority TODO- add examples?
        required: false
        schema:
          type: string
      - name: parresp
        in: query
        description: Parental responsibility filter TODO- add examples
        required: false
        schema:
          type: string
      - name: updatedSince
        in: query
        description: filter by LastUpdated greater than
        required: false
        schema:
          type: string
          format: yyyy-MM-dd
      - name: page
        in: query
        description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: pagesize
        in: query
        description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
        required: false
        schema:
          type: integer
      - name: changedRows
        in: query
        description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
        required: false
        schema:
          type: string
      - name: select
        in: query
        description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
        required: false
        schema:
          type: string
          format: CSV
        example: "DisplayName as Name,RegGroup as Form"
      - name: callbackUrl
        in: query
        description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
        required: false
        schema:
          type: string
          format: URL
      - name: httpstatuscodes
        in: query
        description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
        required: false
        schema:
          type: boolean
      responses:
        "200":
          description: A JSON object of Student Contacts
          content:
            application/json:
              schema:
                type: object
                properties:
                  StudentContacts:
                    type: array
                    description: A JSON array of StudentContacts
                    items:
                      $ref: "#/components/schemas/StudentContact"
                  meta:
                    type: array
                    description: A JSON array of meta data
                    items:
                      $ref: "#/components/schemas/meta"
                  __pagination__:
                    type: array
                    description: A JSON array of pagination data
                    items:
                      $ref: "#/components/schemas/__pagination__"
        "401":
          description: Invalid Authentication Token
      callbacks:
        dbStatus:
          $ref: "#/components/callbacks/dbStatus"
      security:
      - IdaasSTSToken:
        - Idaas
  /XporterOnDemand/GetXodSchools:
    get:
      tags:
      - Management APIs
      summary: Get Xod Schools
      description: "This endpoint provides a list of all your current schools, schools pending authorisation, and revoked schools.\r\n\r\n> **API Endpoint:** https://xporter.groupcall.com/api/XporterOnDemand/GetXodSchools\r\n> **HTTP Method:** GET\r\n\r\nAvailable parameters:\r\n\r\n|**Parameter**|**Type**|**Example**|**Description**|\r\n|----------------|-------|----|--|\r\n|includePendingAuthorisation|Bool|https://xporter.groupcall.com/api/XporterOnDemand/GetXodSchools?includePendingAuthorisation=true|Include pending authorisation schools|\r\n|estab|String|https://xporter.groupcall.com/api/XporterOnDemand/GetXodSchools?estab=3281102|Return a single school|\r\n\r\nExample response:\r\n```json\r\n{\r\n    \"Authorised\": [\r\n        {\r\n            \"estab\": \"3281101\",\r\n            \"schoolName\": \"Groupcall SIMS7 Primary\",\r\n            \"dateAuthorised\": \"2017-06-02T10:05:01\",\r\n            \"scopesAuthorised\": \"Address,AgencyAgent,AssessmentResults,Attendance,Conduct,Photos,Staff\",\r\n            \"installedStatus\": true,\r\n            \"installMessage\": null\r\n        },\r\n        {\r\n            \"estab\": \"3281102\",\r\n            \"schoolName\": \"Groupcall SIMS7 Secondary\",\r\n            \"dateAuthorised\": \"2017-06-02T10:05:01\",\r\n            \"scopesAuthorised\": \"Address,AgencyAgent,AssessmentResults,Attendance,Conduct,Photos,Staff\",\r\n            \"installedStatus\": true,\r\n            \"installMessage\": null\r\n        }\r\n    ],\r\n    \"Revoked\": [\r\n        {\r\n            \"estab\": \"3281103\",\r\n            \"schoolName\": \"Groupcall SIMS7 Secondary (Authorisation Test)\",\r\n            \"dateRevoked\": \"2019-05-13T00:00:00\"\r\n        }\r\n    ],\r\n    \"PendingAuthorisation\": [\r\n        {\r\n            \"estab\": \"3281110\",\r\n            \"schoolName\": \"Groupcall Bromcom Secondary\",\r\n            \"dateInvited\": \"2018-06-26T10:25:37\",\r\n            \"installedStatus\": true,\r\n            \"installMessage\": null\r\n        }\r\n    ]\r\n}\r\n```"
      operationId: GetXodSchools
      parameters:
      - name: estab
        in: query
        description: Return a single school
        required: false
        schema:
          type: string
      - name: includePendingAuthorisation
        in: query
        description: Include pending authorisation schools
        required: false
        schema:
          type: boolean
      responses:
        "200":
          $ref: "#/components/responses/GetXodSchools"
  /XporterOnDemand/SchoolRegister:
    post:
      tags:
      - Management APIs
      - Onboarding
      summary: Invite a school or schools
      description: "Allows you to programmatically invite a school to share data with your application. Schools can trigger this process themselves from within your application.\r\n\r\nUsing the API to invite schools initiates the standard onboarding process which will send an invitation email to schools allowing them to begin the authorisation flow."
      operationId: Invite a school or schools
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RegistrationType:
                  type: string
                  enum:
                  - Live
                  - Test
                Schools:
                  type: array
                  items:
                    required:
                    - DfesCode
                    - LeaCode
                    - PartnerApplicationId
                    - PartnerName
                    - PartnerRegisteredEmail
                    - SchoolContactEmail
                    - SchoolContactFirstName
                    - SchoolContactLastName
                    - SchoolContactPhone
                    - SchoolName
                    - WeAcceptGroupcallUsagePolicy
                    type: object
                    properties:
                      LeaCode:
                        type: string
                        description: Local Authority code for the school
                      DfesCode:
                        type: string
                        description: Establishment code for the school
                      SchoolName:
                        type: string
                        description: Name of the school
                      SchoolContactFirstName:
                        type: string
                        description: First Name of the school contact who should be expecting to be contacted
                      SchoolContactLastName:
                        type: string
                        description: Last Name of the school contact who should be expecting to be contacted
                      SchoolContactEmail:
                        type: string
                        description: Email address of the school contact
                        format: email
                      SchoolContactPhone:
                        type: string
                        description: "Phone number of the school contact (If this is a mobile, it can be used for self service resets)"
                      PartnerApplicationId:
                        type: string
                        description: "PartnerId of the application the school is being invited to\t"
                      PartnerName:
                        type: string
                        description: "Display name of the application as displayed under Partner Settings for the application in the Manage portal\t"
                      PartnerRegisteredEmail:
                        type: string
                        description: "Email address listed as Activation Email under Partner Settings for the application in the Manage portal\t"
                        format: email
                      ScopesToAuthorise:
                        type: string
                        description: Provide subset of your application scopes
                        format: CSV
                        nullable: true
                      AuthParams:
                        type: string
                        description: Pass arbitrary string containing information that we will pass back to you during the authorisation POST. This might be useful for identifying a school by your internal Id or specifying a location that your app can interpret and perform a specific additional action. The property accepts any string value up to 4KB in size and will return it to you URL encoded.
                        nullable: true
                      WeAcceptGroupcallUsagePolicy:
                        type: boolean
                        description: "Set this to true to indicate that you as a partner are confirming that the details provided are accurate and you are not misusing the API to create false registrations\t"
              x-examples:
                Example 1:
                  RegistrationType: Test
                  Schools:
                  - LeaCode: "330"
                    DfesCode: "2005"
                    SchoolName: 1001 Primary School
                    SchoolContactFirstName: David
                    SchoolContactLastName: Smith
                    SchoolContactEmail: dsmith@0001.sch.uk
                    SchoolContactPhone: "0700000000"
                    PartnerApplicationId: dev.rebellion.com
                    PartnerName: Rebellion
                    PartnerRegisteredEmail: partnername@dev.rebellion.com
                    WeAcceptGroupcallUsagePolicy: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  Schools:
                    type: array
                    items:
                      type: object
                      properties:
                        LeaCode:
                          type: string
                          description: The Local Authority code for the school
                        DfesCode:
                          type: string
                          description: The establishment number of the school
                        Status:
                          type: string
                          description: "Whether the request was successful\r\n- OK\r\n- Error"
                        Message:
                          type: string
                          description: "The action performed for the school registration\r\n- On OK: Update\r\n- On Error example: Partner Application Id does not match the header"
                x-examples:
                  Example 1:
                    Schools:
                    - LeaCode: "202"
                      DfesCode: "2001"
                      Status: OK
                      Message: Update
                    - LeaCode: "891"
                      DfesCode: "2788"
                      Status: OK
                      Message: Update
                    - LeaCode: "320"
                      DfesCode: "2076"
                      Status: OK
                      Message: Update
      security:
      - IdaasSTSToken: []
  /XporterOnDemand/RevokeDataAccess:
    post:
      tags:
      - Management APIs
      summary: Revoke Data Access
      description: Revoke access and stop the data feed between a school and partner
      operationId: revokeAccess
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RevokeAccess"
          text/plain:
            schema:
              type: string
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
        "401":
          description: Invalid Authentication Token
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - IdaasSTSToken: []
  /XporterOnDemand/HasXporter:
    get:
      tags:
      - Management APIs
      summary: Check Estab
      description: Check if an estab has Xporter on Demand setup
      operationId: checkEstabXoD
      parameters:
      - name: Estab
        in: query
        description: 7 digit estab code for the estab to check
        required: true
        schema:
          type: string
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Scopes:
                    type: array
                    items:
                      $ref: "#/components/schemas/BaseResponse"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - IdaasSTSToken: []
  /Webhook:
    post:
      tags:
      - Webhook APIs
      summary: Data Changes
      description: Receive a callback if Xporter detects data for a specified database data has changed
      operationId: databasewebhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DataChange"
          text/plain:
            schema:
              type: string
        required: true
      responses:
        "200":
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  Scopes:
                    type: array
                    items:
                      $ref: "#/components/schemas/BaseResponse"
                allOf:
                - $ref: "#/components/schemas/BaseResponse"
                - type: object
        "401":
          description: Invalid Authentication Token
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BaseResponse"
      security:
      - IdaasSTSToken: []
components:
  schemas:
    BaseResponse:
      type: object
      properties:
        Message:
          type: string
          description: Additional response message
          nullable: true
        ExceptionType:
          type: string
          description: Exception type if present
          nullable: true
        ExceptionMessage:
          type: string
          description: Exception message if present
          nullable: true
        InnerException:
          type: string
          description: Exception detail if present
          nullable: true
    RevokeAccess:
      type: object
      properties:
        Estab:
          type: string
          description: The 7 digit Estab ID you wish to revoke
        RevokeDate:
          type: string
          description: The date from which to revoke access in dd:MM:yyyy format (provide either this or RevokeDateTime)
        RevokeDateTime:
          type: string
          description: The date from which to revoke access in dd:MM:yyyy format (provide either this of RevokeDate)
    DataChange:
      type: object
      properties:
        url:
          type: string
          description: The API call to Xporter with your estab and database name to recieve data change callbacks for.
          example: https://xporter.groupcall.com/TryIt/Callback?estab=3281234&database=xodschooldata
        DatabaseName:
          type: string
          description: The database you wish to recieve data change notifications for.
          example: XodSchoolData
    CancelInvite:
      type: object
      properties:
        Estab:
          type: string
          description: The 7 digit Estab ID you wish to revoke
    Token:
      type: object
      properties:
        Estab:
          type: string
          description: Organisation Id
        Expires:
          type: string
          format: date-time
        Name:
          type: string
          description: Application Name
        RelyingParty:
          type: string
          description: Application Name
        Scopes:
          type: array
          items:
            type: string
    TokenResponse:
      type: object
      properties:
        token:
          type: string
          description: Token
        Expires:
          type: string
          format: date-time
        Message:
          type: string
          description: Message
        ExceptionType:
          type: string
          description: ExceptionType
        ExceptionMessage:
          type: string
          description: ExceptionType
        InnerException:
          type: string
          description: ExceptionType
    Scope:
      type: object
      properties:
        Name:
          type: string
          description: Name of the scope
        Category:
          type: string
          description: Group the scope belongs to
        Description:
          type: string
          description: Description of what the scope provides access to
    Log:
      type: object
      properties:
        RowKey:
          type: string
          description: Unique log reference
        DateTime:
          type: string
          description: Log timestamp
          format: date-time
        DateTimeString:
          type: string
          description: Log timestamp string formatted
        Estab:
          type: string
          description: Establishment ID
        User:
          type: string
          description: User or application making the request
        Type:
          type: string
          description: Log level type
        Id:
          type: string
          description: ID of the query executed
        Message:
          type: string
          description: Query result message
        Request:
          type: string
          description: Specific request level detail
        Query:
          type: string
          description: Query string parameters passed
          nullable: true
    meta:
      type: object
      properties:
        Id:
          type: integer
          description: ID
        MIS:
          type: string
          description: MIS name
        Version:
          type: string
          description: Version
        DateTime:
          type: string
          description: DateTime string of run time
          format: date-time
        Estab:
          type: string
          description: Establishment ID
    __pagination__:
      type: object
      properties:
        PageSize:
          type: integer
          description: Page size
        PageNumber:
          type: integer
          description: Current page number
        PageCount:
          type: integer
          description: Total page count
        RowCount:
          type: integer
          description: Total row count
        NextPage:
          type: string
          description: relative URL to next page
    dbStatus:
      type: object
      properties:
        result:
          type: array
          items:
            type: object
            properties:
              ID:
                type: string
              Description:
                type: string
              Source:
                type: string
    Students:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          XID:
            type: string
          ExternalId:
            type: string
          IdaasId:
            type: string
          Pseudoname:
            type: string
          Forename:
            type: string
          Surname:
            type: string
          DisplayName:
            type: string
          AdmissionNo:
            type: string
          Gender:
            type: string
          RegGroupId:
            type: string
          RegGroup:
            type: string
          YearGroupId:
            type: string
          YearGroup:
            type: string
          StandardYearGroupCode:
            type: string
          StandardYearGroupName:
            type: string
          HouseGroupId:
            type: string
          HouseGroup:
            type: string
          UPN:
            type: string
          CandidateNo:
            type: string
          ExamNumber:
            type: string
          ExamCentre:
            type: string
          DateofBirth:
            type: string
          UniqueLearnerNumber:
            type: string
          EnrolmentStatus:
            type: string
          Boarder:
            type: number
          LegalForename:
            type: string
          LegalSurname:
            type: string
          EntryDate:
            type: string
          FsmEligible:
            type: number
          FSMTransitionProtection:
            type: number
          UPFSMException:
            type: number
          UniformAllowance:
            type: number
          PupilPremium:
            type: number
          YSSA:
            type: string
          EAL:
            type: number
          FSMEver6:
            type: number
          Gifted:
            type: number
          Disabled:
            type: number
          ServiceChild:
            type: string
          InLeaCare:
            type: number
          EverInCare:
            type: number
          IsYoungCarer:
            type: number
          OnReport:
            type: number
          ReligionCode:
            type: string
          Religion:
            type: string
          EthnicityCode:
            type: string
          Ethnicity:
            type: string
          EthnicitySource:
            type: string
          HomeLanguage:
            type: string
          HomeLanguageCode:
            type: string
          FirstLanguage:
            type: string
          FirstLanguageCode:
            type: string
          FirstLanguageSource:
            type: string
          NationalIdentity:
            type: string
          IsTraveller:
            type: number
          ParentalSalutation:
            type: string
          AddressBlock:
            type: string
          HouseName:
            type: string
          Apartment:
            type: string
          Street:
            type: string
          District:
            type: string
          TownOrCity:
            type: string
          PostCode:
            type: string
          Country:
            type: string
          StudentStatus:
            type: string
          PartTime:
            type: number
          AttendanceMode:
            type: string
          YearTaughtIn:
            type: string
          NCYear:
            type: string
          KeyStage:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
          FreeSchoolTransportEligible:
            type: string
          TravelProvidedByLEA:
            type: string
          TopUpFundingIndicator:
            type: string
          SpeaksWelshCode:
            type: string
          Newbes:
            type: number
    StudentSiblings:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          SiblingStudentId:
            type: string
    StudentSchoolHistory:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          Forename:
            type: string
          Surname:
            type: string
          PreviousSchoolName:
            type: string
          LEA:
            type: string
          EstabId:
            type: string
          LeavingDate:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentInterventions:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "1796"
          StudentId:
            type: string
            example: "13513"
          StudentIdaasId:
            type: string
            example: PL-13513
          InterventionId:
            type: string
            example: "67"
          SessionsAttended:
            type: string
            example: "0"
    StudentAlternativeProvision:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
            example: string
          StudentMis_Id:
            type: string
            example: string
          StartDate:
            type: string
            example: string
          EndDate:
            type: string
            example: string
          AttendancePattern:
            type: string
            example: string
          SessionsPerWeek:
            type: string
            example: string
          ProvisionSettingType:
            type: string
            example: string
          PrimaryPlacementReason:
            type: string
            example: string
          PlacementAssociation:
            type: string
            example: string
          CompanyHouseNo:
            type: string
            example: string
          PostCode:
            type: string
            example: string
          URN:
            type: string
            example: string
          UKPRN:
            type: string
            example: string
          Notes:
            type: string
            example: string
    StudentContact:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: PL-12284.PC-12285
          StudentId:
            type: string
            example: "12284"
          ContactId:
            type: string
            example: "12285"
          Relationship:
            type: string
            example: Mother
          Priority:
            type: number
            example: 1
          ParResp:
            type: number
            example: 1
          CourtOrder:
            type: number
            example: 0
          RowHash:
            type: string
            example: C6583C1E92D0C049135D597F9763F61994821351
          LastUpdated:
            type: string
            example: 2025-02-14T19:14:37.135
    StudentEnrolmentHistory:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: 12284.2018-09-01
          StudentIdaasId:
            type: string
            example: PL-12284
          Student_MisId:
            type: string
            example: "12284"
          EnrolmentStatusCode:
            type: string
            example: C
          StartDate:
            type: string
            example: 2018-09-01
          LastUpdated:
            type: string
            example: 2025-02-20T00:00:00
          RowHash:
            type: string
            example: "-4513026369464045208"
    ConditionLookups:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "1"
          ConditionDescription:
            type: string
            example: Epilepsy
          RowHash:
            type: string
            example: 23FE2E29C0D30D7D852F73EA83FB59423C5DEB16
          LastUpdated:
            type: string
            example: 2022-02-23T17:33:58.351
    StudentConditions:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "1.12946"
          StudentId:
            type: string
            example: "12946"
          MedicalConditionId:
            type: string
            example: "1"
          ConditionDescription:
            type: string
            example: Epilepsy
          InfoReceivedDate:
            type: string
            example: 2019-07-25
          RowHash:
            type: string
            example: 564C1F04183849F8A12A1D4334AE021D7DEB61EA
          LastUpdated:
            type: string
            example: 2022-02-23T17:33:59.461
    StudentMedical:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
            example: 10495
          EmergencyConsent:
            type: number
            example: 0
          PregnantPupil:
            type: number
            example: 0
          RowHash:
            type: string
            example: C91985C8620CA1023FF3A16C28A6A783239744AF
          LastUpdated:
            type: string
            example: 2025-02-14T19:12:45.618
    StudentMedicalNotes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "14992"
          StudentId:
            type: string
            example: "13939"
          Note:
            type: string
            example: Mum informed that Max has eczema and will be carrying cream with him.
          Summary:
            type: string
            example: Eczema
          LastModified:
            type: string
            example: 2022-05-17T11:47:00
          RowHash:
            type: string
            example: 5568AB9304ACBB7F02F7B4C16E1366B7FB63E6DD
          LastUpdated:
            type: string
            example: 2024-09-05T01:58:16.791
    StudentMedicalEvents:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "320"
          StudentMis_id:
            type: string
            example: "13047"
          EventType:
            type: string
            example: Medical Inspection
          EventDescription:
            type: string
            example: Medical Inspection
          EventDate:
            type: string
            example: 2020-03-11
    MedicalEventNotes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: "13778"
          MedicalEventId:
            type: string
            example: "320"
          Summary:
            type: string
            example: Asthma
          Note:
            type: string
            example: Adam feeling wheezie after PE today. Adam taken rest in sick bay for 10 minutes no inhaler needed.
    Aspects:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ExternalId:
            type: string
          AspectType:
            type: string
          Name:
            type: string
          Description:
            type: string
          Supplier:
            type: string
          KS1:
            type: number
          KS2:
            type: number
          KS3:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    Templates:
      type: array
      items:
        type: object
    Marksheets:
      type: array
      items:
        type: object
    Columns:
      type: array
      items:
        type: object
    ResultSets:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ExternalId:
            type: string
          Name:
            type: string
          Supplier:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    GradeSetHistory:
      type: array
      items:
        type: object
    GradeSets:
      type: array
      items:
        type: object
    Grades:
      type: array
      items:
        type: object
    MarkSets:
      type: array
      items:
        type: object
    Categories:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          categoryName:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentMealPatterns:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
            example: 12457
          Forename:
            type: string
            example: Rosario
          Surname:
            type: string
            example: Silva
          MondayCode:
            type: string
            example: SM
          TuesdayCode:
            type: string
            example: PL
          WednesdayCode:
            type: string
            example: SM
          ThursdayCode:
            type: string
            example: SM
          FridayCode:
            type: string
            example: PL
          MondayType:
            type: string
            example: School Meal
          TuesdayType:
            type: string
            example: Packed Lunch
          WednesdayType:
            type: string
            example: School Meal
          ThursdayType:
            type: string
            example: School Meal
          FridayType:
            type: string
            example: Packed Lunch
          LastUpdated:
            type: string
            example: 2022-02-23T17:34:22.851
          RowHash:
            type: string
            example: FBF13D84EFD269C9464B6A45BBF130295B531B04
    StudentMealTypes:
      type: array
      items:
        type: object
        properties:
          Code:
            type: string
            example: SM
          Description:
            type: string
            example: School Meal
    StudentUDFs:
      type: array
      example: []
      items:
        type: object
        properties:
          TODO-:
            type: string
    Endpoints:
      type: array
      items:
        type: object
        properties:
          Version:
            type: string
            example: "1"
          Id:
            type: string
            example: school.applications
          Method:
            type: string
            example: GET
          Scope:
            type: string
            example: Applications
          Path:
            type: string
            example: "/api/v1/School/{estab}/applications"
          Description:
            type: string
            example: Get extended details for Applicants and Applications
          Documentation:
            type: string
            example: ""
          Query:
            type: string
            example: xod.1.StudentApplications
          Options:
            type: string
            example: ""
          Parameters:
            type: string
            example: ""
          Published:
            type: boolean
            example: true
          PageSize:
            type: number
            example: 0
    Queries:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
            example: xod.1.Students
          Description:
            type: string
            example: List of students
          Scope:
            type: string
            example: "Student,StudentLite"
          ResultSetNames:
            type: string
            example: "Students,StudentSiblings,meta"
          Options:
            type: string
            example: |-
              includePhotos:Set to enable the student photo column in the result set
              includeGroupIds:Set to include GroupIds column
              includeGroupIdaasIds:Set to include GroupIdaasIds column
              includeGroupXIDs:Set to include GroupXIDs column
              includeParentIdaasIds:Set to include ParentIdaasIds column
              includeParentXIDs:Set to include ParentXIDs column
              includeAttStats:Set to include aggregated session attendance stats
              includeAttMarkString:Include packed mark string
              includeSiblingsList:Set to include StudentSiblingIds column
              includeSiblingsResultset:includeSiblingsResultset
              includeLeavers: includeLeaversResultset
              includePreAdmissions: includePreAdmissionsResultset
              includeGuests: include Guest students
              includeSubsidiary:include students with Subsidiary Enrolment
              includeComms: include students home email address, home phone and mobile phone
          Parameters:
            type: string
            example: |
              id:optional id
              updatedSince:filter by LastUpdated greater than this date
              yearGroupId:Filter by specific Year Group Id obtained group school.groups endpoint
              studentStatus:Filter to specific student status (OnRoll,Leaver,PreAdmission)
    Usage:
      type: array
      items:
        type: object
        properties:
          Estab:
            type: string
            example: "3287731"
          RP:
            type: string
            example: XoD
          Areas:
            type: array
            items:
              type: object
              properties:
                Area:
                  type: string
                  example: Error
                Total:
                  type: number
                  example: 306
                Today:
                  type: number
                  example: 5
                ThisMonth:
                  type: number
                  example: 21
                History:
                  type: array
                  items:
                    type: object
                    properties:
                      month:
                        type: string
                        example: 2025-02
                      count:
                        type: number
                        example: 21
    GDPR:
      type: array
      items:
        type: object
        properties:
          IsOptIn:
            type: boolean
            example: false
          Estab:
            type: string
            example: "3287731"
          RelyingParty:
            type: string
            example: XoD
          MIS:
            type: string
            example: simsnet
          StudentIds:
            type: array
            example: []
            items:
              type: array
              items:
                type: string
          StaffIds:
            type: array
            example: []
            items:
              type: array
              items:
                type: string
          ContactIds:
            type: array
            example: []
            items:
              type: array
              items:
                type: string
          OtherIds:
            type: array
            example: []
            items:
              type: array
              items:
                type: string
    Achievements:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ConductId:
            type: string
          AchievementType:
            type: string
          Date:
            type: string
          RecordedBy:
            type: string
          RecordedOn:
            type: string
          Subject:
            type: string
          Category:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentAchievements:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          AchievementId:
            type: string
          Points:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    StaffAchievements:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffId:
            type: string
          AchievementId:
            type: string
          StaffRole:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Agency:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          AgencyType:
            type: string
          AgencyName:
            type: string
          HouseName:
            type: string
          Street:
            type: string
          Town:
            type: string
          County:
            type: string
          PostCode:
            type: string
          Country:
            type: string
          AddressBlock:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Agent:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Title:
            type: string
          Surname:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    AgencyStudent:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          AgencyId:
            type: string
          StudentId:
            type: number
          AgencyStudentLinkType:
            type: string
          AgencyStudentStartDate:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    AgentStudent:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          AgentId:
            type: number
          StudentId:
            type: number
          AgentStudentLinkType:
            type: string
          AgentStudentStartDate:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    AgencyAgent:
      type: array
      items:
        type: object
    Applications:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          ApplicantId:
            type: number
          Status:
            type: string
          IntakeGroup:
            type: string
          ExternalClassesAttendance:
            type: number
          AdmissionGroup:
            type: string
          AdmissionSeason:
            type: string
          AdmissionYear:
            type: string
          AdmissionDate:
            type: string
          EntryAge:
            type: number
          EntryAgeYM:
            type: string
          YearGroupName:
            type: string
          EnrolmentStatus:
            type: string
          VisitsPlanned:
            type: number
          VisitsAttended:
            type: number
          RowHash:
            type: string
          LastUpdated:
            type: string
    Applicants:
      type: array
      items:
        type: object
        properties:
          ID:
            type: number
          LegalFirstName:
            type: string
          LegalSurname:
            type: string
          PreferredForename:
            type: string
          PreferredSurname:
            type: string
          DOB:
            type: string
          AgeYM:
            type: string
          Age:
            type: number
          Gender:
            type: string
          ServiceChild:
            type: number
    ApplicantSENProvisions:
      type: array
      items:
        type: object
    ApplicantSENNeeds:
      type: array
      items:
        type: object
        properties:
          StudentID:
            type: number
          NeedTypeDescription:
            type: string
          NeedTypeCode:
            type: string
          Rank:
            type: number
          StartDate:
            type: string
          Active:
            type: number
          RowHash:
            type: string
          LastUpdated:
            type: string
    ApplicantMedicalEvents:
      type: array
      items:
        type: object
    assessmentresults:
      type: array
      items:
        type: object
    AttendCodes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Mark:
            type: string
          Description:
            type: string
          MeaningDescription:
            type: string
          ShortMeaningDescription:
            type: string
          PhysicalMeaning:
            type: string
          Active:
            type: number
    AttendMarks:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Date:
            type: string
          InstanceId:
            type: string
          StudentId:
            type: string
          Type:
            type: string
    DateRange:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Date:
            type: string
          StartDate:
            type: string
          StartDateStr:
            type: string
          StartDateTime:
            type: string
          EndDate:
            type: string
          EndDateStr:
            type: string
          EndDateTime:
            type: string
    AttStatsByWeek:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          WeekStartDate:
            type: string
          WeekEndDate:
            type: string
          NumUnknownMarks:
            type: number
          MarkIs_PresentAM:
            type: number
          MarkIs_L:
            type: number
          MarkIs_PresentPM:
            type: number
          MarkIs_W:
            type: number
          MarkIs_B:
            type: number
          MarkIs_V:
            type: number
          MarkIs_J:
            type: number
          MarkIs_P:
            type: number
          MarkIs_S:
            type: number
          MarkIs_T:
            type: number
          MarkIs_R:
            type: number
          MarkIs_E:
            type: number
          MarkIs_C:
            type: number
          MarkIs_H:
            type: number
          MarkIs_M:
            type: number
          MarkIs_I:
            type: number
          MarkIs_N:
            type: number
          MarkIs_G:
            type: number
          MarkIs_O:
            type: number
          MarkIs_U:
            type: number
          MarkIs_NoMark:
            type: number
          NumPossibleMarks:
            type: number
          NumMissingMarks:
            type: number
          NumPresentMarks:
            type: number
          NumApprovedEAMarks:
            type: number
          NumAuthAbsMarks:
            type: number
          NumUnauthAbsMarks:
            type: number
          NumLateMarks:
            type: number
          NumLateBeforeRegMarks:
            type: number
    AttendanceSummary:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          XID:
            type: string
          MIS_ID:
            type: string
          IdaasId:
            type: string
          AttStatsStartDate:
            type: string
          AttStatsEndDate:
            type: string
          NumPossMarks:
            type: number
          NumPresMarks:
            type: number
          NumAEAMarks:
            type: number
          NumAuthAbsMarks:
            type: number
          NumUnauthAbsMarks:
            type: number
          NumMissMarks:
            type: number
          NumLateMarks:
            type: number
          NumLateBeforeRegMarks:
            type: number
          Marks:
            type: string
          MarksCsv:
            type: string
    MinutesLate:
      type: array
      items:
        type: object
    AttendanceNotes:
      type: array
      items:
        type: object
    StatutoryComments:
      type: array
      items:
        type: object
    Behaviour:
      type: array
      items:
        type: object
    SchoolCalendar:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
          Category:
            type: string
          Description:
            type: string
          Type:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    ConductTypes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Type:
            type: string
          LocalId:
            type: number
          Description:
            type: string
          Points:
            type: number
          SubTypeLookup:
            type: string
          DisplayOrder:
            type: number
          Active:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    ConductLookups:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          LookupType:
            type: string
          LocalId:
            type: number
          Code:
            type: string
          Description:
            type: string
          DisplayOrder:
            type: number
          Active:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    ConductPoints:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
    contactuserdefinedfields:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
    detentionlookups:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
    DiscountCodes:
      type: array
      items:
        type: object
        properties:
          Year:
            type: string
          QAN:
            type: string
          QualificationTitle:
            type: string
          SyllabusCode:
            type: string
          SyllabusTitle:
            type: string
          DiscountCode:
            type: string
          DiscountCodeDescription:
            type: string
    EntitlementGroups:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          ShortName:
            type: string
          FullName:
            type: string
    EntitlementGroupStudents:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          EntitlementGroupId:
            type: string
          StudentId:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
    detentions:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
    DietaryNeeds:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Code:
            type: string
          Description:
            type: string
    StudentDietaryNeeds:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          DietaryNeedsId:
            type: string
          StudentId:
            type: string
          StudentLocalId:
            type: string
    Contacts:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          XID:
            type: string
          IdaasId:
            type: string
          ExternalId:
            type: string
          Title:
            type: string
          Surname:
            type: string
          Forename:
            type: string
          DisplayName:
            type: string
          Gender:
            type: string
          TranslatorRequired:
            type: number
          HomePhone:
            type: string
          AddressBlock:
            type: string
          HouseNo:
            type: string
          Street:
            type: string
          District:
            type: string
          TownOrCity:
            type: string
          PostCode:
            type: string
          Country:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Counts:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Area:
            type: string
          Count:
            type: number
    ExamCandidates:
      type: array
      items:
        type: object
    ExternalCandidates:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          PersonId:
            type: string
          CandidateId:
            type: string
          UCI:
            type: string
    ExamSittings:
      type: array
      items:
        type: object
    ExamArrangements:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          studentId:
            type: number
          description:
            type: string
          ExtraTime:
            type: string
    ExamEntries:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          StudentMis_Id:
            type: number
          EntryDate:
            type: string
          AspectId:
            type: number
          ResultsetId:
            type: number
          ExamSeasonId:
            type: number
          ExamBoardId:
            type: number
          ExamLevelId:
            type: number
          QanId:
            type: number
          SyllabusCodeId:
            type: number
          OptionCodeId:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    ForecastResults:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          StudentId:
            type: number
          ForecastResult:
            type: string
          ForecastDate:
            type: string
          AspectId:
            type: number
          ResultsetId:
            type: number
          ExamSeasonId:
            type: number
          ExamBoardId:
            type: number
          ExamLevelId:
            type: number
          QanId:
            type: number
          SyllabusCodeId:
            type: number
          OptionCodeId:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    ExamResults:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          StudentId:
            type: number
          Result:
            type: string
          ResultDate:
            type: string
          AspectId:
            type: number
          ResultsetId:
            type: number
          ExamSeasonId:
            type: number
          QanId:
            type: number
          SyllabusCodeId:
            type: number
          ExamBoardId:
            type: number
          ExamLevelId:
            type: number
          OptionCodeId:
            type: number
          RowHash:
            type: string
          LastUpdated:
            type: string
    Resultsets:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Name:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Gradesets:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: number
          Name:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    GradesetHistories:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: number
          StartDate:
            type: string
          GradeSetId:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    Marksets:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: number
          AspectId:
            type: number
          StartDate:
            type: string
          MinValue:
            type: string
          MaxValue:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    ExamSeasons:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Name:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
    QANs:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Qan:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    SyllabusCodes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    OptionCodes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          Title:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    ExamBoards:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          Description:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    ExamLevels:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          Description:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    ExamSeries:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          Title:
            type: string
          SeasonId:
            type: number
          BoardId:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentFAM:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          StudentMis_Id:
            type: string
          FAMType:
            type: string
          FAMCode:
            type: string
          FAMDescription:
            type: string
          AcademicYear:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    LearnerSupport:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          StudentMis_Id:
            type: string
          LearnerSupport:
            type: string
          Code:
            type: string
          AwardDate:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    GroupHistory:
      type: array
      items:
        type: object
    Group:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          XID:
            type: string
          ExternalId:
            type: string
          IdaasId:
            type: string
          Type:
            type: string
          Code:
            type: string
          Name:
            type: string
          PrimaryStaffId:
            type: string
          Staff:
            type: string
          NumStudents:
            type: number
          RowHash:
            type: string
          LastUpdated:
            type: string
          PlatformId:
            type: number
    StaffMembers:
      type: array
      items:
        type: object
    StudentMembers:
      type: array
      items:
        type: object
    GroupTypes:
      type: array
      items:
        type: object
    SubGroups:
      type: array
      items:
        type: object
    StandardYearGroupLookup:
      type: array
      items:
        type: object
        properties:
          id:
            type: string
          GroupLocalId:
            type: string
          GroupMis_Id:
            type: string
          StandardYearGroupCode:
            type: string
          StandardYearGroupName:
            type: string
    health:
      type: array
      items:
        type: object
        properties:
          CommsChecksFailed:
            type: string
          CommsChecksPassed:
            type: string
          ConsentedScopes:
            type: string
          EmergeServerUrl:
            type: string
          EmergeVersion:
            type: string
          EmergeVersionStatus:
            type: string
          EndpointInfoExpires:
            type: string
          EndpointInfoLastError:
            type: string
          EndpointInfoLastFetched:
            type: string
          EndpointInfoStatus:
            type: string
          EndpointTestActionsQueueOk:
            type: string
          EndpointTestDate:
            type: string
          EndpointTestMessage:
            type: string
          EndpointTestServiceBusOk:
            type: string
          EndpointTestSignalROk:
            type: string
          EndpointTestStatus:
            type: string
          HasActionsQueue:
            type: string
          HasSignalR:
            type: string
          LastUpdated:
            type: string
          MIS:
            type: string
          MachineName:
            type: string
          SchoolConnectionCheckLastError:
            type: string
          SchoolConnectionCheckStatus:
            type: string
          SchoolDataExpires:
            type: string
          SchoolDataLastError:
            type: string
          SchoolDataLastFetched:
            type: string
          SchoolDataAgeDays:
            type: number
          SchoolDataStatus:
            type: string
          TechContactEmail:
            type: string
          TechContactName:
            type: string
          TotalPhysicalMemoryGB:
            type: string
          Use:
            type: string
          UseActionsQueue:
            type: string
          UseSignalR:
            type: string
          WindowsVersion:
            type: string
          XodError:
            type: string
          XodStatus:
            type: string
          XodVersion:
            type: string
          XodVersionStatus:
            type: string
          XporterLoginAccount:
            type: string
          XporterVersion:
            type: string
          XporterVersionStatus:
            type: string
    HistoricalAttendanceSummary:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
    InterventionOvervews:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          OverviewName:
            type: string
          Area:
            type: string
          Subject:
            type: string
          Reason:
            type: string
    Interventions:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          InterventionName:
            type: string
          InterventionOverviewId:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
          PlannedSessions:
            type: string
          FixedCosts:
            type: string
          StaffCosts:
            type: string
          TotalCosts:
            type: string
          StudentCosts:
            type: string
          StudentCount:
            type: string
    InterventionStaff:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          InterventionId:
            type: string
          StaffId:
            type: string
          StaffIdaasId:
            type: string
    InterventionContacts:
      type: array
      items:
        type: object
    InterventionAgents:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          InterventionId:
            type: string
          AgentId:
            type: string
          AgentIdaasId:
            type: string
    DocumentAttachmentMeta:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          PersonType:
            type: string
          PersonMis_Id:
            type: string
          PersonLocalId:
            type: string
          TypeCode:
            type: string
          AttachmentName:
            type: string
          LastModified:
            type: string
          Confidential:
            type: number
    DocumentAttachments:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: number
          DocumentTypeName:
            type: string
          Size:
            type: number
          CompressedSize:
            type: number
          Summary:
            type: string
          LastModified:
            type: string
          Confidential:
            type: number
    DocumentTypes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          DocumentTypeName:
            type: string
          Code:
            type: string
    LookupMeta:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Mis_Id:
            type: string
          Code:
            type: string
          Description:
            type: string
          Type:
            type: string
    LookupTypes:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Type:
            type: string
    EndpointSupport:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          XodEndpoint:
            type: string
          ResultSet:
            type: string
          EndpointField:
            type: string
          DatabaseName:
            type: string
          TableName:
            type: string
          TableField:
            type: string
          ScriptField:
            type: string
          SupportStatus:
            type: string
          Scope:
            type: string
          FieldDescription:
            type: string
          FieldExample:
            type: string
          FieldScope:
            type: string
          MIS:
            type: string
          sortid:
            type: number
    ParentalConsents:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentMisId:
            type: number
          StudentLocalID:
            type: string
          ParentalConsentLookupId:
            type: string
    ParentalConsentLookups:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ConsentDescription:
            type: string
    payscales:
      type: array
      items:
        type: object
    Post16Study:
      type: array
      items:
        type: object
    PriorAttainment:
      type: array
      items:
        type: object
    PersonComms:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          PersonId:
            type: string
          PersonType:
            type: string
          CommsType:
            type: string
          LocationCode:
            type: string
          Priority:
            type: number
          IsDefault:
            type: number
          Value:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Photos:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          PersonId:
            type: string
          XID:
            type: string
          PersonType:
            type: string
          PersonName:
            type: string
          Photo:
            type: string
          RowHash:
            type: string
          LastUpdated:
            type: string
    SchoolInfo:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Name:
            type: string
          Head:
            type: string
          MainContact:
            type: string
          Telephone:
            type: string
          Email:
            type: string
          DeniNo:
            type: string
          Governance:
            type: string
          Phase:
            type: string
          GenderMix:
            type: string
          GenderMixCode:
            type: string
          ExamCentre:
            type: string
          Address:
            type: string
          EstabId:
            type: string
          CurrentAcademicYear:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    Sites:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Rank:
            type: string
          Name:
            type: string
          Email:
            type: string
          Phone:
            type: string
          PrimaryContact:
            type: string
          RowHash:
            type: string
          LastUpdated:
            type: string
    ScopeFieldDictionary:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          Endpoint:
            type: string
          EndpointScope:
            type: string
          FieldScope:
            type: string
          EndpointTable:
            type: string
          EndpointField:
            type: string
          Scope:
            type: string
          HasFieldFilter:
            type: string
    SeatingPlan:
      type: array
      items:
        type: object
    StudentSENTypeHistory:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          NeedTypeDescription:
            type: string
          NeedTypeCode:
            type: string
          Rank:
            type: string
          NeedStartDate:
            type: string
          Active:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentSENProvisionHistory:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          StudentId:
            type: string
          SENProvisionCode:
            type: string
          SENProvisionDescription:
            type: string
          SENProvisionStartDate:
            type: string
          Active:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentDisabilities:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentId:
            type: string
          Disability:
            type: string
          DisabilityStartDate:
            type: string
          Active:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
    StudentSENReviews:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentMis_Id:
            type: string
          ReviewType:
            type: string
          ReviewStatus:
            type: string
          ReviewDate:
            type: string
          SENStatus:
            type: string
          Comments:
            type: string
          SenCoordinatorName:
            type: string
          Roles:
            type: string
          StaffLocalId:
            type: string
          StaffMis_Id:
            type: string
          AgentLocalId:
            type: string
          AgentMis_id:
            type: string
    SENEvents:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentMis_Id:
            type: string
          EventType:
            type: string
          EventDate:
            type: string
    SENEventPersons:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          SENEventsId:
            type: string
          PersonName:
            type: string
          Roles:
            type: string
          ContactLocalId:
            type: string
          ContactMis_id:
            type: string
    SENStatements:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentMis_Id:
            type: string
          DateRequested:
            type: string
          ConsultationDate:
            type: string
          StatutoryAssessment:
            type: string
          StatementOutcome:
            type: string
          SubjectToTribunal:
            type: number
          DateCeased:
            type: string
          DateFinalised:
            type: string
          LEAAgentId:
            type: string
    SENStatementDocuments:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          SENStatementId:
            type: string
          DocumentId:
            type: string
    SENEHCP:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StudentMis_Id:
            type: string
          DateRequested:
            type: string
          ConsultationDate:
            type: string
          StatutoryAssessment:
            type: string
          EHCPOutcome:
            type: string
          SubjectToTribunal:
            type: number
          UndergoingSENDMediation:
            type: number
          DateFinalised:
            type: string
          Comments:
            type: string
          LEAAgentId:
            type: string
    SENEHCPDocuments:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          SENEHCPlanId:
            type: string
          DocumentId:
            type: string
    Staff:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          XID:
            type: string
          IdaasId:
            type: string
          ExternalId:
            type: string
          Title:
            type: string
          Suffix:
            type: string
          StaffCode:
            type: string
          StaffStatus:
            type: string
          TeacherCategory:
            type: string
          Forename:
            type: string
          Surname:
            type: string
          DisplayName:
            type: string
          WorkEmail:
            type: string
          Gender:
            type: string
          LegalForename:
            type: string
          LegalSurname:
            type: string
          DateOfBirth:
            type: string
          NINumber:
            type: string
          TeacherNumber:
            type: string
          EmploymentStart:
            type: string
          Roles:
            type: string
          RoleCodes:
            type: string
          HomePhone:
            type: string
          HLTAStatus:
            type: number
          QTS:
            type: number
          QTSRoute:
            type: string
          NPQHStatus:
            type: number
          EYTStatus:
            type: number
          EthnicityCode:
            type: string
          AddressBlock:
            type: string
          HouseName:
            type: string
          Apartment:
            type: string
          Street:
            type: string
          TownOrCity:
            type: string
          PostCode:
            type: string
          Country:
            type: string
          IsTeacher:
            type: number
          IsSupport:
            type: number
          IsGovernor:
            type: number
          LastUpdated:
            type: string
          RowHash:
            type: string
          IsThirdParty:
            type: number
    StaffHierarchy:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ParentStaffId:
            type: string
          ChildStaffId:
            type: string
          ParentRelationshipTitle:
            type: string
          ChildRelationshipTitle:
            type: string
          StartDate:
            type: string
    StaffVehicles:
      type: array
      items:
        type: object
        properties:
          StaffId:
            type: number
          VehicleID:
            type: number
          VehicleModel:
            type: string
          VehicleColour:
            type: string
          VehicleRegistration:
            type: string
    StaffNextOfKin:
      type: array
      items:
        type: object
        properties:
          StaffId:
            type: string
          ContactId:
            type: string
          StaffMis_Id:
            type: number
          ContactMis_Id:
            type: number
          FullName:
            type: string
          Forename:
            type: string
          Surname:
            type: string
          Title:
            type: string
          Role:
            type: string
          HomePhone:
            type: string
          HouseNumber:
            type: string
          Street:
            type: string
          Town:
            type: string
          Country:
            type: string
          PostCode:
            type: string
          AddressBlock:
            type: string
    StaffSWAC:
      type: array
      items:
        type: object
    StaffAbsence:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffId:
            type: number
          AbsenceStartDate:
            type: string
          AbsenceStartTime:
            type: string
          AbsenceEndDate:
            type: string
          AbsenceEndTime:
            type: string
          AbsenceType:
            type: string
          WorkingDaysLost:
            type: number
          HoursLost:
            type: number
          SSPExclusion:
            type: number
          AnnualLeave:
            type: number
          IndustrialInjury:
            type: number
          AuthorisedPayRate:
            type: string
          AbsenceNote:
            type: string
    AbsenceCertificate:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          AbsenceId:
            type: string
          CertDateReceived:
            type: string
          CertDateReceived1:
            type: string
          CertCertType:
            type: string
          CertSignedBy:
            type: string
          CertSignatoryType:
            type: string
    StaffChecks:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffMis_Id:
            type: string
          StaffLocalId:
            type: string
          StaffStatus:
            type: string
          CheckCode:
            type: string
          CheckDescription:
            type: string
          RequestDate:
            type: string
          ClearanceDate:
            type: string
          ClearanceLevel:
            type: string
    StaffContracts:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffId:
            type: string
          EmploymentType:
            type: string
          ServiceTerm:
            type: string
          PostCategory:
            type: string
          StdPostName:
            type: string
          StdPostCode:
            type: string
          ContractStartDate:
            type: string
          ContractHoursPerWeek:
            type: number
          ContractWeeksPerYear:
            type: number
          ContractFTE:
            type: number
          PayrollNumber:
            type: string
          PayFactor:
            type: number
          Salary:
            type: number
          SalaryFTE:
            type: number
          TotalPay:
            type: number
          LastPayReview:
            type: string
          PensionType:
            type: string
          SafeguardedSalary:
            type: string
          Origin:
            type: string
          EligibleForSWR:
            type: number
          SuperannuationSchemeValue:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    StaffRoles:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ContractId:
            type: string
          Code:
            type: string
          Role:
            type: string
          RoleStartDate:
            type: string
          LastUpdated:
            type: string
          RowHash:
            type: string
    StaffScales:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ContractId:
            type: string
          StartDate:
            type: string
          ScalePoint:
            type: number
          PayScale:
            type: string
          PayScaleCode:
            type: string
    StaffAllowances:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          ContractId:
            type: string
          StartDate:
            type: string
          Amount:
            type: number
          Type:
            type: string
          Description:
            type: string
          Code:
            type: string
    StaffWorkingPatterns:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffId:
            type: string
          StartTime:
            type: string
          EndTime:
            type: string
          DaysOfWeek:
            type: string
    StaffImpairments:
      type: array
      items:
        type: object
        properties:
          StaffId:
            type: number
          Impairment:
            type: string
          Category:
            type: string
          DateAdvised:
            type: string
          AffectsWorkingAbility:
            type: number
    StaffQualifications:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          StaffMis_Id:
            type: string
          StaffLocalId:
            type: string
          StaffStatus:
            type: string
          QualificationName:
            type: string
          QualificationDescription:
            type: string
          QualificationLevel:
            type: string
          FirstSubject:
            type: string
          DegreeClass:
            type: string
          OriginCountry:
            type: string
          Verified:
            type: number
    StaffTraining:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          StaffId:
            type: string
          Title:
            type: string
          Organiser:
            type: string
          Description:
            type: string
          Venue:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
          CourseFees:
            type: number
          OtherCosts:
            type: number
          TotalCost:
            type: number
          FullTime:
            type: number
          Completed:
            type: number
          NumDays:
            type: number
    StaffUDFs:
      type: array
      items:
        type: object
    Tags:
      type: array
      items:
        type: object
    Lessons:
      type: array
      items:
        type: object
    LessonStaff:
      type: array
      items:
        type: object
    LessonRooms:
      type: array
      items:
        type: object
    Timetables:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Description:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
          DaysPerCycle:
            type: number
          PeriodsPerCycle:
            type: number
          TeachingPeriodsPerCycle:
            type: number
    TimetableDays:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Timetables:
            type: string
          DayName:
            type: string
          Sequence:
            type: string
    TimetablePeriods:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          TimetableDayId:
            type: string
          PeriodName:
            type: string
          StartTime:
            type: string
          EndTime:
            type: string
          PeriodSequence:
            type: string
    TimetableLessons:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          TimetablePeriodId:
            type: string
    LessonClasses:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          TimetableLessonId:
            type: string
          GroupId:
            type: string
          GroupName:
            type: string
          SubjectId:
            type: string
          SubjectName:
            type: string
    Rooms:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          RoomName:
            type: string
          RoomCode:
            type: string
    TimetableDayInstances:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          RoomName:
            type: string
          RoomCode:
            type: string
    LessonInstances:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          TimetableLessonId:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
    CoverLessons:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          LessonInstanceId:
            type: string
          Type:
            type: string
    CoverLessonStaff:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          LessonInstanceId:
            type: string
          Staff:
            type: string
    CoverLessonRooms:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          LessonInstanceId:
            type: string
          RoomId:
            type: string
          RoomName:
            type: string
          RoomCode:
            type: string
    RoomClosures:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Description:
            type: string
          StartDate:
            type: string
          EndDate:
            type: string
    AllRooms:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          RoomId:
            type: string
          RoomCode:
            type: string
          RoomName:
            type: string
          RoomRows:
            type: string
          RoomColumns:
            type: string
    TTDays:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          EventId:
            type: string
          EventDescription:
            type: string
          StartDateTime:
            type: string
          EndDateTime:
            type: string
    TTSessions:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          DayId:
            type: string
          EventId:
            type: string
          EventDescription:
            type: string
          Session:
            type: string
          StartDateTime:
            type: string
          EndDateTime:
            type: string
    TTPeriods:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          DayId:
            type: string
          SessionId:
            type: string
          EventId:
            type: string
          EventDescription:
            type: string
          Session:
            type: string
          StartDateTime:
            type: string
          EndDateTime:
            type: string
    TTSubjects:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Code:
            type: string
          Name:
            type: string
    TTRooms:
      type: array
      items:
        type: object
        properties:
          Id:
            type: string
          Code:
            type: string
          Name:
            type: string
    UDFs:
      type: array
      items:
        type: object
        properties:
          UDFType:
            type: string
          UDFName:
            type: string
    ValidationErrors:
      type: array
      items:
        type: object
        properties:
          Id:
            type: number
          EntityId:
            type: string
          EntityType:
            type: string
          EntityCategory:
            type: string
          EntityError:
            type: string
          LogDateTime:
            type: string
    XIDs:
      type: array
      items:
        type: object
        properties:
          School:
            type: string
          Area:
            type: string
          MIS_ID:
            type: string
          XID:
            type: string
          IdaasId:
            type: string
          Prefix:
            type: string
          Name:
            type: string
          OtherID:
            type: string
  responses:
    Token:
      description: Authentication token response
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/TokenResponse"
    AsyncWritebackResponse:
      description: Writeback response
      content:
        application/json:
          schema:
            type: object
            properties:
              TrackingId:
                type: string
              DataSet:
                type: object
                properties:
                  trackingid:
                    type: array
                    items:
                      type: object
                      properties:
                        trackingid:
                          type: string
                        errorquery:
                          type: string
              Message:
                type: string
              ExceptionType:
                type: string
              ExceptionMessage:
                type: string
              InnerException:
                type: string
            x-examples:
              Example 1:
                TrackingId: 20171101121545.66a1289c-5186-4448-9847-ccdd28054230
                DataSet:
                  trackingid:
                  - trackingid: 20171101121545.66a1289c-5186-4448-9847-ccdd28054230
                    errorquery: Writeback.AttendanceAsync_OnError
                Message: success
          examples:
            Example 1:
              value:
                TrackingId: 20171101121545.66a1289c-5186-4448-9847-ccdd28054230
                DataSet:
                  trackingid:
                  - trackingid: 20171101121545.66a1289c-5186-4448-9847-ccdd28054230
                    errorquery: Writeback.AttendanceAsync_OnError
                Message: success
    ConductWritebackCallback:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    IncidentId:
                      type: integer
                    ActualId:
                      type: integer
            x-examples:
              Example 1:
                result:
                - IncidentId: 1
                  ActualId: 1811
          examples:
            Example 1:
              value:
                result:
                - IncidentId: 1
                  ActualId: 1811
    GetXodSchools:
      description: Get Xod schools
      content:
        application/json:
          schema:
            properties:
              Authorised:
                type: array
                items:
                  type: object
                  properties:
                    estab:
                      type: string
                    schoolName:
                      type: string
                    dateAuthorised:
                      type: string
                      format: date-time
                    scopesAuthorised:
                      type: string
                      format: Csv
                    installedStatus:
                      type: string
                    installedmessage:
                      type: string
              Revoked:
                type: array
                items:
                  type: object
                  properties:
                    estab:
                      type: string
                    schoolName:
                      type: string
                    dateRevoked:
                      type: string
                      format: date-time
              PendingAuthorisation:
                type: array
                items:
                  type: object
                  properties:
                    estab:
                      type: string
                    schoolName:
                      type: string
                    dateInvited:
                      type: string
                      format: date-time
                    installedStatus:
                      type: string
                    installedmessage:
                      type: string
      x-examples:
        Example 1:
          Authorised:
          - estab: "3281101"
            schoolName: Groupcall SIMS7 Primary
            dateAuthorised: 2017-06-02T10:05:01
            scopesAuthorised: "Address,AgencyAgent,AssessmentResults,Attendance,Conduct,Photos,Staff"
            installedStatus: true
          - estab: "3281102"
            schoolName: Groupcall SIMS7 Secondary
            dateAuthorised: 2017-06-02T10:05:01
            scopesAuthorised: "Address,AgencyAgent,AssessmentResults,Attendance,Conduct,Photos,Staff"
            installedStatus: true
          Revoked:
          - estab: "3281103"
            schoolName: Groupcall SIMS7 Secondary (Authorisation Test)
            dateRevoked: 2019-05-13T00:00:00
          PendingAuthorisation:
          - estab: "3281110"
            schoolName: Groupcall Bromcom Secondary
            dateInvited: 2018-06-26T10:25:37
            installedStatus: true
  parameters:
    estab:
      name: estab
      in: path
      description: establishment ID
      required: true
      schema:
        type: string
    page:
      name: page
      in: query
      description: "Optional page parameter, used in conjunction with pagesize. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
      required: false
      schema:
        type: integer
    pagesize:
      name: pagesize
      in: query
      description: "Optional pagesize parameter, used in conjunction with page. Supply optional pagination parameters page and pageSize to refine the amount of data returned at once. Change sets are calculated before pagination is applied. The default maximum number of records in a response is 100011. If no pagination values are supplied then this limit will automatically be enforced for result sets with more records than this value and the page parameter will be required to access further records."
      required: false
      schema:
        type: integer
    changedRows:
      name: changedRows
      in: query
      description: "Keep track of changes. Start a changeset with by passing * as the changedRows value. The resultset returned will include a new value to supply for the next changedRows. Only rows that have changed since will be returned, an extra table with the same name but with the _deleted suffix will be returned with the Ids of any rows that where in the original resultset but not in this new one. Changesets are per school, per endpoint so will need to be tracked as such in your application. To retrieve a full set for an endpoint, simply start a new set with * again."
      required: false
      schema:
        type: string
    select:
      name: select
      in: query
      description: Select Parameter (Choose & Rename Specific Fields). CSV of column names or * for all columns
      required: false
      schema:
        type: string
        format: CSV
      example: "DisplayName as Name,RegGroup as Form"
    callbackUrl:
      name: callbackUrl
      in: query
      description: Supply a URL that can consume a POST response as described in the callback section and we will call you back with the DBStatus object when the data is ready to be requested
      required: false
      schema:
        type: string
        format: URL
    httpstatuscodes:
      name: httpstatuscodes
      in: query
      description: "To receive detailed HTTP error response codes, add the following parameter to your API calls as an additional URL parameter"
      required: false
      schema:
        type: boolean
  requestBodies:
    dbStatus:
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    ID:
                      type: string
                    Description:
                      type: string
                    Source:
                      type: string
                    Success:
                      type: string
            x-examples:
              Example 1:
                result:
                - ID: Generated
                  Description: "Validation: NINumber is not valid. This will be ignored."
                  Source: SimsServer
                - ID: Generated
                  Description: "Validation Error: Ethnicity Code is invalid. This will be ignored."
                  Source: SimsServer
                - ID: Exception
                  Description: |-
                    Object reference not set to an instance of an object. at SIMS.Entities.Contract.Validate()
                     at SIMS.Entities.Contracts.Validate()
                     at SIMS.Entities.Employee.Valid()
                     at Groupcall.Sims.SimsStaff.AddEmployee(SimsReportParams reportParams) in C:\Development\Xporter\Application\MS .Net\Groupcall.Sims Solution\Groupcall.Sims.Client\SimsStaff.pas:line 442
                  Source: SimsServer
                  Success: "False"
    SchoolTokenRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              estab:
                type: string
              relyingParty:
                type: string
              password:
                type: string
              thirdpartyid:
                type: string
    AttendanceWriteback:
      content:
        application/json:
          schema:
            type: object
            properties:
              Marks:
                type: array
                items:
                  type: object
                  properties:
                    StudentId:
                      type: string
                    MarkType:
                      type: string
                    Date:
                      type: string
                    Session:
                      type: string
                    InstanceId:
                      type: string
                    Mark:
                      type: string
              callback:
                type: array
                items:
                  type: object
                  properties:
                    Method:
                      type: string
                    Url:
                      type: string
          examples:
            Session Attendance:
              value:
                Marks:
                - StudentId: "12278"
                  MarkType: S
                  Date: 2025-03-26
                  Session: AM
                  Mark: \
                callback:
                - Method: POST
                  Url: https://xportertesting.groupcall.com/TryIt/Callback/?id=Attendance&estab=3285487
            Lesson Attendance:
              value:
                Marks:
                - StudentId: "12371"
                  MarkType: L
                  Date: 2025-03-26
                  InstanceId: "67511"
                  Mark: \\
                callback:
                - Method: POST
                  Url: https://xportertesting.groupcall.com/TryIt/Callback/?id=Attendance&estab=3285487
    ConductWriteback:
      content:
        application/json:
          schema:
            type: object
            properties:
              Conducts:
                type: array
                items:
                  type: object
                  properties:
                    Id:
                      type: number
                    IncidentType:
                      type: string
                    RecordedById:
                      type: number
                    EntryDate:
                      type: string
                    TypeId:
                      type: number
                    BullTypeId:
                      type: number
                    ActivityId:
                      type: number
                    LocationId:
                      type: string
                    StatusId:
                      type: string
                    Note:
                      type: string
              Participants:
                type: array
                items:
                  type: object
                  properties:
                    ConductId:
                      type: number
                    Points:
                      type: number
                    StudentId:
                      type: number
                    RoleId:
                      type: string
              Staff:
                type: array
                items:
                  type: object
                  properties:
                    ConductId:
                      type: number
                    StaffRoleId:
                      type: number
                    StaffId:
                      type: number
              MediaFiles:
                type: array
                items:
                  type: object
                  properties:
                    Id:
                      type: number
                    ConductId:
                      type: number
                    MediaDateTime:
                      type: string
                    Description:
                      type: string
                    MediaType:
                      type: string
                    FileName:
                      type: string
                    MediaBase64:
                      type: string
              callback:
                type: array
                items:
                  type: object
                  properties:
                    Method:
                      type: string
                    Url:
                      type: string
          examples:
            Behaviour:
              value:
                Conducts:
                - Id: 1
                  IncidentType: Beh
                  RecordedById: 1
                  EntryDate: 2025-03-26
                  TypeId: 4
                  BullTypeId: 0
                  ActivityId: 1
                  LocationId: "15"
                  StatusId: "1"
                  Note: Beh Recorded by TryIt
                Participants:
                - ConductId: 1
                  Points: 10
                  StudentId: 12278
                  RoleId: "1"
                Staff:
                - ConductId: 1
                  StaffRoleId: 1
                  StaffId: 1
                MediaFiles:
                - Id: 1
                  ConductId: 1
                  MediaDateTime: 2025-03-26T12:00:00
                  Description: Example Image
                  MediaType: png
                  FileName: small_cross.png
                  MediaBase64: iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABJUlEQVQ4y2P8+fPnfwYKABMDhQDDgN+fnjDce/UdQ+HLOzcZPv3GYsLPnz//w/CX13f+54e7/7fxiv1/9v47uPj9s5v/e9mY/g/P7/3/+gtC/c+fP/8zIsLgN0N/dijD6vOvGBgYGBg4xbUYJk6dyCD07ihDdn4Tw8vv/xgYGBgYDENLGKYWBsEdwIgciM+u7EJRzCkmw8D7+RnDKxgfaqiOFDd2A7AZAgPYNGMNRCkdN4aqTD80UWaGzKo2DM1YDXh2ZRdD2/RNaKJ/Gaa3VTFcefYVvwHYwkCME6Lk+8trDPnZ+RiGIBnwm2Hl9GkIzeJaDBOnzWeYNrGOQRzJkOkrd9IsHSBS4uMfwgxKYpwoFr26d5uBQ1aVgY8V1QGMgy8zkQoAT2DkP9OSsloAAAAASUVORK5CYII=
                callback:
                - Method: POST
                  Url: https://xportertesting.groupcall.com/TryIt/Callback/?id=Beh&estab=3285487
            Acheivement:
              value:
                Conducts:
                - Id: 0
                  IncidentType: string
                  RecordedById: 0
                  EntryDate: string
                  TypeId: 0
                  BullTypeId: 0
                  ActivityId: 0
                  LocationId: string
                  StatusId: string
                  Note: string
                Participants:
                - ConductId: 0
                  Points: 0
                  StudentId: 0
                  RoleId: string
                Staff:
                - ConductId: 0
                  StaffRoleId: 0
                  StaffId: 0
                MediaFiles:
                - Id: 0
                  ConductId: 0
                  MediaDateTime: string
                  Description: string
                  MediaType: string
                  FileName: string
                  MediaBase64: string
                callback:
                - Method: string
                  Url: string
    ConductWritebackCallback:
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    IncidentId:
                      type: integer
                    ActualId:
                      type: integer
            x-examples:
              Example 1:
                result:
                - IncidentId: 1
                  ActualId: 1811
          examples:
            Example 1:
              value:
                result:
                - IncidentId: 1
                  ActualId: 1811
    AttendanceWritebackCallback:
      content:
        application/json:
          schema:
            type: object
    EntityAttributesWriteback:
      content:
        application/json:
          schema:
            type: object
            properties:
              attributes:
                type: array
                items:
                  type: object
                  properties:
                    XID:
                      type: string
                    Homework:
                      type: string
    GDPRfilterWriteback:
      content:
        application/json:
          schema:
            type: object
            properties:
              add:
                type: array
                items:
                  type: object
                  properties:
                    ids:
                      type: string
                      format: CSV
              remove:
                type: array
                items:
                  type: object
                  properties:
                    ids:
                      type: string
                      format: CSV
    PhotosWriteback:
      content:
        application/json:
          schema:
            type: object
    SeatingPlanWriteback:
      content:
        application/json:
          schema:
            type: object
    TagDefinitionsWriteback:
      content:
        application/json:
          schema:
            type: object
    TagsWriteback:
      content:
        application/json:
          schema:
            type: object
    DetentionWriteback:
      content:
        application/json:
          schema:
            type: object
            properties:
              Conducts:
                type: array
                items:
                  type: object
                  properties:
                    Id:
                      type: integer
                    UpdateId:
                      type: integer
                    IncidentType:
                      type: string
              Participants:
                type: array
                items:
                  type: object
                  properties:
                    ConductId:
                      type: integer
                    Points:
                      type: integer
                    StudentId:
                      type: integer
              callback:
                type: array
                items:
                  type: object
                  properties:
                    Method:
                      type: string
                    Url:
                      type: string
            x-examples:
              Example 1:
                Conducts:
                - Id: 1
                  UpdateId: 3785
                  IncidentType: Ach
                Participants:
                - ConductId: 1
                  Points: 11
                  StudentId: 9919
          examples:
            Update:
              value:
                Conducts:
                - Id: 1
                  UpdateId: 3785
                  IncidentType: Ach
                Participants:
                - ConductId: 1
                  Points: 11
                  StudentId: 9919
            Delete:
              value:
                Conducts:
                - Id: 1
                  UpdateId: 3788
                  IncidentType: Ach
                Participants:
                - ConductId: 1
                  StudentId: -9919
    DetentionWritebackCallback:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    DetentionId:
                      type: integer
                    ActualId:
                      type: integer
            x-examples:
              Example 1:
                result:
                - DetentionId: 1
                  ActualId: 1811
          examples:
            Example 1:
              value:
                result:
                - DetentionId: 1
                  ActualId: 1811
    UserAsyncWritebackCallback:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                items:
                  type: object
                  properties:
                    Data:
                      type: string
                    Message:
                      type: string
                    Source:
                      type: string
            x-examples:
              Example 1:
                result:
                - data: "Id: 789003a5-21a9-4e22-81e5-891bd9ebf2fc , Username: gatheringstorm\\albert.simmons"
                  Message: User added sucessfully
                  source: SimsServer
          examples:
            Example 1:
              value:
                result:
                - data: "Id: 789003a5-21a9-4e22-81e5-891bd9ebf2fc , Username: gatheringstorm\\albert.simmons"
                  Message: User added sucessfully
                  source: SimsServer
    UserAsyncWriteback:
      content:
        application/json:
          schema:
            properties:
              staff:
                type: array
                items:
                  type: object
                  properties:
                    PersonId:
                      type: string
                    Username:
                      type: string
              callback:
                type: array
                items:
                  type: object
                  properties:
                    Method:
                      type: string
                    Url:
                      type: string
          examples:
            Example 1:
              value:
                staff:
                - PersonId: "12345"
                  Username: gatheringstorm\\albert.simmons
                callback:
                - Method: POST
                  Url: https://xportertesting.groupcall.com/TryIt/Callback/?id=UserAsync&estab=3285487
  securitySchemes:
    IdaasSTSToken:
      type: apiKey
      description: |-
        See [/STS/GetToken](#tag/Authentication/operation/Retrieve%20school%20token) for details on how to generate a token

        Prefix the value with \"Idaas\" to indicate the custom authorization type
      name: Authorization
      in: header
  callbacks:
    dbStatus:
      '{$request.query.callbackUrl}':
        post:
          parameters:
          - name: Id
            in: query
            required: false
            schema:
              type: string
          - name: estab
            in: query
            required: false
            schema:
              type: string
          - name: sf
            in: query
            required: false
            schema:
              type: integer
          - name: trackingid
            in: query
            required: false
            schema:
              type: string
          - name: XodCompleted
            in: query
            required: false
            schema:
              type: boolean
          requestBody:
            $ref: "#/components/requestBodies/dbStatus"
          responses:
            "200":
              description: OK
    ConductWritebackCallback:
      '{$request.body.callbackUrl}':
        post:
          parameters:
          - name: Id
            in: query
            required: false
            schema:
              type: string
          - name: estab
            in: query
            required: false
            schema:
              type: string
          - name: XodCompleted
            in: query
            required: false
            schema:
              type: boolean
          requestBody:
            $ref: "#/components/requestBodies/ConductWritebackCallback"
          responses:
            "200":
              description: OK
    DetentionWritebackCallback:
      '{$request.body.callbackUrl}':
        post:
          parameters:
          - name: Id
            in: query
            required: false
            schema:
              type: string
          - name: estab
            in: query
            required: false
            schema:
              type: string
          - name: XodCompleted
            in: query
            required: false
            schema:
              type: boolean
          requestBody:
            $ref: "#/components/requestBodies/DetentionWritebackCallback"
          responses:
            "200":
              description: OK
    AttendanceWritebackCallback:
      '{$request.body.callbackUrl}':
        post:
          parameters:
          - name: Id
            in: query
            required: false
            schema:
              type: string
          - name: estab
            in: query
            required: false
            schema:
              type: string
          - name: XodCompleted
            in: query
            required: false
            schema:
              type: boolean
          requestBody:
            $ref: "#/components/requestBodies/AttendanceWritebackCallback"
          responses:
            "200":
              description: OK
    UserAsyncWritebackCallback:
      '{$request.body.callbackUrl}':
        post:
          parameters:
          - name: Id
            in: query
            required: false
            schema:
              type: string
          - name: estab
            in: query
            required: false
            schema:
              type: string
          - name: XodCompleted
            in: query
            required: false
            schema:
              type: boolean
          requestBody:
            $ref: "#/components/requestBodies/UserAsyncWritebackCallback"
          responses:
            "200":
              description: OK
