# Categories Managing categories in the e-shop. ## List of product categories - [GET /api/categories](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getlistofproductcategories.md): Returns the list of product categories. ## Product category create - [POST /api/categories](https://api.docs.shoptet.com/shoptet-api/openapi/categories/createproductcategory.md): Creates new category ## Product category detail - [GET /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getproductcategorydetail.md): Returns category info ## Product category update - [PATCH /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductcategory.md): Updates existing category. ## Product category deletion - [DELETE /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/deleteproductcategory.md): Deletes product category as per entered . 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. Optional parameter allows deleting categories used by products. The products are marked as changed. Optional parameter allows deleting categories with child categories. The children are deleted too. ## Product category BATCH update - [PATCH /api/categories/batch](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductcategorybatch.md): This endpoint allows you to update multiple categories at once. Batch update is processed asynchronously in same way as for example products snapshot, but it does not have with categories to download in response. Instead, you can check attribute which contains successfully updated categories and errors. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. File with data for update must be in JSONL (jsonlines) format. Each line must contain one category in JSON format. Maximum size of file is 100MB. Structure of JSON row is same as structure of JSON for single category update above. You can add one extra optional attribute "language" which defines language of updating category, so you are able to update multiple language attributes (i.e. "name", "description" etc.) of one category in one batch file. If language is not defined, default language of shop is used. Asynchronous job process jsonl file row by row and try to validate and save data. If there is any error, row is skipped and error is logged, but it does not stop processing of other rows. In Log, every product is identified by its position in file (starting from 1). ## List of products order in category - [GET /api/categories/{categoryGuid}/productsPriority](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getlistofproductsorderincategory.md): Retrieves products and their priorities within a category. ## Update product order in category - [PATCH /api/categories/{categoryGuid}/productsPriority](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductorderincategory.md): Using this endpoint you can update product priority within a category. You can request multiple updates at once; the maximum is 300 updates per request. In case of a partial failure, the response code will be and the errorneous items will be listed in the array. In case of a complete failure, response code will be . Minimum priority is 0, maximum priority is 65535.