> 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\norganisation(s), sorted by id. Archived Subject Classes are added\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":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\nand is never import-managed (ThirdPartyId is not set). The\nreferenced Subject, Year Group and lead staff must all be active in\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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\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":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\nexisting values (§3.7e). The URL {id} is the canonical identifier;\nthe body carries no id. subjectId / schoolYearGroupId re-parenting\nis allowed. Setting isArchived = true archives the row; the parent\nSubject is unaffected. Sending isArchived = false unarchives an\narchived Subject Class (EC-1 as amended 2026-07-31), restoring an\narchived parent Subject in the same transaction (upward cascade);\nany other write against an archived Subject Class returns\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":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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\nwhen the calling client has access to a single organisation;\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\nindependently; one failure does not roll back the others.\nItem-level validation deliberately bypasses automatic model\nvalidation — violations surface per item in failedItems[]\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).\nThe envelope-level organisationId scopes every item in the batch\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.\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,\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\ncaller (it is not derivable from the success/failure lists alone —\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\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\nprocessed independently — one item failing does not roll back the\nothers — and the envelope reports per-item outcome. See\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\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\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,\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\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\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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 —\nper-item failures are reported in failedItems[] and do not roll\nback the other items.","requestBody":{"description":"The bulk create envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubjectClassRequestDto"}}}},"responses":{"200":{"description":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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\nwhen the calling client has access to a single organisation;\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\nindependently; one failure does not roll back the others.\nItem-level validation deliberately bypasses automatic model\nvalidation — violations (including missing / 0 / negative id, EC-7)\nsurface per item in failedItems[] instead of failing the whole\nrequest (cross-cutting §6.1).","nullable":true}},"additionalProperties":false,"description":"Request body for PUT /api/v1/Groups/SubjectClass/BulkUpdate (SB-15451).\nThe envelope-level organisationId scopes every item in the batch\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.\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,\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\ncaller (it is not derivable from the success/failure lists alone —\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\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\nprocessed independently — one item failing does not roll back the\nothers — and the envelope reports per-item outcome. See\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\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\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,\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\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\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\ntarget id; items are processed independently. An item carrying\nisArchived = false unarchives an archived Subject Class (EC-1 as\namended 2026-07-31).","requestBody":{"description":"The bulk update envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubjectClassRequestDto"}}}},"responses":{"200":{"description":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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\nwhen the calling client has access to a single organisation;\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\ntransition. Id validity is checked per item (EC-7) — 0 / negative\nids fail that item only."},"isArchived":{"type":"boolean","description":"Gets or sets a value indicating whether the Subject Classes are\narchived (true, default) or unarchived (false)."}},"additionalProperties":false,"description":"Request body for POST /api/v1/Groups/SubjectClass/BulkArchive\n(SB-15451). Toggleable: isArchived true archives (the parent Subject is\nunaffected, archive-strategy §2.5); false unarchives, and when the\nparent Subject is archived also restores it in the same transaction\n(upward cascade). BulkArchive and a PUT / BulkUpdate item carrying\nisArchived: false are the verbs allowed to operate on already-archived\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.\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,\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\ncaller (it is not derivable from the success/failure lists alone —\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\n(BulkCreate / BulkUpdate / BulkArchive). Each item in the request is\nprocessed independently — one item failing does not roll back the\nothers — and the envelope reports per-item outcome. See\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\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\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,\nfor at-a-glance identification in the response.","nullable":true},"code":{"type":"string","description":"Gets or sets the machine-readable error code (e.g.\n`VALIDATION_FAILED`, `GROUP_IMPORTED_READ_ONLY`) per\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\nenvelope. Mirrors the structured error body (cross-cutting-design.md §5.3):\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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\nisArchived body flag). Archiving leaves the parent Subject\nuntouched; unarchiving a Subject Class whose parent Subject is\narchived also restores the parent (upward cascade). Alongside\nPUT / BulkUpdate items carrying isArchived = false, the write verbs\nallowed against already-archived Subject Classes (EC-1 as amended\n2026-07-31).","requestBody":{"description":"The bulk archive envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveSubjectClassRequestDto"}}}},"responses":{"200":{"description":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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).\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":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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\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":"OK","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":"Internal 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.4","info":{"title":"SchoolsBuddy Public API","version":"1.0"},"tags":[{"name":"SubjectClass"}],"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.\n`VALIDATION_FAILED`, `RESOURCE_NOT_FOUND`,\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:\na machine-readable SchoolsBuddy.PublicAPI.Models.ErrorResponse.Code plus a human-readable\nSchoolsBuddy.PublicAPI.Models.ErrorResponse.Error. See cross-cutting-design.md §5.3. This is additive —\nexisting endpoints continue returning their legacy plain-string /\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.\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":"OK","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":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
