V1::EnrollmentsController

Enrollment resources

show

View an enrollment

URL

GET /enrollments/:id or /enrollments/:code?find_by=code

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

The identifier of the enrollment

Objeto resposta

Enrollment

The requested enrollment

index

View list of all enrollments

URL

GET /enrollments or /students/:student_id/enrollments or /course_classes/:course_class_id/enrollments or /school_products/:school_product_id/enrollments

Parâmetros obrigatórios

Nome Tipo Descrição
student_id Integer

Identifier of the Student object (route dependence)

course_class_id Integer

Identifier of the CourseClass object (route dependence)

school_product_id Integer

Identifier of the SchoolProduct object (route dependence)

Parâmetros opcionais

Nome Tipo Descrição
page String

The desired page of results

per_page String

How many objects per page (only works when page is provided)

Objeto resposta

Array<Enrollment>

List of enrollments

status

Check if student's enrollment is active

URL

GET /students/:student_id/enrollments/:id

Parâmetros obrigatórios

Nome Tipo Descrição
student_id Integer

Identifier of the Student object

id Integer

Identifier of the Enrollment object

create

Create an enrollment

URL

POST /enrollments

Parâmetros obrigatórios

Nome Tipo Descrição
enrollment Hash

The enrollment to create

enrollment[registration_id] Integer

The identifier of the Registration object

enrollment[school_product_id] Integer

The identifier of the SchoolProduct object

enrollment[max_attendance_type] String

Enrollment type, can be indeterminate, time or attempts

Parâmetros opcionais

Nome Tipo Descrição
enrollment[max_attendance_length] Integer

Attendance length. Required if enrollment[max_attendance_type] is time or attempts

enrollment[status] String

Enrollment status, can be pending, active, expired, deactivated or canceled

enrollment[available_until] DateTime

Date of enrollment's expiration. Required if enrollment[unlimited] is false

enrollment[created_at] DateTime

Date of enrollment's creation.

enrollment[activated_at] DateTime

Date of enrollment's activation.

enrollment[unlimited] Boolean

Says if the enrollment is unlimited [true, false]

enrollment[code] String

Representation code of enrollment (uniq)

enrollment[time_spent] Integer

This param will be permitted by using an App's credential

enrollment[course_class_ids] Array<Integer>

An array of course classes ids to associate to the enrollment

batch

Create an enrollments in a batch

URL

POST /enrollments/batch

Parâmetros obrigatórios

Nome Tipo Descrição
enrollments Array<Enrollment>

The enrollments to be created

update

Update an enrollment

URL

PUT /enrollments/:id or /enrollments/:code?find_by=code

Parâmetros obrigatórios

Nome Tipo Descrição
enrollment Hash

The enrollment to update

enrollment[registration_id] Integer

The identifier of the Registration object

enrollment[school_product_id] Integer

The identifier of the SchoolProduct object

enrollment[max_attendance_type] String

Enrollment type, can be indeterminate, time or attempts

Parâmetros opcionais

Nome Tipo Descrição
enrollment[max_attendance_length] Integer

Attendance length. Required if enrollment[max_attendance_type] is time or attempts

enrollment[status] String

Enrollment status, can be pending, active, expired, deactivated or canceled

enrollment[available_until] DateTime

Date of enrollment's expiration. Required if enrollment[unlimited] is false

enrollment[created_at] DateTime

Date of enrollment's creation.

enrollment[activated_at] DateTime

Date of enrollment's activation.

enrollment[unlimited] Boolean

Says if the enrollment is unlimited [true, false]

enrollment[code] String

Representation code of enrollment (uniq)

enrollment[time_spent] Integer

This param will be permitted by using an App's credential

enrollment[course_class_ids] Array<Integer>

An array of course classes ids to associate to the enrollment