---
title: "Create a full school report (legacy /report/setup)"
method: POST
path: "/report/setup"
tags: ["Report"]
---

# Create a full school report (legacy /report/setup)

`POST /report/setup`

**Requires permission:** *ReportAdmins*

Creates a report, its steps and each step's mark-grade fields/options, then expands each step's entry groups (sets/houses/tutor-groups/individual) to per-pupil entries with seeded mark-grades via the canonical enrolment bridge. Port of the legacy v0 RPT_Insert* chain.

## Request body

- CreateReportRequest
  - `details` ReportDetail
    - `name` string, required
    - `academicYear` integer
    - `yearGroup` string, required
    - `publishToParents` string, date-time, required
    - `publishToStudents` string, date-time, required
    - `sportAllocation` boolean
    - `draft` boolean
    - `hidden` boolean
    - `total` integer
    - `complete` integer
  - `steps` CreateReportStepInput[], nullable
    - `id` integer
    - `number` integer
    - `overwriteName` string, nullable
    - `openDate` string, date-time, nullable
    - `closeDate` string, date-time, nullable
    - `hidden` boolean
    - `musicReports` boolean
    - `stepType` 0 | 1 | 2 | 3
    - `entriesForSQL` CreateReportStepEntries
      - `sets` SetEntryGroup[]
        - `id` integer
        - `code` string, nullable
        - `setCode` string, nullable
        - `subject` string, nullable
        - `tutor1SchoolReports` boolean
        - `tutor2SchoolReports` boolean
        - `tutor3SchoolReports` boolean
        - `tutor1Staff` ReportReallocationTeacher
          - `staffId` integer
          - `nameId` integer
          - `email` string, nullable
        - `tutor2Staff` ReportReallocationTeacher
          - `staffId` integer
          - `nameId` integer
          - `email` string, nullable
        - `tutor3Staff` ReportReallocationTeacher
          - `staffId` integer
          - `nameId` integer
          - `email` string, nullable
      - `houses` HouseEntryGroup[]
        - `code` string, nullable
        - `housemasterStaff` ReportReallocationTeacher
          - `staffId` integer
          - `nameId` integer
          - `email` string, nullable
      - `tutorGroups` TutorGroupEntryGroup[]
        - `code` string, nullable
        - `tutorStaffId` integer
        - `tutorStaff` ReportReallocationTeacher
          - `staffId` integer
          - `nameId` integer
          - `email` string, nullable
      - `staffMembers` StaffEntryGroup[]
        - `staffId` integer
        - `nameId` integer
        - `staffUpi` string, guid, nullable
    - `markGrades` ReportMarkGrades[], nullable
      - `id` integer
      - `entryId` integer
      - `fieldId` integer
      - `displayName` string, nullable
      - `value` string, nullable
      - `type` string, nullable
      - `assessment` boolean
      - `field` ReportMarkGradesFields
        - `name` string, nullable
        - `hidden` boolean
        - `stepId` integer
        - `options` ReportMarkGradesFieldsOptions[]
          - `id` integer
          - `fieldId` integer
          - `displayName` string, nullable
          - `value` string, nullable
          - `tempId` string, nullable
          - `allowText` boolean
        - `tempId` string, nullable
        - `saving` boolean
      - `open` boolean

## Response `204`

Success - Created

## Other responses

- `400` — An Error Occurred - Could not create report
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/tonbridge/apis/tonbridge-app-api.md) · [All operations](https://skmtc.net/tonbridge/apis/tonbridge-app-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonbridge/tonbridge-app-api/versions/fab57bf5558a/schema)
