Blog Categories
Get all categories and detail via store-api.
Category List
POST
https://your-site.com/store-api/blog-category
return all categories regarding your criteria.
Request Header
Name
Type
Description
Value
Accept*
string
Response type
application/json
Content-Type*
string
Request type
application/json
sw-access-key*
string
Headless Access Key
SWSCQ1V1QJHHSKV0TFLYZ0LSD1
Request Body - Example Criteria 1
{
"limit": 5,
"page": 1,
"filter": [
{ "type": "equals", "field": "active", "value": true }
],
"sort": [
{ "field": "name", "order": "ASC" }
],
"includes": {
"ongrano_blog_category": ["id", "name"]
}
}
Request Body - Example Criteria 2
{
"limit": 10,
"page": 1,
"sort": [
{ "field": "name", "order": "DESC" }
],
"includes": {
"ongrano_blog_category": ["id", "name"]
}
}
[
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"translated": {
"name": "test category 1",
"customFields": {},
"description": null,
"metaTitle": "test category 1",
"metaDescription": "test category 1",
"keywords": "test category 1"
},
"createdAt": "2024-05-08T08:44:46.879+00:00",
"updatedAt": null,
"mediaId": "018f3e3c45e676ad8a4bb9d3707cfc47",
"name": "test category 1",
"active": true,
"translations": null,
"media": null,
"metaTitle": "test category 1",
"metaDescription": "test category 1",
"keywords": "test category 1",
"id": "018f5760679b714fbae0632757b5d804",
"customFields": null,
"description": null,
"apiAlias": "ongrano_blog_category"
},
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"translated": {
"name": "test category 2",
"customFields": {},
"description": null,
"metaTitle": "test category 2",
"metaDescription": "test category 2",
"keywords": "test category 2"
},
"createdAt": "2024-05-03T11:34:50.161+00:00",
"updatedAt": "2024-05-08T08:44:56.459+00:00",
"mediaId": "018f3e3c45e676ad8a4bb9d3707cfc47",
"name": "test category 2",
"active": true,
"translations": null,
"media": null,
"metaTitle": "test category 2",
"metaDescription": "test category 2",
"keywords": "test category 2",
"id": "018f3e392d8373a6a02fe0a32c4c17c8",
"customFields": null,
"description": null,
"apiAlias": "ongrano_blog_category"
},
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"translated": {
"name": "test category 3",
"customFields": {},
"description": null,
"metaTitle": "test category 3",
"metaDescription": "test category 3",
"keywords": "test category 3"
},
"createdAt": "2024-05-08T08:45:04.880+00:00",
"updatedAt": "2024-05-08T08:45:17.193+00:00",
"mediaId": "018f3e3c45e676ad8a4bb9d3707cfc47",
"name": "test category 3",
"active": true,
"translations": null,
"media": null,
"metaTitle": "test category 3",
"metaDescription": "test category 3",
"keywords": "test category 3",
"id": "018f5760adea7353a5b2c0ec675704bc",
"customFields": null,
"description": null,
"apiAlias": "ongrano_blog_category"
}
]
Category Detail
POST
https://your-site.com/store-api/blog-category/{blogCategoryId}
return blog category regarding {blogCategoryId}
Request Header
Name
Type
Description
Value
Accept*
string
Response type
application/json
Content-Type*
string
Request type
application/json
sw-access-key*
string
Headless Access Key
SWSCQ1V1QJHHSKV0TFLYZ0LSD1
Request Body - Example Criteria
{
"associations": {
"media": {}
},
"includes": {
"media": [
"url"
]
}
}
[
{
"versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
"translated": {
"name": "test category 4",
"customFields": {},
"description": null,
"metaTitle": "test category 4",
"metaDescription": "test category 4",
"keywords": "test category 4"
},
"createdAt": "2024-05-08T08:45:20.932+00:00",
"updatedAt": "2024-05-08T08:45:31.255+00:00",
"mediaId": "018f3e3c45e676ad8a4bb9d3707cfc47",
"name": "test category 4",
"active": false,
"translations": null,
"media": {
"url": "http://127.0.0.1:8001/media/a7/34/8b/1714736088/plugin.png?1714736088",
"apiAlias": "media"
},
"metaTitle": "test category 4",
"metaDescription": "test category 4",
"keywords": "test category 4",
"id": "018f5760eca0726e878366b96fa244bb",
"customFields": null,
"description": null,
"apiAlias": "ongrano_blog_category"
}
]
Last updated