Updating a category

PATCH {{api-url}}/category/{{tenant}}/categories/{{categoryId}}?publish=true

Partially updates a specified category. Version specified in the 'metadata' field must be correct to what is presented in database.


Required scopes

  • category.category_update* category.category_publishNote: category.category_publish only required if you want to publish the category when creating it.* category.category_unpublishNote: Only required if you want to unpublish the category when updating it.

Request Params

KeyDatatypeRequiredDescription
publishbooleanIf set to true category may be published when updated, otherwise may be unpublished. It must match value of 'published' field of the request body.
Possible values:
  • true
  • false Note: To publish a category you need to have category.category_publish scope. Note: To unpublish a category you need to have category.category_unpublish scope. |

Request Body

{"parentId"=>nil, "localizedSlug"=>{"de"=>"Getranke", "en"=>"Beverages"}, "position"=>1, "published"=>false, "metadata"=>{"version"=>1}}

HEADERS

KeyDatatypeRequiredDescription
X-Versionstring(Required) To use this endpoint you have to add X-Version header with proper value to your request.

Note: The header value has to match following regular expression: ^v[1-9][0-9]?$ | | Content-Type | string | | | | Accept | string | | | | Content-Language | string | | |