Search the Product Catalogue

Service URLs:

POST /products

Parameters:

brief – Boolean – If true the service should only return a list of product IDs and descriptions.

Request Body:

ISearchProductCatalogueRequest

description – String – Match on the product description

descriptionFuzzy – Boolean – If true the description should be a fuzzy match, otherwise it should be a simple ‘contains’ match – Defaults to true.

minPrice – Long – Match on products which have a price greater-than or equal to this value 

maxPrice – Long – Match on products which have a price less-than or equal to this value

colour – String – Match on products which have this colour

style – String – Match on products which have this style

size – String – Match on products which have this size

mmg – String – Match on products which are part of this mmg, or are in an mmg which is a decendent of this mmg

inStock – Boolean – If true, only match products which are in-stock. If false, return products which are in- or out-of-stock – Defaults to false

pageSize – Integer – The maximum number of matches to return on a single page – Defaults to 20, limited to 100

pageOffset – Integer – The offset of the first match to return – Defaults to 0

Response Body:

ISearchProductCatalogueResponse 

productList – A list of the matching products or matching product Ids

ISearchProductCatalogueBriefResponse (When the brief query param is true)

productList – A list of BriefProductDetail of the matching product Ids and descriptions.

Remarks:

Provides the ability to list products with a variety of selection criteria. The service should return ISearchProductCatalogueResponse, which contains a list of ProductDetails. When brief query parameter is set to true, the service should return a ISearchProductCatalogueBriefResponse  with a list of of the matching product Ids and descriptions. 

The pageSize and pageOffset fields can be used to control how many matches are returned. Note that the service will not support a pageSize greater than 100. Unless otherwise stated any request criterion that are not supplied should not restrict the returned results. For example, if minPrice is not supplied but maxPrice is, then all products with a price below or equal to the maxPrice should be returned.

Example Request

POST: http://localhost:8080/WebRestApi/rest/products
 
{
  "@entity" : "retail:searchProductCatalogueRequest",
  "excludePriceRange" : false,
  "includedProductTypes" : [ ],
  "orIdAndDescription" : false,
  "searchLocationId" : "0100"
}

Example Response


{
    "@entity": "retail:searchProductCatalogueResponse",
    "productIds": [],
    "productDetails": [
        {
            "@entity": "retail:productDetail",
            "description": "Button Down Collar Western Sh",
            "price": 2595,
            "productId": "DF517XM",
            "productImageURL": "image://PRODUCT/DF517XM-2.jpg"
        },
        {
            "@entity": "retail:productDetail",
            "description": "Button Down Collar Western Sh",
            "price": 2595,
            "productId": "DF517XM",
            "productImageURL": "image://PRODUCT/DF517XM-2.jpg"
        },       
    ]
}
Go to Top