Skip to content

Product category update

Request

Updates existing category.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
categoryGuidstringrequired

Category's guid

Example:bffa3b98-d968-11e0-b04f-57a43310b728
Query
suppressRedirectboolean

When indexName changes, a redirect from the old category URL to the new one is created. Set to true to suppress creating the redirect.

Default:false
Example:suppressRedirect=true
Headers
Content-Typestringrequired
Default:"application/json"
Bodyapplication/json
dataobject, non-empty(categoryUpdate)required
curl -i -X PATCH \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/categories/bffa3b98-d968-11e0-b04f-57a43310b728?suppressRedirect=true' \
  -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"
    }
  }'

Responses

OK

Bodyapplication/json
dataobject(category)required
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
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" } }