Classes
Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students.
This endpoint updates students belonging to a class as specified by class ID.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
Success
PATCH /v2p1/classes/{class_id}/students HTTP/1.1
Host: api.devel.managebac.com
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"students": [
{
"id": 123,
"level": "HL"
}
]
}Success
{
"students": [
{
"id": 1,
"status": "ok"
},
{
"id": 2,
"status": "unprocessable_entity",
"errors": {
"level": [
"is not included in the list"
]
}
},
{
"id": 3,
"status": "not_found"
}
]
}This endpoint retrieves all classes. It returns class name, class ID, grade, program, and any School-defined values.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
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 /v2p1/classes HTTP/1.1
Host: api.devel.managebac.com
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.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Academic term ID.
123Academic term ID.
132Subject’s unique ID.
123434Program code.
diplomaGrade number.
13Class Name.
IB DP Biology (Grade 12)Class description.
Lorem ipsum dolor sitamet.Language of Instruction. Receives a language code.
enUnique ID in ManageBac.
DG333Identifier for a duplicated class/grade.
ASubjects unique IDs.
[123434,10001]SL level
trueHL level
falseSubject option.
Allowed for Subject that support language level (e.g. Language and literature).
Language and literatureAllowed for Subject that support phases.
["1","2","3"]Lock Memberships.
students_onlySuccess
Unprocessable Entity
POST /v2p1/classes HTTP/1.1
Host: api.devel.managebac.com
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.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Success
PATCH /v2p1/classes HTTP/1.1
Host: api.devel.managebac.com
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.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
Success
GET /v2p1/classes/{id} HTTP/1.1
Host: api.devel.managebac.com
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.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
Archive Class.
falseClass Name.
IB DP Biology (Grade 12)Class description.
Lorem ipsum dolor sitamet.Language of Instruction. Receives a language code.
enUnique ID in ManageBac.
DG333Identifier for a duplicated class/grade.
ASubjects unique IDs.
[123434,10001]SL level
trueHL level
falseSubject option.
Allowed for Subject that support language level (e.g. Language and literature).
Language and literatureAllowed for Subject that support phases.
["1","2","3"]Lock Memberships.
students_onlySuccess
Not Found
Unprocessable Entity
PATCH /v2p1/classes/{id} HTTP/1.1
Host: api.devel.managebac.com
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 students, as specified by student ID/s, to a class as specified by class ID.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
An array of student IDs to add to the class.
Success
POST /v2p1/classes/{id}/add_students HTTP/1.1
Host: api.devel.managebac.com
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"student_ids": [
1
]
}Success
{
"status": "ok"
}This endpoint removes students from a class, as specified by student ID/s and class ID.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
An array of student IDs to remove from the class.
Success
POST /v2p1/classes/{id}/remove_students HTTP/1.1
Host: api.devel.managebac.com
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"student_ids": [
1
]
}Success
{
"status": "ok"
}Completely replaces the given class's teacher memberships according to the provided payload. Specifying a payload of an empty array [] will remove all teachers. In addition to defining memberships, also enables or disables Show on Reports.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
Success
Bad Request
PUT /v2p1/classes/{class_id}/teachers HTTP/1.1
Host: api.devel.managebac.com
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"teachers": [
{
"id": 123,
"show_on_reports": false
}
]
}{
"teachers": [
{
"index": 0,
"status": "unprocessable_entity",
"errors": {
"id": [
"can't be blank"
]
}
},
{
"index": 1,
"id": 1,
"status": "not_found"
},
{
"index": 2,
"id": 2,
"status": "ok"
}
]
}This endpoint adds teachers, as specified by teacher ID/s, to a class as specified by class ID.
Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.
Unique identifier for class.
An array of teacher IDs to add to the class.
Success
POST /v2p1/classes/{class_id}/teachers/add_teachers HTTP/1.1
Host: api.devel.managebac.com
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"teacher_ids": [
1
]
}Success
{
"status": "ok"
}Last updated
Was this helpful?

