Categories

Creating an category

Endpoint

POST /v1/categories

Parameters

Name Description
name required Name
euid required External UID (must be unique)
slug Slug, url part of the category
technical_slug Technical slug, useful in templating
images Array of images
parent_id Parent ID
seo_title SEO title
seo_description SEO description
seo_keywords SEO keywords

Request

curl "https://capi.storyblok.com/v1/categories" -d '{"name":"Category","euid":"test44476"}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=582175b55e85ecaf845e4ad06082efe4" \

Response

{
  "id": 29816,
  "name": "Category",
  "slug": "test44476",
  "technical_slug": null,
  "images": [

  ],
  "parent_id": null,
  "euid": "test44476",
  "seo_title": "",
  "seo_description": "",
  "seo_keywords": "",
  "start_date": null,
  "end_date": null,
  "excerpt": "",
  "description": ""
}

Deleting a category

Endpoint

DELETE /v1/categories/:id

Request

curl "https://capi.storyblok.com/v1/categories/29821" -d '' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=48226b8a1f1b534316b8178ec2741505" \

Get categories

Endpoint

GET /v1/categories

Parameters

Name Description
page Current page of category
slug Slug of category
parent_id Parent id
as_tree Get as tree
term Searches in name and excerpt fields
only_active Filter categories that are within start_date and end_date
locale Locale

Request

Query Parameters

only_active=1
page=1
locale=de
curl "https://capi.storyblok.com/v1/categories?only_active=1&page=1&locale=de" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=4762397f708cf808697a123a48d8eae6" \

Response

[
  {
    "id": 29804,
    "name": "Tshirts",
    "slug": "tshirts",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 0,
    "euid": "tshirts",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  },
  {
    "id": 29805,
    "name": "test21145",
    "slug": "test16907",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 0,
    "euid": "test16907",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  },
  {
    "id": 29806,
    "name": "TRANSLATED",
    "slug": "test15151",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 29805,
    "euid": "test15151",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  }
]
Liquid error: internal

Get categories

Endpoint

GET /v1/categories

Parameters

Name Description
page Current page of category
slug Slug of category
parent_id Parent id
as_tree Get as tree
term Searches in name and excerpt fields
only_active Filter categories that are within start_date and end_date
locale Locale

Request

Query Parameters

only_active=1
page=1
locale=de
curl "https://capi.storyblok.com/v1/categories?only_active=1&page=1&locale=de" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=4762397f708cf808697a123a48d8eae6" \

Response

[
  {
    "id": 29804,
    "name": "Tshirts",
    "slug": "tshirts",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 0,
    "euid": "tshirts",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  },
  {
    "id": 29805,
    "name": "test21145",
    "slug": "test16907",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 0,
    "euid": "test16907",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  },
  {
    "id": 29806,
    "name": "TRANSLATED",
    "slug": "test15151",
    "technical_slug": "",
    "images": [

    ],
    "parent_id": 29805,
    "euid": "test15151",
    "seo_title": "",
    "seo_description": "",
    "seo_keywords": "",
    "start_date": null,
    "end_date": null,
    "excerpt": "",
    "description": ""
  }
]