Generate Embeddable Sections
This endpoint allows creating a new section in the catalog, presenting contents in a card format in a carousel gallery.
Request Example
Section titled “Request Example”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] }'Response Example
Section titled “Response Example”{ "message": "Section successfully created"}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
name | string | Name of the new section to be created. | Yes |
description | string | Section description. | No |
school | string | School unique identifier, allowing the creation of exclusive sections for each unit. | No |
content_type | array | Array 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 |
groups | array | Array containing strings or IDs of existing groups. Names or IDs must exactly match registered groups. | No |
subgroups | array | Array containing strings or IDs of subgroups. Names or IDs must exactly match existing subgroups related to the groups. | No |
specialties | array | Array containing strings or IDs of specialties. Names or IDs must match existing specialties related to subgroups. | No |
order | array | Array containing objects with the properties criteria and orientation to define the order of items in the section. | No |
order.criteria | int | Integer for the ordering criteria. Options: alphabetical = 1 (default), creation_date = 2, price = 3, random = 4. | No |
order.orientation | int | Integer for ordering orientation. Options: crescent = 1, decrescent = 2. | No |
status | int | Integer to define the section status. Options: active = 1, inactive = 2. | Yes |
content_attributes | int | Integer 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 |
manual | array | If content_attributes is 4, include a “manual” array with the IDs of the desired items (maximum of 10 items). | No |
Security
Section titled “Security”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.