> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/schoolsbuddy/public-rest-apis/subject-class.md).

# Subject Class

## GET /api/v1/Groups/SubjectClass

> Gets a paginated list of Subject Classes for the calling> \
> organisation(s), sorted by id. Archived Subject Classes are added> \
> when includeArchived is true.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"SubjectClassResponseDtoListPagedSubjectClassFilterResponseDto":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"},"nullable":true},"messageTranslationParameters":{"nullable":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubjectClassResponseDto"},"nullable":true},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"firstPage":{"type":"string","format":"uri","nullable":true},"lastPage":{"type":"string","format":"uri","nullable":true},"totalPages":{"type":"integer","format":"int32"},"totalRecords":{"type":"integer","format":"int32"},"nextPage":{"type":"string","format":"uri","nullable":true},"previousPage":{"type":"string","format":"uri","nullable":true},"baseUri":{"type":"string","format":"uri","nullable":true},"searchParameters":{"type":"array","items":{"$ref":"#/components/schemas/StringStringKeyValuePair"},"nullable":true}},"additionalProperties":false},"SubjectClassResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"title":{"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32"},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean"},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time"},"thirdPartyId":{"type":"string","nullable":true},"isImported":{"type":"boolean"}},"additionalProperties":false},"StringStringKeyValuePair":{"type":"object","properties":{"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass":{"get":{"tags":["SubjectClass"],"summary":"Gets a paginated list of Subject Classes for the calling\r\norganisation(s), sorted by id. Archived Subject Classes are added\r\nwhen includeArchived is true.","parameters":[{"name":"IncludeArchived","in":"query","schema":{"type":"boolean"}},{"name":"PageNumber","in":"query","schema":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"}},{"name":"PageSize","in":"query","schema":{"maximum":2000,"minimum":1,"type":"integer","format":"int32"}},{"name":"OrganisationIds","in":"query","schema":{"type":"array","items":{"type":"integer","format":"int32"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassResponseDtoListPagedSubjectClassFilterResponseDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Groups/SubjectClass

> Creates a Subject Class. The Subject Class always starts unarchived> \
> and is never import-managed (ThirdPartyId is not set). The> \
> referenced Subject, Year Group and lead staff must all be active in> \
> the requesting organisation.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"CreateSubjectClassRequestDto":{"required":["leadStaffId","schoolYearGroupId","subjectId","title"],"type":"object","properties":{"title":{"maxLength":250,"minLength":1,"type":"string"},"subjectId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"schoolYearGroupId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"leadStaffId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"}},"additionalProperties":false},"SubjectClassResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"title":{"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32"},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean"},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time"},"thirdPartyId":{"type":"string","nullable":true},"isImported":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass":{"post":{"tags":["SubjectClass"],"summary":"Creates a Subject Class. The Subject Class always starts unarchived\r\nand is never import-managed (ThirdPartyId is not set). The\r\nreferenced Subject, Year Group and lead staff must all be active in\r\nthe requesting organisation.","parameters":[{"name":"organisationId","in":"query","description":"The organisation to create the Subject Class in — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The create request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubjectClassRequestDto"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassResponseDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /api/v1/Groups/SubjectClass/{id}

> Gets a single Subject Class by id. Archived Subject Classes return> \
> 404 SUBJECTCLASS\_NOT\_FOUND (§11).

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"SubjectClassResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"title":{"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32"},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean"},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time"},"thirdPartyId":{"type":"string","nullable":true},"isImported":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/{id}":{"get":{"tags":["SubjectClass"],"summary":"Gets a single Subject Class by id. Archived Subject Classes return\r\n404 SUBJECTCLASS_NOT_FOUND (§11).","parameters":[{"name":"id","in":"path","description":"The Subject Class id (SubjectClass.Id)","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation to look the Subject Class up in — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassResponseDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PUT /api/v1/Groups/SubjectClass/{id}

> Partially updates a Subject Class — omitted fields preserve their> \
> existing values (§3.7e). The URL {id} is the canonical identifier;> \
> the body carries no id. subjectId / schoolYearGroupId re-parenting> \
> is allowed. Setting isArchived = true archives the row; the parent> \
> Subject is unaffected. Sending isArchived = false unarchives an> \
> archived Subject Class (EC-1 as amended 2026-07-31), restoring an> \
> archived parent Subject in the same transaction (upward cascade);> \
> any other write against an archived Subject Class returns> \
> 409 RESOURCE\_ARCHIVED.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"UpdateSubjectClassRequestDto":{"type":"object","properties":{"title":{"maxLength":250,"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32","nullable":true},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean","nullable":true}},"additionalProperties":false},"SubjectClassResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"organisationId":{"type":"integer","format":"int32"},"title":{"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32"},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean"},"createdAtUtc":{"type":"string","format":"date-time"},"updatedAtUtc":{"type":"string","format":"date-time"},"thirdPartyId":{"type":"string","nullable":true},"isImported":{"type":"boolean"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/{id}":{"put":{"tags":["SubjectClass"],"summary":"Partially updates a Subject Class — omitted fields preserve their\r\nexisting values (§3.7e). The URL {id} is the canonical identifier;\r\nthe body carries no id. subjectId / schoolYearGroupId re-parenting\r\nis allowed. Setting isArchived = true archives the row; the parent\r\nSubject is unaffected. Sending isArchived = false unarchives an\r\narchived Subject Class (EC-1 as amended 2026-07-31), restoring an\r\narchived parent Subject in the same transaction (upward cascade);\r\nany other write against an archived Subject Class returns\r\n409 RESOURCE_ARCHIVED.","parameters":[{"name":"id","in":"path","description":"The Subject Class id (SubjectClass.Id)","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation the Subject Class belongs to — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The update request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubjectClassRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassResponseDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Groups/SubjectClass/BulkCreate

> Creates Subject Classes in bulk. Items are processed independently —> \
> per-item failures are reported in failedItems\[] and do not roll> \
> back the other items.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"BulkCreateSubjectClassRequestDto":{"type":"object","properties":{"organisationId":{"type":"integer","description":"Gets or sets the organisation the batch operates on. Optional\r\nwhen the calling client has access to a single organisation;\r\nrequired for multi-org clients.","format":"int32","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/BulkCreateSubjectClassItemDto"},"description":"Gets or sets the Subject Classes to create. Each item is processed\r\nindependently; one failure does not roll back the others.\r\nItem-level validation deliberately bypasses automatic model\r\nvalidation — violations surface per item in failedItems[]\r\ninstead of failing the whole request (cross-cutting §6.1).","nullable":true}},"additionalProperties":false,"description":"Request body for POST /api/v1/Groups/SubjectClass/BulkCreate (SB-15451).\r\nThe envelope-level organisationId scopes every item in the batch\r\n(cross-cutting §3.8.1) — items are not individually org-addressable."},"BulkCreateSubjectClassItemDto":{"required":["leadStaffId","schoolYearGroupId","subjectId","title"],"type":"object","properties":{"title":{"maxLength":250,"minLength":1,"type":"string"},"subjectId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"schoolYearGroupId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"leadStaffId":{"maximum":2147483647,"minimum":1,"type":"integer","format":"int32"},"clientReferenceId":{"maxLength":100,"type":"string","nullable":true}},"additionalProperties":false},"Int32BulkOperationResult":{"type":"object","properties":{"successfulIds":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Gets or sets the ids of the items that were processed successfully.\r\nOn BulkCreate these are the newly-created ids.","nullable":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/BulkFailedItem"},"description":"Gets or sets the per-item failures, each carrying its request index,\r\noptional client reference, name, machine-readable code, and message.","nullable":true},"totalRequested":{"type":"integer","description":"Gets or sets the total number of items in the request. Set by the\r\ncaller (it is not derivable from the success/failure lists alone —\r\nitems rejected before per-item processing may appear in neither).","format":"int32"},"totalSuccessful":{"type":"integer","description":"Gets the number of items processed successfully (computed).","format":"int32","readOnly":true},"totalFailed":{"type":"integer","description":"Gets the number of items that failed (computed).","format":"int32","readOnly":true}},"additionalProperties":false,"description":"Standard envelope returned by every Public API bulk endpoint\r\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\r\nprocessed independently — one item failing does not roll back the\r\nothers — and the envelope reports per-item outcome. See\r\ncross-cutting-design.md §4."},"BulkFailedItem":{"type":"object","properties":{"index":{"type":"integer","description":"Gets or sets the zero-based index of the failed item within the\r\nrequest array, so callers keeping request order can map it back.","format":"int32"},"clientReferenceId":{"type":"string","description":"Gets or sets the optional opaque client-supplied reference echoed\r\nback from the request item. Null when the caller did not supply one.","nullable":true},"name":{"type":"string","description":"Gets or sets the name of the entity the failed item referred to,\r\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\r\ncross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"A single per-item failure entry in a SchoolsBuddy.PublicAPI.Models.BulkOperationResult`1\r\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\r\na machine-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Code plus a human-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Error."},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/BulkCreate":{"post":{"tags":["SubjectClass"],"summary":"Creates Subject Classes in bulk. Items are processed independently —\r\nper-item failures are reported in failedItems[] and do not roll\r\nback the other items.","requestBody":{"description":"The bulk create envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubjectClassRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Int32BulkOperationResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PUT /api/v1/Groups/SubjectClass/BulkUpdate

> Partially updates Subject Classes in bulk. Each item carries the> \
> target id; items are processed independently. An item carrying> \
> isArchived = false unarchives an archived Subject Class (EC-1 as> \
> amended 2026-07-31).

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"BulkUpdateSubjectClassRequestDto":{"type":"object","properties":{"organisationId":{"type":"integer","description":"Gets or sets the organisation the batch operates on. Optional\r\nwhen the calling client has access to a single organisation;\r\nrequired for multi-org clients.","format":"int32","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/BulkUpdateSubjectClassItemDto"},"description":"Gets or sets the Subject Class updates. Each item is processed\r\nindependently; one failure does not roll back the others.\r\nItem-level validation deliberately bypasses automatic model\r\nvalidation — violations (including missing / 0 / negative id, EC-7)\r\nsurface per item in failedItems[] instead of failing the whole\r\nrequest (cross-cutting §6.1).","nullable":true}},"additionalProperties":false,"description":"Request body for PUT /api/v1/Groups/SubjectClass/BulkUpdate (SB-15451).\r\nThe envelope-level organisationId scopes every item in the batch\r\n(cross-cutting §3.8.1)."},"BulkUpdateSubjectClassItemDto":{"type":"object","properties":{"title":{"maxLength":250,"type":"string","nullable":true},"subjectId":{"type":"integer","format":"int32","nullable":true},"schoolYearGroupId":{"type":"integer","format":"int32","nullable":true},"leadStaffId":{"type":"integer","format":"int32","nullable":true},"isArchived":{"type":"boolean","nullable":true},"id":{"type":"integer","format":"int32","nullable":true},"clientReferenceId":{"maxLength":100,"type":"string","nullable":true}},"additionalProperties":false},"Int32BulkOperationResult":{"type":"object","properties":{"successfulIds":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Gets or sets the ids of the items that were processed successfully.\r\nOn BulkCreate these are the newly-created ids.","nullable":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/BulkFailedItem"},"description":"Gets or sets the per-item failures, each carrying its request index,\r\noptional client reference, name, machine-readable code, and message.","nullable":true},"totalRequested":{"type":"integer","description":"Gets or sets the total number of items in the request. Set by the\r\ncaller (it is not derivable from the success/failure lists alone —\r\nitems rejected before per-item processing may appear in neither).","format":"int32"},"totalSuccessful":{"type":"integer","description":"Gets the number of items processed successfully (computed).","format":"int32","readOnly":true},"totalFailed":{"type":"integer","description":"Gets the number of items that failed (computed).","format":"int32","readOnly":true}},"additionalProperties":false,"description":"Standard envelope returned by every Public API bulk endpoint\r\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\r\nprocessed independently — one item failing does not roll back the\r\nothers — and the envelope reports per-item outcome. See\r\ncross-cutting-design.md §4."},"BulkFailedItem":{"type":"object","properties":{"index":{"type":"integer","description":"Gets or sets the zero-based index of the failed item within the\r\nrequest array, so callers keeping request order can map it back.","format":"int32"},"clientReferenceId":{"type":"string","description":"Gets or sets the optional opaque client-supplied reference echoed\r\nback from the request item. Null when the caller did not supply one.","nullable":true},"name":{"type":"string","description":"Gets or sets the name of the entity the failed item referred to,\r\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\r\ncross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"A single per-item failure entry in a SchoolsBuddy.PublicAPI.Models.BulkOperationResult`1\r\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\r\na machine-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Code plus a human-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Error."},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/BulkUpdate":{"put":{"tags":["SubjectClass"],"summary":"Partially updates Subject Classes in bulk. Each item carries the\r\ntarget id; items are processed independently. An item carrying\r\nisArchived = false unarchives an archived Subject Class (EC-1 as\r\namended 2026-07-31).","requestBody":{"description":"The bulk update envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubjectClassRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Int32BulkOperationResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Groups/SubjectClass/BulkArchive

> Archives or unarchives Subject Classes in bulk (toggleable via the> \
> isArchived body flag). Archiving leaves the parent Subject> \
> untouched; unarchiving a Subject Class whose parent Subject is> \
> archived also restores the parent (upward cascade). Alongside> \
> PUT / BulkUpdate items carrying isArchived = false, the write verbs> \
> allowed against already-archived Subject Classes (EC-1 as amended> \
> 2026-07-31).

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"BulkArchiveSubjectClassRequestDto":{"required":["ids"],"type":"object","properties":{"organisationId":{"type":"integer","description":"Gets or sets the organisation the batch operates on. Optional\r\nwhen the calling client has access to a single organisation;\r\nrequired for multi-org clients.","format":"int32","nullable":true},"ids":{"minItems":1,"type":"array","items":{"type":"integer","format":"int32"},"description":"Gets or sets the ids (SubjectClass.Id) of the Subject Classes to\r\ntransition. Id validity is checked per item (EC-7) — 0 / negative\r\nids fail that item only."},"isArchived":{"type":"boolean","description":"Gets or sets a value indicating whether the Subject Classes are\r\narchived (true, default) or unarchived (false)."}},"additionalProperties":false,"description":"Request body for POST /api/v1/Groups/SubjectClass/BulkArchive\r\n(SB-15451). Toggleable: isArchived true archives (the parent Subject is\r\nunaffected, archive-strategy §2.5); false unarchives, and when the\r\nparent Subject is archived also restores it in the same transaction\r\n(upward cascade). BulkArchive and a PUT / BulkUpdate item carrying\r\nisArchived: false are the verbs allowed to operate on already-archived\r\nrows (EC-1 as amended 2026-07-31)."},"Int32BulkOperationResult":{"type":"object","properties":{"successfulIds":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Gets or sets the ids of the items that were processed successfully.\r\nOn BulkCreate these are the newly-created ids.","nullable":true},"failedItems":{"type":"array","items":{"$ref":"#/components/schemas/BulkFailedItem"},"description":"Gets or sets the per-item failures, each carrying its request index,\r\noptional client reference, name, machine-readable code, and message.","nullable":true},"totalRequested":{"type":"integer","description":"Gets or sets the total number of items in the request. Set by the\r\ncaller (it is not derivable from the success/failure lists alone —\r\nitems rejected before per-item processing may appear in neither).","format":"int32"},"totalSuccessful":{"type":"integer","description":"Gets the number of items processed successfully (computed).","format":"int32","readOnly":true},"totalFailed":{"type":"integer","description":"Gets the number of items that failed (computed).","format":"int32","readOnly":true}},"additionalProperties":false,"description":"Standard envelope returned by every Public API bulk endpoint\r\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\r\nprocessed independently — one item failing does not roll back the\r\nothers — and the envelope reports per-item outcome. See\r\ncross-cutting-design.md §4."},"BulkFailedItem":{"type":"object","properties":{"index":{"type":"integer","description":"Gets or sets the zero-based index of the failed item within the\r\nrequest array, so callers keeping request order can map it back.","format":"int32"},"clientReferenceId":{"type":"string","description":"Gets or sets the optional opaque client-supplied reference echoed\r\nback from the request item. Null when the caller did not supply one.","nullable":true},"name":{"type":"string","description":"Gets or sets the name of the entity the failed item referred to,\r\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\r\ncross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"A single per-item failure entry in a SchoolsBuddy.PublicAPI.Models.BulkOperationResult`1\r\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\r\na machine-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Code plus a human-readable SchoolsBuddy.PublicAPI.Models.BulkFailedItem.Error."},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/BulkArchive":{"post":{"tags":["SubjectClass"],"summary":"Archives or unarchives Subject Classes in bulk (toggleable via the\r\nisArchived body flag). Archiving leaves the parent Subject\r\nuntouched; unarchiving a Subject Class whose parent Subject is\r\narchived also restores the parent (upward cascade). Alongside\r\nPUT / BulkUpdate items carrying isArchived = false, the write verbs\r\nallowed against already-archived Subject Classes (EC-1 as amended\r\n2026-07-31).","requestBody":{"description":"The bulk archive envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveSubjectClassRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Int32BulkOperationResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Groups/SubjectClass/{id}/AddStudents

> Adds students to a Subject Class (SubjectClassPupil membership).> \
> Already-assigned students are skipped.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"SubjectClassStudentsRequestDto":{"required":["studentIds"],"type":"object","properties":{"studentIds":{"minItems":1,"type":"array","items":{"type":"integer","format":"int32"}}},"additionalProperties":false},"SubjectClassStudentsOperationResultDto":{"type":"object","properties":{"studentsProcessed":{"type":"integer","format":"int32"},"totalRequested":{"type":"integer","format":"int32"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/{id}/AddStudents":{"post":{"tags":["SubjectClass"],"summary":"Adds students to a Subject Class (SubjectClassPupil membership).\r\nAlready-assigned students are skipped.","parameters":[{"name":"id","in":"path","description":"The Subject Class id","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation the Subject Class belongs to — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The student ids","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassStudentsRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassStudentsOperationResultDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /api/v1/Groups/SubjectClass/{id}/RemoveStudents

> Removes students from a Subject Class. Students not assigned to the> \
> Subject Class are skipped.

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"SubjectClassStudentsRequestDto":{"required":["studentIds"],"type":"object","properties":{"studentIds":{"minItems":1,"type":"array","items":{"type":"integer","format":"int32"}}},"additionalProperties":false},"SubjectClassStudentsOperationResultDto":{"type":"object","properties":{"studentsProcessed":{"type":"integer","format":"int32"},"totalRequested":{"type":"integer","format":"int32"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/{id}/RemoveStudents":{"post":{"tags":["SubjectClass"],"summary":"Removes students from a Subject Class. Students not assigned to the\r\nSubject Class are skipped.","parameters":[{"name":"id","in":"path","description":"The Subject Class id","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation the Subject Class belongs to — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"requestBody":{"description":"The student ids","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassStudentsRequestDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectClassStudentsOperationResultDto"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /api/v1/Groups/SubjectClass/{id}/Students

> Gets the student person ids currently assigned to a Subject Class.> \
> Parent-bounded — not paged (BP8 sub-resource exemption).

```json
{"openapi":"3.0.1","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"servers":[{"url":"https://publicapi-eu.schoolsbuddy.net","description":"EMEA Public Api server"},{"url":"https://publicapi-asia.schoolsbuddy.net","description":"Asia Public Api server"},{"url":"https://publicapi-us.schoolsbuddy.net","description":"US Public Api server"},{"url":"https://publicapi.schoolsbuddy.cn","description":"China Public Api server"},{"url":"https://identity-eu.schoolsbuddy.net","description":"EMEA Identity server"},{"url":"https://identity-asia.schoolsbuddy.net","description":"Asia Identity server"},{"url":"https://identity-us.schoolsbuddy.net","description":"US Identity server"},{"url":"https://accounts.schoolsbuddy.cn","description":"China Identity server"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and a token.","name":"Authorization","in":"header"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\r\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\r\n`INTERNAL_ERROR`) per cross-cutting-design.md §5.1.","nullable":true},"error":{"type":"string","description":"Gets or sets the human-readable error message.","nullable":true}},"additionalProperties":false,"description":"Structured body for 4xx / 5xx responses on the new Public API surface:\r\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\r\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\r\nexisting endpoints continue returning their legacy plain-string /\r\nModelState shapes until migrated by their per-controller ticket."}}},"paths":{"/api/v1/Groups/SubjectClass/{id}/Students":{"get":{"tags":["SubjectClass"],"summary":"Gets the student person ids currently assigned to a Subject Class.\r\nParent-bounded — not paged (BP8 sub-resource exemption).","parameters":[{"name":"id","in":"path","description":"The Subject Class id","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"organisationId","in":"query","description":"The organisation the Subject Class belongs to — required when the client has access to multiple organisations","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
