Skip to content

Generate Embeddable Sections

This endpoint allows creating a new section in the catalog, presenting contents in a card format in a carousel gallery.

Terminal window
curl --request POST \
--url https://kong.api.toolzz.com.br/catalog/secao \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"name": "<string>",
"description": "<string>",
"school": "<string>",
"content_type": [1],
"groups": ["<string>"],
"subgroups": ["<string>"],
"specialties": ["<string>"],
"order": [
{
"criteria": 1,
"orientation": 1
}
],
"status": 1,
"content_attributes": 4,
"manual": [123, 456]
}'
{
"message": "Section successfully created"
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
namestringName of the new section to be created.Yes
descriptionstringSection description.No
schoolstringSchool unique identifier, allowing the creation of exclusive sections for each unit.No
content_typearrayArray that defines the content types to be included in the section. Options: courses=1, components=2, trail=3, learning_object=4, video=5, audio=6, album=7, pdf=8, text=9, package=10.Yes
groupsarrayArray containing strings or IDs of existing groups. Names or IDs must exactly match registered groups.No
subgroupsarrayArray containing strings or IDs of subgroups. Names or IDs must exactly match existing subgroups related to the groups.No
specialtiesarrayArray containing strings or IDs of specialties. Names or IDs must match existing specialties related to subgroups.No
orderarrayArray containing objects with the properties criteria and orientation to define the order of items in the section.No
order.criteriaintInteger for the ordering criteria. Options: alphabetical = 1 (default), creation_date = 2, price = 3, random = 4.No
order.orientationintInteger for ordering orientation. Options: crescent = 1, decrescent = 2.No
statusintInteger to define the section status. Options: active = 1, inactive = 2.Yes
content_attributesintInteger to define the criteria for selecting items for the section: 1 = Popularity (most accessed), 2 = Reviews (highest rated), 3 = News (most recently created), 4 = Manual (specific IDs).No
manualarrayIf content_attributes is 4, include a “manual” array with the IDs of the desired items (maximum of 10 items).No

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.