I'm using Magento 2 and try to consume my categories by calling the REST API via /categories. How can I achieve it, to get the categories by an given store view code?

Do I have to extend the api by my own? I would expect, that this is an default requirement, but I haven't found any method, which would do this for me out of the box.

Or are there any search criterias for that?

  • Please specify magento version
    – Amit Bera
    Commented May 9, 2016 at 10:39
  • @AmitBera does the behavior version depedent? will the accepted answer work for Magento2.3?
    – Anto S
    Commented Jun 25, 2019 at 10:43
  • API point does not version depend, But it related php interface/class might be change on version change for backward compatibility .
    – Amit Bera
    Commented Jun 25, 2019 at 10:49

1 Answer 1


The answer is quite simple:

http://localhost/rest/{store code}/V1/categories

Just replace the {store code} with yours.

For example English would be:


  • work perfect :)
    – jruzafa
    Commented Apr 12, 2018 at 14:31
  • @benjamin How can this be achieved on a custom API ./rest/en/V1/vendor/module/id/2 ? I cannot read store store code only if I add a parameter like this: /rest/en/V1/vendor/module/id/2?storeCode=en Commented Jun 9, 2020 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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