I am using Magento 2.0.11. I would like to use the RESTful API

(HTTP:// magento2URL/index.php/rest/V1/categories/(category ID)) 

to change the "Is Active" attribute of one category from True to False.

enter image description here

The JSON packet I am sending is as following:

{"category": {"id":399,"parentId": 2,"name": "PRIMADONA","isActive": false,"position": 0,"includeInMenu": false}

and I also tried:

{"category": {"id":399,"parentId": 2,"name": "PRIMADONA","is_active": false,"position": 0,"include_in_menu": false}

The magento backend responded http 200 OK but the is_active is not updated:

< HTTP/1.1 200 OK < * Closing connection #0 {"id":399,"parent_id":2,"name":"PRIMADONA","is_active":true,"position":0,"level":2,"children":"","updated_at":"2017-08-04 08:38:......................>

I also tried adding "all" into the RESTful URL:

(magento2URL/index.php/rest/all/V1/categories/<category ID>)

But none of the above methods are working for me.

Is there any workaround to update the "Is Active" attribute of one category?


Ok so i figured it out.
{ "category": { "is_active": false } }

Good Luck


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.