Updating a category
PUT {{api-url}}/category/{{tenant}}/categories/{{categoryId}}?publish=true
Fully updates a specified category by replacing existing information. Version specified in the 'metadata' field must be correct to what is presented in database.
Required scopes
category.category_update
*category.category_publish
Note:category.category_publish
only required if you want to publish the category when updating it.*category.category_unpublish
Note: 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: |
true
false
Note: To publish a category you need to havecategory.category_publish
scope. Note: To unpublish a category you need to havecategory.category_unpublish
scope. |
Request Body
{"parentId"=>nil, "localizedName"=>{"en"=>"Floor Care", "de"=>"Bodenpflege"}, "localizedDescription"=>{"en"=>"Floor Care", "de"=>"Bodenpflege"}, "localizedSlug"=>{"en"=>"FloorCare", "de"=>"Bodenpflege"}, "code"=>"Bodenpflege", "ecn"=>["AX6784", "123078", "SJUIOKM"], "validity"=>{"from"=>"2022-01-05T12:44:51.871Z", "to"=>"2029-12-05T23:59:59.000Z"}, "position"=>5, "published"=>true, "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 | | |