Classes

Classes are scheduled sessions in which teachers deliver a given curriculum to a group of students.

Bulk update Students from a Class

patch
/v2p2/classes/{class_id}/students

This endpoint updates students belonging to a class as specified by class ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
class_idintegerRequired

Unique identifier for class.

Body
Responses
200

Success

application/json
patch
/v2p2/classes/{class_id}/students
200

Success

Get all Classes

get
/v2p2/classes

This endpoint retrieves all classes. It returns class name, class ID, grade, program, and any School-defined values.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Query parameters
modified_sincestringOptional

A timestamp to filter the modification date of results.

deleted_sincestringOptional

A timestamp to filter the deleted date of results.

pagestringOptional

An integer defining which page to display.

per_pagestringOptional

An integer defining the number of records to display per page.

archivedbooleanOptional

A boolean that, if set to True, returns only archived classes.

Responses
200

Success

application/json
get
/v2p2/classes
200

Success

Create a class

post
/v2p2/classes

This endpoint creates a class. It returns class details and the IDs of teachers.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Body
start_term_idintegerOptional

Academic term ID.

Example: 123
end_term_idintegerOptional

Academic term ID.

Example: 132
subject_idintegerOptional

Subject’s unique ID.

Example: 123434
programstringOptional

Program code.

Example: diploma
grade_numberintegerOptional

Grade number.

Example: 13
namestringOptional

Class Name.

Example: IB DP Biology (Grade 12)
descriptionstringOptional

Class description.

Example: Lorem ipsum dolor sitamet.
languagestring,Optional

Language of Instruction. Receives a language code.

Example: en
uniq_idstringOptional

Unique ID in ManageBac.

Example: DG333
class_sectionstringOptional

Identifier for a duplicated class/grade.

Example: A
subject_idsinteger[]Optional

Subjects unique IDs.

Example: [123434,10001]
slbooleanOptional

SL level

Example: true
hlbooleanOptional

HL level

Example: false
subject_optionone ofOptional

Subject option.

stringOptional

Allowed for Subject that support language level (e.g. Language and literature).

Example: Language and literature
or
string[]Optional

Allowed for Subject that support phases.

Example: ["1","2","3"]
lock_membershipsstringOptional

Lock Memberships.

Example: students_only
Responses
200

Success

application/json
post
/v2p2/classes

Upsert many classes

patch
/v2p2/classes

This endpoint creates and updates many classes. It returns indexed classes details and the IDs of teachers. It returns indexed errors for invalid classes.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Body
Responses
200

Success

application/json
patch
/v2p2/classes
200

Success

Get a Class

get
/v2p2/classes/{id}

This endpoint retrieves a single class as specified by ID. It returns class details and the IDs of teachers.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for class.

Responses
200

Success

application/json
get
/v2p2/classes/{id}
200

Success

Update a class

patch
/v2p2/classes/{id}

This endpoint updates a class. It returns class details and the IDs of teachers.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for class.

Body
archivedbooleanOptional

Archive Class.

Example: false
namestringOptional

Class Name.

Example: IB DP Biology (Grade 12)
descriptionstringOptional

Class description.

Example: Lorem ipsum dolor sitamet.
languagestring,Optional

Language of Instruction. Receives a language code.

Example: en
uniq_idstringOptional

Unique ID in ManageBac.

Example: DG333
class_sectionstringOptional

Identifier for a duplicated class/grade.

Example: A
subject_idsinteger[]Optional

Subjects unique IDs.

Example: [123434,10001]
slbooleanOptional

SL level

Example: true
hlbooleanOptional

HL level

Example: false
subject_optionone ofOptional

Subject option.

stringOptional

Allowed for Subject that support language level (e.g. Language and literature).

Example: Language and literature
or
string[]Optional

Allowed for Subject that support phases.

Example: ["1","2","3"]
lock_membershipsstringOptional

Lock Memberships.

Example: students_only
Responses
200

Success

application/json
patch
/v2p2/classes/{id}

Add Students to a Class

post
/v2p2/classes/{id}/add_students

This endpoint adds students, as specified by student ID/s, to a class as specified by class ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for class.

Body
student_idsinteger[]Required

An array of student IDs to add to the class.

Responses
200

Success

application/json
post
/v2p2/classes/{id}/add_students
200

Success

Remove Students from a Class

post
/v2p2/classes/{id}/remove_students

This endpoint removes students from a class, as specified by student ID/s and class ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
idintegerRequired

Unique identifier for class.

Body
student_idsinteger[]Required

An array of student IDs to remove from the class.

Responses
200

Success

application/json
post
/v2p2/classes/{id}/remove_students
200

Success

Set Teacher memberships for a Class

put
/v2p2/classes/{class_id}/teachers

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.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
class_idintegerRequired

Unique identifier for class.

Body
Responses
200

Success

application/json
put
/v2p2/classes/{class_id}/teachers

Add Teachers to a Class

post
/v2p2/classes/{class_id}/teachers/add_teachers

This endpoint adds teachers, as specified by teacher ID/s, to a class as specified by class ID.

Authorizations
auth_tokenstringRequired

Your V2 API authentication token may be passed in the parameters. To protect your key, use environment variables.

Path parameters
class_idintegerRequired

Unique identifier for class.

Body
teacher_idsinteger[]Required

An array of teacher IDs to add to the class.

Responses
200

Success

application/json
post
/v2p2/classes/{class_id}/teachers/add_teachers
200

Success

Last updated

Was this helpful?