Get category with an ID

Prev Next
Get
/v2/Categories/{categoryId}
Security
API Key: api_token
Header parameter nameapi_token

The API token used for authenticating the request. This must be passed as a header parameter. To generate an API token, go to Settings > Knowledge base portal > API tokens. This token must correspond to a valid workspace and permission level.

Path parameters
categoryId
stringRequired

The ID of the category

Query parameters
langCode
string

If the language code is empty, the default language of the category will be taken into account.

Responses
200

Success

Success Response

This is an example for get category succes response. \n Here you can view diffrent data included with multiple article associated with a category.

{
  "data": {
    "id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
    "name": "Category name",
    "description": null,
    "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
    "order": 11,
    "parent_category_id": null,
    "hidden": false,
    "articles": [
      {
        "id": "cf8f67da-77c7-48b1-b207-70875caa2f55",
        "title": "New article 1",
        "public_version": 1,
        "latest_version": 1,
        "language_code": "en",
        "hidden": false,
        "status": 0,
        "order": 2,
        "slug": "new-article-1",
        "content_type": null,
        "translation_option": 0,
        "is_shared_article": false,
        "modified_at": "2024-06-13T14:30:00Z",
        "current_workflow_status_id": "ec0a4d2a-bb13-4c55-867e-1e9e0be07086"
      },
      {
        "id": "925b69b9-f241-4d89-9e3e-208a98dfc8eb",
        "title": "New article 2",
        "public_version": 1,
        "latest_version": 1,
        "language_code": "en",
        "hidden": false,
        "status": 0,
        "order": 2,
        "slug": "new-article-2",
        "content_type": null,
        "translation_option": 0,
        "is_shared_article": false,
        "modified_at": "2024-06-13T14:30:00Z",
        "current_workflow_status_id": "ec0a4d2a-bb13-4c55-867e-1e9e0be07086"
      }
    ],
    "child_categories": [
      {
        "id": "5b291e6b-fa40-4ab9-941e-f8fffc23b376",
        "name": "Child category name",
        "description": null,
        "project_version_id": "46f48bc7-760f-4b07-b2d2-fce4aa8ba234",
        "order": 11,
        "parent_category_id": null,
        "hidden": false,
        "articles": [
          {
            "id": "cf8f67da-77c7-48b1-b207-70875caa2f55",
            "title": "New article 3",
            "public_version": 1,
            "latest_version": 1,
            "language_code": "en",
            "hidden": false,
            "status": 0,
            "order": 2,
            "slug": "new-article-3",
            "content_type": null,
            "translation_option": 0,
            "is_shared_article": false,
            "modified_at": "2024-06-13T14:30:00Z",
            "current_workflow_status_id": "ec0a4d2a-bb13-4c55-867e-1e9e0be07086"
          },
          {
            "id": "925b69b9-f241-4d89-9e3e-208a98dfc8eb",
            "title": "New article 4",
            "public_version": 1,
            "latest_version": 1,
            "language_code": "en",
            "hidden": false,
            "status": 0,
            "order": 2,
            "slug": "new-article-4",
            "content_type": null,
            "translation_option": 0,
            "is_shared_article": false,
            "modified_at": "2024-06-13T14:30:00Z",
            "current_workflow_status_id": "ec0a4d2a-bb13-4c55-867e-1e9e0be07086"
          }
        ],
        "child_categories": [],
        "icon": null,
        "slug": "category-name",
        "language_code": null,
        "category_type": 2,
        "created_at": "2024-06-13T14:30:00Z",
        "modified_at": "2024-06-13T14:30:00Z",
        "status": null,
        "content_type": null,
        "current_workflow_status_id": "9fc4dd1a-ee83-489f-994d-ddf43c9b4b18"
      }
    ],
    "icon": null,
    "slug": "category-name",
    "language_code": null,
    "category_type": 2,
    "created_at": "2024-06-13T14:30:00Z",
    "modified_at": "2024-06-13T14:30:00Z",
    "status": null,
    "content_type": null,
    "current_workflow_status_id": "9fc4dd1a-ee83-489f-994d-ddf43c9b4b18"
  },
  "extension_data": null,
  "success": true,
  "errors": [],
  "warnings": [],
  "information": []
}
Expand All
object
data
object | null
id
string | null

The ID of the category

name
string | null

Name of the category

description
string | null

Description of the category

project_version_id
string | null

The ID of the project version where this category is located

order
integer (int32)

The position the category inside the parent category

parent_category_id
string | null

The ID of the parent category ( null if top-level )

hidden
boolean

Indicates if the category is visible on the site ( If "false," all the child categories and articles will be hidden as well )

articles
Array of object (ArticleSimpleDataCustomer) | null

The list of articles attached to this category

object
id
string | null

The ID of the article

title
string | null

The article title

public_version
integer (int32)

The article version number(revision) that is currently published

latest_version
integer (int32)

The latest version number of this article

language_code
string | null Deprecated

The default language code

hidden
boolean

Indicates if the article is visible on the site

