This endpoint allows you to list
, create
, retrieve
, update
and delete
your categories.
Key | Type | Description |
---|---|---|
name |
string |
Required. The category's name |
permalink_slug |
string |
The category's permalink slug. |
parent_id |
integer |
The Unique identifier of the parent category, if any. |
locations |
array |
The category's locations, if any. |
priority |
integer |
The category's priority. |
status |
boolean |
Has the value true if the category is enabled or the value false if the category is disabled. |
description |
string |
An arbitrary string attached to the category. |
thumb |
string |
The URL where the category's thumbnail can be accessed. |
{
"name": "Appetizer",
"permalink_slug": "appetizer",
"parent_id": null,
"locations": [],
"priority": null,
"status": true,
"description": "Sed consequat, sapien in scelerisque egestas",
"thumb": null
}
Returns a list of categories you’ve previously created.
Required abilities: categories:read
POST /api/categories
Key | Type | Description |
---|---|---|
page |
integer |
The page number. |
Status: 201 Created
[
{
"name": "Appetizer",
"permalink_slug": "appetizer",
"parent_id": null,
"locations": [],
"priority": null,
"status": true,
"description": "Sed consequat, sapien in scelerisque egestas",
"thumb": null
}
]
Creates a new category.
Required abilities: categories:write
POST /api/categories
Key | Type | Description |
---|---|---|
name |
string |
Required. The category's name |
permalink_slug |
string |
The category's permalink slug. |
parent_id |
integer |
The Unique identifier of the parent category, if any. |
locations |
array |
The category's locations, if any. |
priority |
integer |
The category's priority. |
status |
boolean |
Has the value true if the category is enabled or the value false if the category is disabled. |
description |
string |
An arbitrary string attached to the category. |
thumb |
string |
The URL where the category's thumbnail can be accessed. |
{
"name": "Appetizer",
"status": true
}
Status: 201 Created
{
"name": "Appetizer",
"permalink_slug": "appetizer",
"parent_id": null,
"locations": [],
"priority": null,
"status": true,
"description": "Sed consequat, sapien in scelerisque egestas",
"thumb": null
}
Retrieves a category.
Required abilities: categories:read
GET /api/categories/:category_id
No parameters.
Status: 200 OK
{
"name": "Appetizer",
"permalink_slug": "appetizer",
"parent_id": null,
"locations": [],
"priority": null,
"status": true,
"description": "Sed consequat, sapien in scelerisque egestas",
"thumb": null
}
Updates a category.
Required abilities: categories:write
PATCH /api/categories/:category_id
Key | Type | Description |
---|---|---|
name |
string |
Required. The category's name |
permalink_slug |
string |
The category's permalink slug. |
parent_id |
integer |
The Unique identifier of the parent category, if any. |
locations |
array |
The category's locations, if any. |
priority |
integer |
The category's priority. |
status |
boolean |
Has the value true if the category is enabled or the value false if the category is disabled. |
description |
string |
An arbitrary string attached to the category. |
thumb |
string |
The URL where the category's thumbnail can be accessed. |
{
"description": "Vivamus interdum erat ac aliquam porttitor. ",
"parent_id": 2
}
Status: 200 OK
{
"name": "Appetizer",
"permalink_slug": "appetizer",
"parent_id": null,
"locations": [],
"priority": null,
"status": true,
"description": "Sed consequat, sapien in scelerisque egestas",
"thumb": null
}
Permanently deletes a category. It cannot be undone.
Required abilities: categories:write
DELETE /api/categories/:category_id
No parameters.
Returns an object with a deleted parameter on success. If the category ID does not exist, this call returns an error.
Status: 200 OK
{
"id": 1,
"object": "category",
"deleted": true
}