Classes
Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students.
This endpoint retrieves all classes. It returns class name, class ID, grade, program, and any School-defined values.
A timestamp to filter the modification date of results.
A timestamp to filter the deleted date of results.
An integer defining which page to display.
An integer defining the number of records to display per page.
A boolean that, if set to True, returns only archived classes.
Success
GET /v2/classes HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
Success
{
"classes": [
{
"id": 852,
"name": "IB DP English A (Grade 11)",
"start_term_id": 1,
"end_term_id": 2,
"created_at": "2021-06-28T12:39:36.000Z",
"updated_at": "2021-06-28T12:39:36.000Z",
"grade": "Grade 11",
"grade_number": 12,
"applicable_levels": [
"HL",
"SL"
],
"program": "IB Diploma",
"program_code": "diploma",
"subject_id": 927,
"subject_name": "English",
"subject_group": "Studies in Language and Literature",
"subject_group_id": 13,
"teachers": [
{
"teacher_id": 1960,
"show_on_reports": false,
"teacher_archived": false
}
]
}
],
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"per_page": 100
}
}
This endpoint creates a class. It returns class details and the IDs of teachers.
Academic term ID.
123
Academic term ID.
132
Subject’s unique ID.
123434
Program code.
diploma
Grade number.
13
Class Name.
IB DP Biology (Grade 12)
Class description.
Lorem ipsum dolor sitamet.
Language of Instruction. Receives a language code.
en
Unique ID in ManageBac.
DG333
Identifier for a duplicated class/grade.
A
Subjects unique IDs.
[123434,10001]
SL level
true
HL level
false
Subject option.
Allowed for Subject that support language level (e.g. Language and literature).
Language and literature
Allowed for Subject that support phases.
["1","2","3"]
Lock Memberships.
students_only
Success
Unprocessable Entity
POST /v2/classes HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 356
{
"start_term_id": 123,
"end_term_id": 132,
"subject_id": 123434,
"program": "diploma",
"grade_number": 13,
"name": "IB DP Biology (Grade 12)",
"description": "Lorem ipsum dolor sitamet.",
"language": "en",
"uniq_id": "DG333",
"class_section": "A",
"subject_ids": [
123434,
10001
],
"sl": true,
"hl": false,
"subject_option": "Language and literature",
"lock_memberships": "students_only"
}
{
"id": 123,
"name": "IB DP Biology (Grade 12)",
"description": "Lorem ipsum dolor sitamet.",
"language": "en",
"uniq_id": "DG333",
"class_section": "A",
"start_term_id": 123,
"end_term_id": 132,
"created_at": "2023-07-24T15:12:58.000Z",
"updated_at": "2023-07-24T15:12:58.000Z",
"grade": "Grade 12",
"grade_number": 7,
"applicable_levels": [
"HL",
"SL"
],
"program": "IB Diploma",
"program_code": "diploma",
"subject_id": 123434,
"subject_name": "Norwegian",
"subject_group": "Studies in language and literature",
"subject_option": "Language and literature",
"lock_memberships": "students_only",
"archived": false,
"subjects": [
{
"id": 123,
"name": "Spanish",
"subject_group_id": 123,
"subject_group": "Language"
}
],
"teachers": [
{
"teacher_id": 123,
"show_on_reports": true,
"teacher_archived": false
}
]
}
This endpoint creates and updates many classes. It returns indexed classes details and the IDs of teachers. It returns indexed errors for invalid classes.
Success
PATCH /v2/classes HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 300
{
"classes": [
{
"id": 123,
"archived": false,
"name": "IB DP Biology (Grade 12)",
"description": "Lorem ipsum dolor sitamet.",
"language": "en",
"uniq_id": "DG333",
"class_section": "A",
"subject_ids": [
123434,
10001
],
"sl": true,
"hl": false,
"subject_option": "Language and literature",
"lock_memberships": "students_only"
}
]
}
Success
[
{
"index": 0,
"errors": {},
"status": "unprocessable_entity"
}
]
This endpoint retrieves a single class as specified by ID. It returns class details and the IDs of teachers.
Unique identifier for class.
Success
GET /v2/classes/{id} HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Accept: */*
Success
{
"class": {
"id": 854,
"name": "IB DP English A (Grade 11)",
"created_at": "2021-06-28T12:39:37.000Z",
"updated_at": "2021-06-28T12:39:37.000Z",
"grade": "Grade 11",
"grade_number": 12,
"applicable_levels": [
"HL",
"SL"
],
"program": "IB Diploma",
"program_code": "diploma",
"subject_id": 929,
"subject_name": "English",
"subject_group": "Studies in Language and Literature",
"subject_group_id": 13,
"teachers": []
}
}
This endpoint updates a class. It returns class details and the IDs of teachers.
Unique identifier for class.
Archive Class.
false
Class Name.
IB DP Biology (Grade 12)
Class description.
Lorem ipsum dolor sitamet.
Language of Instruction. Receives a language code.
en
Unique ID in ManageBac.
DG333
Identifier for a duplicated class/grade.
A
Subjects unique IDs.
[123434,10001]
SL level
true
HL level
false
Subject option.
Allowed for Subject that support language level (e.g. Language and literature).
Language and literature
Allowed for Subject that support phases.
["1","2","3"]
Lock Memberships.
students_only
Success
Not Found
Unprocessable Entity
PATCH /v2/classes/{id} HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 277
{
"archived": false,
"name": "IB DP Biology (Grade 12)",
"description": "Lorem ipsum dolor sitamet.",
"language": "en",
"uniq_id": "DG333",
"class_section": "A",
"subject_ids": [
123434,
10001
],
"sl": true,
"hl": false,
"subject_option": "Language and literature",
"lock_memberships": "students_only"
}
{
"id": 123,
"name": "IB DP Biology (Grade 12)",
"description": "Lorem ipsum dolor sitamet.",
"language": "en",
"uniq_id": "DG333",
"class_section": "A",
"start_term_id": 123,
"end_term_id": 132,
"created_at": "2023-07-24T15:12:58.000Z",
"updated_at": "2023-07-24T15:12:58.000Z",
"grade": "Grade 12",
"grade_number": 7,
"applicable_levels": [
"HL",
"SL"
],
"program": "IB Diploma",
"program_code": "diploma",
"subject_id": 123434,
"subject_name": "Norwegian",
"subject_group": "Studies in language and literature",
"subject_option": "Language and literature",
"lock_memberships": "students_only",
"archived": false,
"subjects": [
{
"id": 123,
"name": "Spanish",
"subject_group_id": 123,
"subject_group": "Language"
}
],
"teachers": [
{
"teacher_id": 123,
"show_on_reports": true,
"teacher_archived": false
}
]
}
This endpoint adds teachers, as specified by teacher ID/s, to a class as specified by class ID.
Unique identifier for class.
An array of teacher IDs to add to the class.
Success
POST /v2/classes/{class_id}/teachers/add_teachers HTTP/1.1
Host: api.managebac.com
auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"teacher_ids": [
1
]
}
Success
{
"status": "ok"
}
Was this helpful?