List Categories
GET {{baseUrl}}/api/v2/help_center/:locale/categories?sort_by=position&sort_order=asc
Note: {/locale}
is an optional parameter for admins and agents. End users and anonymous users must provide the parameter.
Allowed for
- Anonymous users
The response will list only the categories that the 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/categories.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 |
---|---|
translations | the category translations, if any |
Translations are embedded within the category because they're not shared between resources.
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
{"categories":[{"id":"\u003cinteger\u003e","name":"\u003cstring\u003e","locale":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","description":"\u003cstring\u003e","html_url":"\u003cstring\u003e","outdated":"\u003cboolean\u003e","position":"\u003cinteger\u003e","source_locale":"\u003cstring\u003e","updated_at":"\u003cdateTime\u003e","url":"\u003cstring\u003e"},{"id":"\u003cinteger\u003e","name":"\u003cstring\u003e","locale":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","description":"\u003cstring\u003e","html_url":"\u003cstring\u003e","outdated":"\u003cboolean\u003e","position":"\u003cinteger\u003e","source_locale":"\u003cstring\u003e","updated_at":"\u003cdateTime\u003e","url":"\u003cstring\u003e"}]}