Creates new category
Security
shoptetAccessToken or shoptetPrivateApiToken
- Mock serverhttps://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/categories
- https://api.myshoptet.comhttps://api.myshoptet.com/api/categories
curl -i -X POST \
https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/categories \
-H 'Content-Type: application/json' \
-H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
-d '{
"data": {
"guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"name": "Watches",
"parentGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"description": "<p>Top category description</p>",
"secondDescription": "<p>Bottom category description</p>",
"imageName": "watches-category-image.jpg",
"sourceImageName": "image.png",
"sortBefore": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"sortAfter": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"indexName": "watches",
"menuTitle": "Watches",
"title": "Watches",
"metaTagDescription": "Watches, Apple watch, black, white, garmin",
"visible": true,
"customerVisibility": "all",
"productOrdering": "alphabetically",
"similarProductsCategory": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
"relatedProductsCategory": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed"
}
}'Response
{ "data": { "guid": "0198418d-acde-708e-9389-0c5113d9b5f3", "name": "Category name", "image": "https://beta.shoptet.cz/user/categories/thumb/supreme-plush-santa-hat.jpg", "description": "<p>Horní popis kategorie</p>", "secondDescription": "<p>Dolní popis kategorie</p>", "indexName": "sport-a-relax", "url": "https://beta.shoptet.cz/sport-a-relax", "parentGuid": "0198566d-2eeb-73ed-8dc4-0c94b5a7e035", "priority": 1, "menuTitle": "Watches", "title": "Purple M size T-shirts - cotton", "metaTagDescription": "T-shirts, cotton, M size, purple, pink, wine red", "visible": true, "similarProductsCategory": "07f7a4c1-d7b1-11e0-9a5c-feab5ed617ed", "relatedProductsCategory": "07f7a4c1-d7b1-11e0-9a5c-feab5ed617ed", "customerVisibility": "all", "productOrdering": "alphabetically", "catalogueMapping": [ … ] }, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }