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_publishonly 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
| Key | Datatype | Required | Description |
|---|---|---|---|
publish | boolean | If 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: |
truefalseNote: To publish a category you need to havecategory.category_publishscope. Note: To unpublish a category you need to havecategory.category_unpublishscope. |
Request Body
{"parentId"=>nil, "localizedSlug"=>{"de"=>"Getranke", "en"=>"Beverages"}, "position"=>1, "published"=>false, "metadata"=>{"version"=>1}}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
X-Version | string | (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 | | |