Subject Class
Gets a paginated list of Subject Classes for the calling organisation(s), sorted by id. Archived Subject Classes are added when includeArchived is true.
Type "Bearer" followed by a space and a token.
OK
Bad Request
Not Found
Internal Server Error
GET /api/v1/Groups/SubjectClass HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Accept: */*
{
"isSuccess": true,
"errors": [
"text"
],
"messageTranslationParameters": null,
"data": [
{
"id": 1,
"organisationId": 1,
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true,
"createdAtUtc": "2026-01-01T00:00:00.000Z",
"updatedAtUtc": "2026-01-01T00:00:00.000Z",
"thirdPartyId": "text",
"isImported": true
}
],
"pageNumber": 1,
"pageSize": 1,
"firstPage": "https://example.com",
"lastPage": "https://example.com",
"totalPages": 1,
"totalRecords": 1,
"nextPage": "https://example.com",
"previousPage": "https://example.com",
"baseUri": "https://example.com",
"searchParameters": [
{
"key": "text",
"value": "text"
}
]
}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.
Type "Bearer" followed by a space and a token.
The organisation to create the Subject Class in — required when the client has access to multiple organisations
Created
Bad Request
Not Found
Internal Server Error
POST /api/v1/Groups/SubjectClass HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1
}{
"id": 1,
"organisationId": 1,
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true,
"createdAtUtc": "2026-01-01T00:00:00.000Z",
"updatedAtUtc": "2026-01-01T00:00:00.000Z",
"thirdPartyId": "text",
"isImported": true
}Gets a single Subject Class by id. Archived Subject Classes return 404 SUBJECTCLASS_NOT_FOUND (§11).
Type "Bearer" followed by a space and a token.
The Subject Class id (SubjectClass.Id)
The organisation to look the Subject Class up in — required when the client has access to multiple organisations
OK
Bad Request
Not Found
Internal Server Error
GET /api/v1/Groups/SubjectClass/{id} HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"organisationId": 1,
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true,
"createdAtUtc": "2026-01-01T00:00:00.000Z",
"updatedAtUtc": "2026-01-01T00:00:00.000Z",
"thirdPartyId": "text",
"isImported": true
}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.
Type "Bearer" followed by a space and a token.
The Subject Class id (SubjectClass.Id)
The organisation the Subject Class belongs to — required when the client has access to multiple organisations
OK
Bad Request
Not Found
Internal Server Error
PUT /api/v1/Groups/SubjectClass/{id} HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true
}{
"id": 1,
"organisationId": 1,
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true,
"createdAtUtc": "2026-01-01T00:00:00.000Z",
"updatedAtUtc": "2026-01-01T00:00:00.000Z",
"thirdPartyId": "text",
"isImported": true
}Creates Subject Classes in bulk. Items are processed independently — per-item failures are reported in failedItems[] and do not roll back the other items.
Type "Bearer" followed by a space and a token.
Request body for POST /api/v1/Groups/SubjectClass/BulkCreate (SB-15451). The envelope-level organisationId scopes every item in the batch (cross-cutting §3.8.1) — items are not individually org-addressable.
Gets or sets the organisation the batch operates on. Optional when the calling client has access to a single organisation; required for multi-org clients.
OK
Standard envelope returned by every Public API bulk endpoint (BulkCreate / BulkUpdate / BulkArchive). Each item in the request is processed independently — one item failing does not roll back the others — and the envelope reports per-item outcome. See cross-cutting-design.md §4.
Gets or sets the ids of the items that were processed successfully. On BulkCreate these are the newly-created ids.
Gets or sets the total number of items in the request. Set by the caller (it is not derivable from the success/failure lists alone — items rejected before per-item processing may appear in neither).
Gets the number of items processed successfully (computed).
Gets the number of items that failed (computed).
Bad Request
Not Found
Internal Server Error
POST /api/v1/Groups/SubjectClass/BulkCreate HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 126
{
"organisationId": 1,
"items": [
{
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"clientReferenceId": "text"
}
]
}{
"successfulIds": [
1
],
"failedItems": [
{
"index": 1,
"clientReferenceId": "text",
"name": "text",
"code": "text",
"error": "text"
}
],
"totalRequested": 1,
"totalSuccessful": 1,
"totalFailed": 1
}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).
Type "Bearer" followed by a space and a token.
Request body for PUT /api/v1/Groups/SubjectClass/BulkUpdate (SB-15451). The envelope-level organisationId scopes every item in the batch (cross-cutting §3.8.1).
Gets or sets the organisation the batch operates on. Optional when the calling client has access to a single organisation; required for multi-org clients.
OK
Standard envelope returned by every Public API bulk endpoint (BulkCreate / BulkUpdate / BulkArchive). Each item in the request is processed independently — one item failing does not roll back the others — and the envelope reports per-item outcome. See cross-cutting-design.md §4.
Gets or sets the ids of the items that were processed successfully. On BulkCreate these are the newly-created ids.
Gets or sets the total number of items in the request. Set by the caller (it is not derivable from the success/failure lists alone — items rejected before per-item processing may appear in neither).
Gets the number of items processed successfully (computed).
Gets the number of items that failed (computed).
Bad Request
Not Found
Internal Server Error
PUT /api/v1/Groups/SubjectClass/BulkUpdate HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"organisationId": 1,
"items": [
{
"title": "text",
"subjectId": 1,
"schoolYearGroupId": 1,
"leadStaffId": 1,
"isArchived": true,
"id": 1,
"clientReferenceId": "text"
}
]
}{
"successfulIds": [
1
],
"failedItems": [
{
"index": 1,
"clientReferenceId": "text",
"name": "text",
"code": "text",
"error": "text"
}
],
"totalRequested": 1,
"totalSuccessful": 1,
"totalFailed": 1
}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).
Type "Bearer" followed by a space and a token.
Request body for POST /api/v1/Groups/SubjectClass/BulkArchive (SB-15451). Toggleable: isArchived true archives (the parent Subject is unaffected, archive-strategy §2.5); false unarchives, and when the parent Subject is archived also restores it in the same transaction (upward cascade). BulkArchive and a PUT / BulkUpdate item carrying isArchived: false are the verbs allowed to operate on already-archived rows (EC-1 as amended 2026-07-31).
Gets or sets the organisation the batch operates on. Optional when the calling client has access to a single organisation; required for multi-org clients.
Gets or sets the ids (SubjectClass.Id) of the Subject Classes to transition. Id validity is checked per item (EC-7) — 0 / negative ids fail that item only.
Gets or sets a value indicating whether the Subject Classes are archived (true, default) or unarchived (false).
OK
Standard envelope returned by every Public API bulk endpoint (BulkCreate / BulkUpdate / BulkArchive). Each item in the request is processed independently — one item failing does not roll back the others — and the envelope reports per-item outcome. See cross-cutting-design.md §4.
Gets or sets the ids of the items that were processed successfully. On BulkCreate these are the newly-created ids.
Gets or sets the total number of items in the request. Set by the caller (it is not derivable from the success/failure lists alone — items rejected before per-item processing may appear in neither).
Gets the number of items processed successfully (computed).
Gets the number of items that failed (computed).
Bad Request
Not Found
Internal Server Error
POST /api/v1/Groups/SubjectClass/BulkArchive HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"organisationId": 1,
"ids": [
1
],
"isArchived": true
}{
"successfulIds": [
1
],
"failedItems": [
{
"index": 1,
"clientReferenceId": "text",
"name": "text",
"code": "text",
"error": "text"
}
],
"totalRequested": 1,
"totalSuccessful": 1,
"totalFailed": 1
}Adds students to a Subject Class (SubjectClassPupil membership). Already-assigned students are skipped.
Type "Bearer" followed by a space and a token.
The Subject Class id
The organisation the Subject Class belongs to — required when the client has access to multiple organisations
OK
Bad Request
Not Found
Internal Server Error
POST /api/v1/Groups/SubjectClass/{id}/AddStudents HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"studentIds": [
1
]
}{
"studentsProcessed": 1,
"totalRequested": 1
}Removes students from a Subject Class. Students not assigned to the Subject Class are skipped.
Type "Bearer" followed by a space and a token.
The Subject Class id
The organisation the Subject Class belongs to — required when the client has access to multiple organisations
OK
Bad Request
Not Found
Internal Server Error
POST /api/v1/Groups/SubjectClass/{id}/RemoveStudents HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"studentIds": [
1
]
}{
"studentsProcessed": 1,
"totalRequested": 1
}Gets the student person ids currently assigned to a Subject Class. Parent-bounded — not paged (BP8 sub-resource exemption).
Type "Bearer" followed by a space and a token.
The Subject Class id
The organisation the Subject Class belongs to — required when the client has access to multiple organisations
OK
Bad Request
Not Found
Internal Server Error
GET /api/v1/Groups/SubjectClass/{id}/Students HTTP/1.1
Host: publicapi-eu.schoolsbuddy.net
Authorization: YOUR_API_KEY
Accept: */*
[
1
]Last updated