Search the Product Catalogue (Solr)

Spec: Product Catalog Search Specification

Service URLs:

GET /products?q=<solr_query>

Parameters:

q – String – the Solr query to execute

Response Body:

SearchProductCatalogueResponse

productDetails – List<IProductDetail> – todo

facetFieldCounts – List<IFacetFieldCount> – todo

count – Long – the number of results found

Remarks:

Provides the ability to list products by passing in a Solr query as a parameter. The service responds with a SearchProductCatalogueResponse which includes, which contains a list of ProductDetails, facet field counts and the count of results found.

Example Request

http://localhost:39833/WebRestApi/rest/products/?q=categoryId:retail_m_shirts&rows=20

Example Response Collapse source

{
   "productDetails":[
      {
         "size":"S",
         "colour":"RED",
         "sizeDescription":"S",
         "colourDescription":"Red",
         "description":"Button Down Collar Red",
         "price":2595,
         "productId":"DF517XM-1",
         "productImageURL":"image://PRODUCT/DF517XM-2.jpg"
      },
      {
         "size":"L",
         "colour":"RED",
         "sizeDescription":"L",
         "colourDescription":"Red",
         "description":"Button Down Collar Red",
         "price":2595,
         "productId":"DF517XM-3",
         "productImageURL":"image://PRODUCT/DF517XM-2.jpg"
      },
      {
         "description":"Button Down Western Shirt",
         "price":2595,
         "productId":"DF517XM",
         "productImageURL":"image://PRODUCT/DF517XM-2.jpg"
      },
      {
         "size":"M",
         "colour":"RED",
         "sizeDescription":"M",
         "colourDescription":"Red",
         "description":"Button Down Collar Red",
         "price":2595,
         "productId":"DF517XM-2",
         "productImageURL":"image://PRODUCT/DF517XM-2.jpg"
      },
      {
         "size":"XL",
         "colour":"RED",
         "sizeDescription":"XL",
         "colourDescription":"Red",
         "description":"Button Down Collar Red",
         "price":2595,
         "productId":"DF517XM-4",
         "productImageURL":"image://PRODUCT/DF517XM-2.jpg"
      },
      {
         "description":"Ben Sherman Short Oxford",
         "price":3742,
         "productId":"ID816BN",
         "productImageURL":"image://PRODUCT/ID816BN-1.jpg"
      },
      {
         "size":"S",
         "colour":"BLACK",
         "sizeDescription":"S",
         "colourDescription":"Black",
         "description":"Ben Sherman Short Oxford",
         "price":3742,
         "productId":"ID816BN-1",
         "productImageURL":"image://PRODUCT/ID816BN-3.jpg"
      },
      {
         "size":"M",
         "colour":"BLACK",
         "sizeDescription":"M",
         "colourDescription":"Black",
         "description":"Ben Sherman Short Oxford",
         "price":3742,
         "productId":"ID816BN-2",
         "productImageURL":"image://PRODUCT/ID816BN-3.jpg"
      },
      {
         "size":"S",
         "colour":"WHITE",
         "sizeDescription":"S",
         "colourDescription":"WHITE",
         "description":"Ben Sherman Short Oxford",
         "price":3742,
         "productId":"IDB81WH-1",
         "productImageURL":"image://PRODUCT/ID816BN-3.jpg"
      },
      {
         "size":"XL",
         "colour":"WHITE",
         "sizeDescription":"XL",
         "colourDescription":"WHITE",
         "description":"Ben Sherman Short Oxford",
         "price":3742,
         "productId":"IDB81WH-2",
         "productImageURL":"image://PRODUCT/ID816BN-3.jpg"
      }
   ],
   "count":10
}
Go to Top