🔗Categories

Retrieve an overview list of all categories from your website

GET/api/public/site/categories
Authorization
Query parameters
Response

OK

Request
const response = await fetch('/api/public/site/categories', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Retrieve all data about an individual category

GET/api/public/site/categories/{id}
Authorization
Path parameters
id*string (id)

The ID of the category

Example: 1234
Response

OK

Request
const response = await fetch('/api/public/site/categories/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Update a category

PUT/api/public/site/categories/{id}
Authorization
Path parameters
id*string

The Category ID

Example: 1
Body

Your category custom fields as a JSON object

name*string
slugstring
enabled*string
weightingstring
meta_titlestring
meta_descstring
og_titlestring
og_descstring
og_imagestring
og_typestring
twitter_typestring
image_altstring
parentstring
Response

OK

Request
const response = await fetch('/api/public/site/categories/{id}', {
    method: 'PUT',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "enabled": "text"
    }),
});
const data = await response.json();

Create a category

POST/api/public/site/categories/create
Authorization
Body

Your categories custom fields as a JSON object

name*string
slugstring
enabled*string
weightingstring
meta_titlestring
meta_descstring
og_titlestring
og_descstring
og_imagestring
og_typestring
twitter_typestring
image_altstring
parentstring
Response

OK

Request
const response = await fetch('/api/public/site/categories/create', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "enabled": "text"
    }),
});
const data = await response.json();

Last updated