2

How do I get meta title, meta description and optional keywords from category via the REST API in Magento 2.2?

https://localhost/rest/V1/categories/123

https://localhost/rest/V1/categories/list?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=news&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

Above API calls Will get me the category just without the fields I need.

0

I've just tested it and

GET /V1/categories/:categoryId

works just fine. One note it will not display attribute if there are no values, it appears for me as soon as I added it in the admin panel

enter image description here

  • Aaahh.. It turned out that I pulled data from the wrong store. I got multiple stores in my Magento shop. Also I didn't know that if e.g. meta_title is empty it will not show up. – Cudos Aug 9 '18 at 14:05

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.