cancel
Showing results for 
Search instead for 
Did you mean: 

HOw to get products of a category using OCC v2?

Former Member
0 Kudos

Hi,

I have created a basesite with product catalog and content catalog, I have added three categories and three products in each categories. But I am not able to get any output when I use the URI to get all products for a category https://localhost:9002/rest/v2/base_site/products/search is failing and gives totalcount and totalpages as '0' in JSON result

whereas I am able to get the products for the existing stores like apparel-uk and electronics.

Please help me on this.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajeen,

The URI which you're hitting is for searching products from solr , it will not fetch any products for categories. As you've not indexed your products you're not able to fetch any results when you hit it. As the OOTB products have been indexed , you're able to search them.

Thanks, Sandeep

Answers (1)

Answers (1)

0 Kudos

Hi, URL for fetching the products which of specific category

http://localhost:9001/rest/v2/{baseSiteId}/catalogs/{catalogName}/{catalogVersion}}/categories/{categoryCode}

FYI

https://wiki.hybris.com/display/release5/Migrating+to+OCC+v2

Regards, Chaitanya