List Sections
GET {{baseUrl}}/api/v2/help_center/:locale/sections?sort_by=position&sort_order=asc
Lists all the sections in Help Center or in a specific category.
The {locale}
is required only for end users and anomynous users. Admins and agents can omit it.
Allowed for
- Anonymous users
The response will list only the sections that the requesting agent, end user, or anonymous user can view in the help center.
Pagination
- Cursor pagination (recommended)
- Offset pagination
See Pagination.
Sorting
You can sort the results with the sort_by
and sort_order
query string parameters.
GET /api/v2/help_center/en-us/sections.json?sort_by=updated_at&sort_order=asc
The sort_by
parameter can have one of the following values:
value | description |
---|---|
position | order set manually using the Arrange Content page. Default order |
created_at | order by creation time |
updated_at | order by update time |
The sort_order
parameter can have one of the following values:
value | description |
---|---|
asc | ascending order |
desc | descending order |
Sideloads
The following sideloads are supported:
Name | Will sideload |
---|---|
categories | the category |
translations | the section and category translations, if any |
Unlike other sideloads, translations are embedded within the section because they're not shared between resources. Category translations are only sideloaded if categories are.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sort_by | string | Sorts the results by one of the accepted values | |
sort_order | string | Selects the order of the results. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"sections":[{"name":"\u003cstring\u003e","locale":"\u003cstring\u003e","category_id":"\u003cinteger\u003e","created_at":"\u003cstring\u003e","description":"\u003cstring\u003e","html_url":"\u003cstring\u003e","id":"\u003cinteger\u003e","outdated":"\u003cboolean\u003e","parent_section_id":"\u003cinteger\u003e","position":"\u003cinteger\u003e","source_locale":"\u003cstring\u003e","theme_template":"\u003cstring\u003e","updated_at":"\u003cstring\u003e","url":"\u003cstring\u003e"},{"name":"\u003cstring\u003e","locale":"\u003cstring\u003e","category_id":"\u003cinteger\u003e","created_at":"\u003cstring\u003e","description":"\u003cstring\u003e","html_url":"\u003cstring\u003e","id":"\u003cinteger\u003e","outdated":"\u003cboolean\u003e","parent_section_id":"\u003cinteger\u003e","position":"\u003cinteger\u003e","source_locale":"\u003cstring\u003e","theme_template":"\u003cstring\u003e","updated_at":"\u003cstring\u003e","url":"\u003cstring\u003e"}]}