status
integer (int32)

The status of the article: 0 - Draft, 3 - Published

Valid values[ 0, 3 ]
order
integer (int32)

The position of the article inside the parent category

slug
string | null

The slug of the article

content_type
integer (int32) | null

The content type of the article: Markdown = 0, Wysiwyg = 1, Block = 2

Valid values[ 0, 1, 2 ]
translation_option
integer (int32)

The Translation status of the article

Valid values[ 0, 1, 2, 3 ]
is_shared_article
boolean

True indicates that the article is shared

modified_at
string (date-time) | null

Article modified date time

current_workflow_status_id
string | null

Current Workflow status of the article

child_categories
Array of object (CategoryDataCustomer) | null

The list of categories attached to this category

object Recursive
icon
string | null

Unicode representation of the icon or image URL

slug
string | null

The slug of the category

language_code
string | null

Language code of the category

category_type
integer (int32)

0 - Folder, 1 - Page, 2 - Index

Valid values[ 0, 1, 2 ]
created_at
string (date-time) | null

Category created date time

modified_at
string (date-time) | null

Category modified date time

status
integer (int32) | null

The status of the page type category: 0 - Draft, 3 - Published

Valid values[ 0, 3 ]
content_type
integer (int32) | null

The content type of the page type category: Markdown = 0, Wysiwyg = 1, Block = 2

Valid values[ 0, 1, 2 ]
current_workflow_status_id
string | null

Current Workflow status of the article

extension_data
object | null

Extension data for customer API response

success
boolean

Indicates the status of the API response. A value of true signifies that the request was successfully processed, while false indicates a failure or error occurred.

errors
Array of object (BaseError) | null

A list of errors encountered during the API request. Each error object provides details about the problem, including an error code and a message explaining the issue. This field is populated when the request fails or encounters issues.

object
extension_data
object | null

This is the Extension data object

stack_trace
string | null

A technical trace showing where the error occurred within the system. Intended for backend debugging.

description
string | null

A clear message explaining what caused the error. This helps quickly understand what went wrong.

error_code
string | null

A short, predefined code that identifies the type of error. Useful for logging the error or raising a support request.

custom_data
object | null

Any structured metadata for the error object.

property*
warnings
Array of object (BaseWarning) | null

A list of warnings generated during the API request. These are non-critical issues or recommendations that might affect the request but won't stop it from processing. Each warning object provides a message to inform the user of potential problems.

object
extension_data
object | null

Extension Data for customer Api warning

description
string | null

A plain message that describes the warning and helps understand what should be reviewed.

warning_code
string | null

A short, predefined code that uniquely identifies the warning type.

information
Array of object (BaseInformation) | null

Contains additional non-critical information relevant to the request or response. This field provides extra details that might assist in understanding the context of the API response but is not essential for processing.

object
extension_data
object | null

Extension data for customer Api response information

description
string | null

A plain message offering helpful context about the response, such as confirmation of fallback logic or skipped operations.

400

Bad Request

Category Not Found

Kindly verify the Categotry Id, and peroform the task again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "Cannot find category with id 5b291e6b-fa40-4ab9-941e-f8fffc23b3761",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Language Not Found

Kindly verify the langCode, and peroform the task again.

{
  "extension_data": null,
  "success": false,
  "errors": [
    {
      "extension_data": null,
      "stack_trace": null,
      "description": "Language code not found",
      "error_code": null,
      "custom_data": null
    }
  ],
  "warnings": [],
  "information": []
}
Expand All
object
extension_data
object | null

Extension data for customer API response

success
boolean

Indicates the status of the API response. A value of true signifies that the request was successfully processed, while false indicates a failure or error occurred.

errors
Array of object (BaseError) | null

A list of errors encountered during the API request. Each error object provides details about the problem, including an error code and a message explaining the issue. This field is populated when the request fails or encounters issues.

object
extension_data
object | null

This is the Extension data object

stack_trace
string | null

A technical trace showing where the error occurred within the system. Intended for backend debugging.

description
string | null

A clear message explaining what caused the error. This helps quickly understand what went wrong.

error_code
string | null

A short, predefined code that identifies the type of error. Useful for logging the error or raising a support request.

custom_data
object | null

Any structured metadata for the error object.

property*
warnings
Array of object (BaseWarning) | null

A list of warnings generated during the API request. These are non-critical issues or recommendations that might affect the request but won't stop it from processing. Each warning object provides a message to inform the user of potential problems.

object
extension_data
object | null

Extension Data for customer Api warning

description
string | null

A plain message that describes the warning and helps understand what should be reviewed.

warning_code
string | null

A short, predefined code that uniquely identifies the warning type.

information
Array of object (BaseInformation) | null

Contains additional non-critical information relevant to the request or response. This field provides extra details that might assist in understanding the context of the API response but is not essential for processing.

object
extension_data
object | null

Extension data for customer Api response information

description
string | null

A plain message offering helpful context about the response, such as confirmation of fallback logic or skipped operations.