The Category Object
Categories returned by the API take this format: { // Dates "created_at": ISODate("2016-06-26T15:30:38.731Z"), "updated_at": ISODate("2016-06-26T15:40:28.926Z"), // Identifiers "account_id": "test_ac…
Categories returned by the API take this format:
{
// Dates
"created_at": ISODate("2016-06-26T15:30:38.731Z"),
"updated_at": ISODate("2016-06-26T15:40:28.926Z"),
// Identifiers
"account_id": "test_account_id",
"category_id": "test_category_id",
"parent_category_id": "test_parent_id",
// Mutable Properties
"title": "Authentication",
"description": "",
"multilingual": [ MultilingualCategory ],
// Calculated Properties
"slug": "authentication"
}
There's far fewer mutable properties on a category than an article.
Property | |
created_at | When category was first created. |
updated_at | When category was last updated (through the dashboard or the API). |
account_id | The ID of the account this category belongs to. |
category_id | A unique identifier for this category |
parent_category_id | If this is a subcategory this value will be the parent category's |
title | The title of the category |
description | A string describing the category. This is surpressed on some themes. |
slug | The URL slug this slug appears at (e.g. /category/:category_id-:slug) |
multilingual | An array of multilingual article objects. See below. 👇 |
Multilingual Category Objects
HelpDocs supports the display of categories in multiple languages. The API will return an array of multilingual category objects, each looking like this:
{
"language_code": "de",
"title": "German title",
"body": "German description",
"slug": "german-slug"
}
The fields map directly to the category fields in the table above.
How did we do?
Getting a Single Category
Updating a Category