Skip to content

Product category deletion

Request

Deletes product category as per entered categoryGuid. If successful, returns the code 200.

If the category does not exist within the e-shop, a 404 code is returned.

If the category cannot be deleted, because it is used by some product or has children, a 409 code is returned.

If the category tree is being changed by another process at the same time (e.g. a running import), a 423 code is returned. Retry later.

Optional parameter deleteUsed allows deleting categories used by products. The products are marked as changed.

Optional parameter deleteChildren allows deleting categories with child categories. The children are deleted too.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
categoryGuidstringrequired

Category guid

Example:5c499200-70ac-11e9-9208-08002774f818
Query
deleteUsedboolean

Allows deleting categories used by products if set to true

Example:deleteUsed=true
deleteChildrenboolean

Allows deleting categories with children if set to true

Example:deleteChildren=true
Headers
Content-Typestringrequired
Default:"application/json"
curl -i -X DELETE \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/categories/5c499200-70ac-11e9-9208-08002774f818?deleteUsed=true&deleteChildren=true' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
dataobject or nullrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": {}, "errors": [ { … } ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }