1

I'm using Magento 2.2 REST api to create and update product category. To change product category parent I use following url and request body and it works fine.

HTTP method: PUT
url: rest/V1/categories/153/move
request body : {"parent_id":337,"afterId":0}

But I want to change child category to parent category, then I tried to send following request body and it gives the following error.

HTTP method: PUT
url: rest/V1/categories/153/move
request body: {"parent_id":0"afterId":0}
error: "error :{"message":"Decoding error."}"

Please help to make the correct request for change child category to parent category.

Thanks

0

You have error in your request parameters It should be-

request body: {"parent_id":0, "afterId":0}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.