V1::SchoolProductsController

School Products

index

Get a list of school_products

URL

GET /school_products

Objeto resposta

Array<SchoolProduct>

The created school_products

create

Create new school_product

URL

POST /school_products

Parâmetros obrigatórios

Nome Tipo Descrição
school_product Hash

The school_product to create

school_product[title] String

Title of the school_product

Parâmetros opcionais

Nome Tipo Descrição
school_product[description] String

Status of the school_product

school_product[subtitle] String
school_product[logo] String
school_product[video_url] String
school_product[video_title] String
school_product[video_description] String
school_product[published] Boolean
school_product[hidden] Boolean
school_product[restricted] Boolean
school_product[certification] Boolean
school_product[classes_auto_generation] Boolean
school_product[certification_min_progress] Integer
school_product[meta_title] String
school_product[meta_description] Text
school_product[meta_keys] Text
school_product[available_time_type] String
school_product[available_time_length] Integer

Required if available_time_type == 'time'

school_product[available_time_unit] String

Required if available_time_type == 'time'

school_product[expire_date] DateTime

Required if available_time_type == 'date'

school_product[library_resource_id] Integer

Required if published == true

school_product[max_attendance_type] String
school_product[max_attendance_length] Integer

Required if max_attendance_type is 'time' or 'attempts'

school_product[allowed_emails] String
school_product[class_teacher_ids] Array<Integer>
Array Array<Integer] school_product[category_ids]

school_product[category_ids]

Array Array<Integer] school_product[gallery_media_ids]

school_product[gallery_media_ids]

Objeto resposta

SchoolProduct

The created school_product or a list of errors

show

Get a school_products information

URL

GET /school_products/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

of the school_product

Objeto resposta

SchoolProduct

The requested school_product

update

Update an existing school_product and redirect to 'show' action

URL

PUT/PATCH /school_products/:id

Parâmetros obrigatórios

Nome Tipo Descrição
school_product Hash

The school_product to create

school_product[title] String

Title of the school_product

Parâmetros opcionais

Nome Tipo Descrição
school_product[description] String

Status of the school_product

school_product[subtitle] String
school_product[logo] String
school_product[video_url] String
school_product[video_title] String
school_product[video_description] String
school_product[published] Boolean
school_product[hidden] Boolean
school_product[restricted] Boolean
school_product[certification] Boolean
school_product[classes_auto_generation] Boolean
school_product[certification_min_progress] Integer
school_product[meta_title] String
school_product[meta_description] Text
school_product[meta_keys] Text
school_product[available_time_type] String
school_product[available_time_length] Integer

Required if available_time_type == 'time'

school_product[available_time_unit] String

Required if available_time_type == 'time'

school_product[expire_date] DateTime

Required if available_time_type == 'date'

school_product[library_resource_id] Integer

Required if published == true

school_product[max_attendance_type] String
school_product[max_attendance_length] Integer

Required if max_attendance_type is 'time' or 'attempts'

school_product[allowed_emails] String
school_product[class_teacher_ids] Array<Integer>
Array Array<Integer] school_product[category_ids]

school_product[category_ids]

Array Array<Integer] school_product[gallery_media_ids]

school_product[gallery_media_ids]

Objeto resposta

SchoolProduct

The created school_product or a list of errors

destroy

Destroy school_product

URL

DELETE /school_products/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of an school_product