ProductSearch resource (Shop API 23.2)

Summary

Http Method Resource Description
GET /product_search

Provides keyword and refinement search functionality for products. Only returns the product id, link and name in the product search hit. Other search hit properties can be added by using the expand parameter. The search result contains only products that are online and assigned to site catalog.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

GET /product_search/availability

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and availability information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

GET /product_search/images

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and image information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

GET /product_search/prices

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and price information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

GET /product_search/represented_products

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and represented product information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

GET /product_search/variations

Provides keyword and refinement search functionality for products. Only returns the product id, name and variation information in the product search hit.

This resource does not return detailed information about variation products. Use the products resource to retrieve more details about a variation product.

Search Products

Provides keyword and refinement search functionality for products. Only returns the product id, link and name in the product search hit. Other search hit properties can be added by using the expand parameter. The search result contains only products that are online and assigned to site catalog.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&expand={String}&currency={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
currency String The currency mnemonic specified for price. This parameter is effective only if specified expand parameter value contains prices.  
expand String The expand parameter. A comma separated list with the allowed values (availability, images, prices, represented_products, variations)  
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • htype: Allow to refine by including only the provided hit types. Accepted types are 'product', 'master', 'set', 'bundle', 'slicing_group' (deprecated), 'variation_group'.
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidExpandParameterException

param (String)

Thrown in case a specified expand parameter value is unknown.
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5&expand=prices HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "23.2",
  "count": 4,
  "hits": [
    {
      "link": "http://example.com/dw/shop/v23_2/products/25772717",
      "price": 99.00,
      "price_per_unit": 99.00,
      "product_id": "25772717",
      "product_name": "Zerrick",
      "product_type": {
        "master": true
      },
      "unit_measure" : "each",
      "unit_quantity" : 1
    },
    {
      "link": "http://example.com/dw/shop/v23_2/products/25791388",
      "price": 99.00,
      "price_per_unit": 99.00,
      "product_id": "25791388",
      "product_name": "Zacco",
      "product_type": {
        "master": true
      },
      "unit_measure" : "each",
      "unit_quantity" : 1
    },
    {
      "link": "http://example.com/dw/shop/v23_2/products/25772792",
      "price": 79.00,
      "price_per_unit": 79.00,
      "product_id": "25772792",
      "product_name": "Aylin",
      "product_type": {
        "master": true
      },
      "unit_measure" : "each",
      "unit_quantity" : 1
    },
    {
      "link": "http://example.com/dw/shop/v23_2/products/25772707",
      "price": 89.00,
      "price_per_unit": 89.00,
      "product_id": "25772707",
      "product_name": "Bozwell",
      "product_type": {
        "master": true
      },
      "unit_measure" : "each",
      "unit_quantity" : 1
    }
  ],
  "query": "shoes",
  "refinements": [
    {
      "attribute_id": "cgid",
      "label": "Category",
      "values": [
        {
          "hit_count": 1,
          "label": "New Arrivals",
          "value": "newarrivals"
        },
        {
          "hit_count": 4,
          "label": "Womens",
          "value": "womens",
          "values": [
            {
              "hit_count": 4,
              "label": "Accessories",
              "value": "womens-accessories",
              "values": [
                {
                  "hit_count": 4,
                  "label": "Shoes",
                  "value": "womens-accessories-shoes"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "attribute_id": "c_refinementColor",
      "label": "Color",
      "values": [
        {
          "hit_count": 1,
          "label": "Beige",
          "presentation_id": "beige",
          "value": "Beige"
        },
        {
          "hit_count": 4,
          "label": "Black",
          "presentation_id": "black",
          "value": "Black"
        },
        {
          "hit_count": 0,
          "label": "Blue",
          "presentation_id": "blue",
          "value": "Blue"
        },
        {
          "hit_count": 0,
          "label": "Navy",
          "presentation_id": "navy",
          "value": "Navy"
        },
        {
          "hit_count": 1,
          "label": "Brown",
          "presentation_id": "brown",
          "value": "Brown"
        },
        {
          "hit_count": 0,
          "label": "Green",
          "presentation_id": "green",
          "value": "Green"
        },
        {
          "hit_count": 1,
          "label": "Grey",
          "presentation_id": "grey",
          "value": "Grey"
        },
        {
          "hit_count": 0,
          "label": "Orange",
          "presentation_id": "orange",
          "value": "Orange"
        },
        {
          "hit_count": 1,
          "label": "Pink",
          "presentation_id": "pink",
          "value": "Pink"
        },
        {
          "hit_count": 0,
          "label": "Purple",
          "presentation_id": "purple",
          "value": "Purple"
        },
        {
          "hit_count": 0,
          "label": "Red",
          "presentation_id": "red",
          "value": "Red"
        },
        {
          "hit_count": 1,
          "label": "White",
          "presentation_id": "white",
          "value": "White"
        },
        {
          "hit_count": 0,
          "label": "Yellow",
          "presentation_id": "yellow",
          "value": "Yellow"
        },
        {
          "hit_count": 0,
          "label": "Miscellaneous",
          "presentation_id": "miscellaneous",
          "value": "Miscellaneous"
        }
      ]
    },
    {
      "attribute_id": "c_isNew",
      "label": "New Arrival"
    },
    {
      "attribute_id": "c_size",
      "label": "Size",
      "values": [
        {
          "hit_count": 0,
          "label": "OS",
          "value": "OS"
        },
        {
          "hit_count": 4,
          "label": "6",
          "value": "6"
        },
        {
          "hit_count": 4,
          "label": "6.5",
          "value": "6.5"
        },
        {
          "hit_count": 4,
          "label": "7",
          "value": "7"
        },
        {
          "hit_count": 4,
          "label": "7.5",
          "value": "7.5"
        },
        {
          "hit_count": 4,
          "label": "8",
          "value": "8"
        },
        {
          "hit_count": 3,
          "label": "8.5",
          "value": "8.5"
        },
        {
          "hit_count": 3,
          "label": "9",
          "value": "9"
        },
        {
          "hit_count": 4,
          "label": "9.5",
          "value": "9.5"
        },
        {
          "hit_count": 3,
          "label": "10",
          "value": "10"
        },
        {
          "hit_count": 1,
          "label": "11",
          "value": "11"
        }
      ]
    },
    {
      "attribute_id": "price",
      "label": "Price",
      "values": [
        {
          "hit_count": 4,
          "label": "$50 - $17.89",
          "value": "(50..100)"
        }
      ]
    }
  ],
  "search_phrase_suggestions": {
    "suggested_phrases": [
      {
        "exact_match": true,
        "phrase": "shoes"
      }
    ],
    "suggested_terms": [
      {
        "original_term": "shoes",
        "terms": [
          {
            "completed": false,
            "corrected": false,
            "exact_match": true,
            "value": "shoes"
          }
        ]
      }
    ]
  },
  "selected_refinements": {
    "cgid": "womens",
    "c_refinementColor": "Black",
    "price": "(0..500)"
  },
  "selected_sorting_option": "top-sellers",
  "sorting_options": [
    {
      "id": "best-matches",
      "label": "Best Matches"
    },
    {
      "id": "price-low-to-high",
      "label": "Price Low To High"
    },
    {
      "id": "price-high-to-low",
      "label": "Price High to Low"
    },
    {
      "id": "product-name-ascending",
      "label": "Product Name A - Z"
    },
    {
      "id": "product-name-descending",
      "label": "Product Name Z - A"
    },
    {
      "id": "brand",
      "label": "Brand"
    },
    {
      "id": "most-popular",
      "label": "Most Popular"
    },
    {
      "id": "top-sellers",
      "label": "Top Sellers"
    }
  ],
  "start": 0,
  "total": 4
}

Search Products - Availability

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and availability information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search/availability?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search/availability?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5 HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60,must-revalidate
Content-Length: 2426

{
  "_v" : "23.2",
  "_type":"product_search_result",
  "count" : 4,
  "hits" : [ {
    "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true",
    "product_id" : "25791388",
    "product_name" : "Zacco",
    "orderable" : true
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772717?pretty_print=true",
    "product_id" : "25772717",
    "product_name" : "Zerrick",
    "orderable" : true
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772792?pretty_print=true",
    "product_id" : "25772792",
    "product_name" : "Aylin",
    "orderable" : true
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772707?pretty_print=true",
    "product_id" : "25772707",
    "product_name" : "Bozwell",
    "orderable" : true
  } ],
  "query" : "shoes",
  "refinements" : [ {
    "attribute_id" : "cgid",
    "label" : "Category",
    "values" : [ {
      "hit_count" : 0,
      "label" : "Mens",
      "value" : "mens"
    }, {
      "hit_count" : 0,
      "label" : "Electronics",
      "value" : "electronics"
    }, {
      "hit_count" : 0,
      "label" : "Gift Certificates",
      "value" : "gift-certificates"
    }, {
      "hit_count" : 0,
      "label" : "Sale",
      "value" : "top-seller"
    }, {
      "hit_count" : 1,
      "label" : "New Arrivals",
      "value" : "newarrivals"
    }, {
      "hit_count" : 4,
      "label" : "Womens",
      "value" : "womens",
      "values" : [ {
        "hit_count" : 0,
        "label" : "Jewelry",
        "value" : "womens-jewelry"
      }, {
        "hit_count" : 4,
        "label" : "Accessories",
        "value" : "womens-accessories",
        "values" : [ {
          "hit_count" : 0,
          "label" : "Scarves",
          "value" : "womens-accessories-scarves"
        }, {
          "hit_count" : 4,
          "label" : "Shoes",
          "value" : "womens-accessories-shoes",
          "values" : [ ]
        } ]
      }, {
        "hit_count" : 0,
        "label" : "Clothing",
        "value" : "womens-clothing"
      } ]
    } ]
  }, {
    "attribute_id" : "c_refinementColor",
    "label" : "Color",
    "values" : [ {
      "hit_count" : 1,
      "label" : "Beige",
      "presentation_id" : "beige",
      "value" : "Beige"
    }, {
      "hit_count" : 4,
      "label" : "Black",
      "presentation_id" : "black",
      "value" : "Black"
    }, {
      "hit_count" : 0,
      "label" : "Blue",
      "presentation_id" : "blue",
      "value" : "Blue"
    }, {
      "hit_count" : 0,
      "label" : "Navy",
      "presentation_id" : "navy",
      "value" : "Navy"
    }, {
      "hit_count" : 1,
      "label" : "Brown",
      "presentation_id" : "brown",
      "value" : "Brown"
    }, {
      "hit_count" : 0,
      "label" : "Green",
      "presentation_id" : "green",
      "value" : "Green"
    }, {
      "hit_count" : 1,
      "label" : "Grey",
      "presentation_id" : "grey",
      "value" : "Grey"
    }, {
      "hit_count" : 0,
      "label" : "Orange",
      "presentation_id" : "orange",
      "value" : "Orange"
    }, {
      "hit_count" : 1,
      "label" : "Pink",
      "presentation_id" : "pink",
      "value" : "Pink"
    }, {
      "hit_count" : 0,
      "label" : "Purple",
      "presentation_id" : "purple",
      "value" : "Purple"
    }, {
      "hit_count" : 0,
      "label" : "Red",
      "presentation_id" : "red",
      "value" : "Red"
    }, {
      "hit_count" : 1,
      "label" : "White",
      "presentation_id" : "white",
      "value" : "White"
    }, {
      "hit_count" : 0,
      "label" : "Yellow",
      "presentation_id" : "yellow",
      "value" : "Yellow"
    }, {
      "hit_count" : 0,
      "label" : "Miscellaneous",
      "presentation_id" : "miscellaneous",
      "value" : "Miscellaneous"
    } ]
  }, {
    "attribute_id" : "c_isNew",
    "label" : "New Arrival",
    "values" : [ ]
  }, {
    "attribute_id" : "c_size",
    "label" : "Size",
    "values" : [ {
      "hit_count" : 0,
      "label" : "OS",
      "value" : "OS"
    }, {
      "hit_count" : 4,
      "label" : "6",
      "value" : "6"
    }, {
      "hit_count" : 4,
      "label" : "6.5",
      "value" : "6.5"
    }, {
      "hit_count" : 4,
      "label" : "7",
      "value" : "7"
    }, {
      "hit_count" : 4,
      "label" : "7.5",
      "value" : "7.5"
    }, {
      "hit_count" : 4,
      "label" : "8",
      "value" : "8"
    }, {
      "hit_count" : 3,
      "label" : "8.5",
      "value" : "8.5"
    }, {
      "hit_count" : 3,
      "label" : "9",
      "value" : "9"
    }, {
      "hit_count" : 4,
      "label" : "9.5",
      "value" : "9.5"
    }, {
      "hit_count" : 3,
      "label" : "10",
      "value" : "10"
    }, {
      "hit_count" : 1,
      "label" : "11",
      "value" : "11"
    } ]
  }, {
    "attribute_id" : "price",
    "label" : "Price",
    "values" : [ {
      "hit_count" : 4,
      "label" : "$50 - $14.69",
      "value" : "(50..100)"
    } ]
  } ],
  "selected_refinements" : {
    "price" : "(0..500)",
    "c_refinementColor" : "Black",
    "cgid" : "womens"
  },
  "selected_sorting_option" : "top-sellers",
  "sorting_options" : [ {
    "id" : "best-matches",
    "label" : "Best Matches"
  }, {
    "id" : "price-low-to-high",
    "label" : "Price Low To High"
  }, {
    "id" : "price-high-to-low",
    "label" : "Price High To Low"
  }, {
    "id" : "product-name-ascending",
    "label" : "Product Name A - Z"
  }, {
    "id" : "product-name-descending",
    "label" : "Product Name Z - A"
  }, {
    "id" : "brand",
    "label" : "Brand"
  }, {
    "id" : "most-popular",
    "label" : "Most Popular"
  }, {
    "id" : "top-sellers",
    "label" : "Top Sellers"
  } ],
  "start" : 0,
  "total" : 4
}

Search Products - Images

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and image information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search/images?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search/images?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5 HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=60,must-revalidate
Content-Length: 2426
{
  "_v" : "23.2",
  "_type":"product_search_result",
  "count" : 4,
  "hits" : [ {
    "image" : {
      "alt" : "Zacco, , black",
      "link" : "http://example.com/on/demandware.static/Sites-SiteGenesis-Site/Sites-apparel-catalog/default/v19_5659726735/images/black/Zacco.jpg",
      "title" : "Zacco, "
    },
    "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true",
    "product_id" : "25791388",
    "product_name" : "Zacco"
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772717?pretty_print=true",
    "product_id" : "25772717",
    "product_name" : "Zerrick"
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772792?pretty_print=true",
    "product_id" : "25772792",
    "product_name" : "Aylin"
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772707?pretty_print=true",
    "product_id" : "25772707",
    "product_name" : "Bozwell"
  } ],
  "query" : "shoes",
  "refinements" : [ {
    "attribute_id" : "cgid",
    "label" : "Category",
    "values" : [ {
      "hit_count" : 0,
      "label" : "Mens",
      "value" : "mens"
    }, {
      "hit_count" : 0,
      "label" : "Electronics",
      "value" : "electronics"
    }, {
      "hit_count" : 0,
      "label" : "Gift Certificates",
      "value" : "gift-certificates"
    }, {
      "hit_count" : 0,
      "label" : "Sale",
      "value" : "top-seller"
    }, {
      "hit_count" : 1,
      "label" : "New Arrivals",
      "value" : "newarrivals"
    }, {
      "hit_count" : 4,
      "label" : "Womens",
      "value" : "womens",
      "values" : [ {
        "hit_count" : 0,
        "label" : "Jewelry",
        "value" : "womens-jewelry"
      }, {
        "hit_count" : 4,
        "label" : "Accessories",
        "value" : "womens-accessories",
        "values" : [ {
          "hit_count" : 0,
          "label" : "Scarves",
          "value" : "womens-accessories-scarves"
        }, {
          "hit_count" : 4,
          "label" : "Shoes",
          "value" : "womens-accessories-shoes",
          "values" : [ ]
        } ]
      }, {
        "hit_count" : 0,
        "label" : "Clothing",
        "value" : "womens-clothing"
      } ]
    } ]
  }, {
    "attribute_id" : "c_refinementColor",
    "label" : "Color",
    "values" : [ {
      "hit_count" : 1,
      "label" : "Beige",
      "presentation_id" : "beige",
      "value" : "Beige"
    }, {
      "hit_count" : 4,
      "label" : "Black",
      "presentation_id" : "black",
      "value" : "Black"
    }, {
      "hit_count" : 0,
      "label" : "Blue",
      "presentation_id" : "blue",
      "value" : "Blue"
    }, {
      "hit_count" : 0,
      "label" : "Navy",
      "presentation_id" : "navy",
      "value" : "Navy"
    }, {
      "hit_count" : 1,
      "label" : "Brown",
      "presentation_id" : "brown",
      "value" : "Brown"
    }, {
      "hit_count" : 0,
      "label" : "Green",
      "presentation_id" : "green",
      "value" : "Green"
    }, {
      "hit_count" : 1,
      "label" : "Grey",
      "presentation_id" : "grey",
      "value" : "Grey"
    }, {
      "hit_count" : 0,
      "label" : "Orange",
      "presentation_id" : "orange",
      "value" : "Orange"
    }, {
      "hit_count" : 1,
      "label" : "Pink",
      "presentation_id" : "pink",
      "value" : "Pink"
    }, {
      "hit_count" : 0,
      "label" : "Purple",
      "presentation_id" : "purple",
      "value" : "Purple"
    }, {
      "hit_count" : 0,
      "label" : "Red",
      "presentation_id" : "red",
      "value" : "Red"
    }, {
      "hit_count" : 1,
      "label" : "White",
      "presentation_id" : "white",
      "value" : "White"
    }, {
      "hit_count" : 0,
      "label" : "Yellow",
      "presentation_id" : "yellow",
      "value" : "Yellow"
    }, {
      "hit_count" : 0,
      "label" : "Miscellaneous",
      "presentation_id" : "miscellaneous",
      "value" : "Miscellaneous"
    } ]
  }, {
    "attribute_id" : "c_isNew",
    "label" : "New Arrival",
    "values" : [ ]
  }, {
    "attribute_id" : "c_size",
    "label" : "Size",
    "values" : [ {
      "hit_count" : 0,
      "label" : "OS",
      "value" : "OS"
    }, {
      "hit_count" : 4,
      "label" : "6",
      "value" : "6"
    }, {
      "hit_count" : 4,
      "label" : "6.5",
      "value" : "6.5"
    }, {
      "hit_count" : 4,
      "label" : "7",
      "value" : "7"
    }, {
      "hit_count" : 4,
      "label" : "7.5",
      "value" : "7.5"
    }, {
      "hit_count" : 4,
      "label" : "8",
      "value" : "8"
    }, {
      "hit_count" : 3,
      "label" : "8.5",
      "value" : "8.5"
    }, {
      "hit_count" : 3,
      "label" : "9",
      "value" : "9"
    }, {
      "hit_count" : 4,
      "label" : "9.5",
      "value" : "9.5"
    }, {
      "hit_count" : 3,
      "label" : "10",
      "value" : "10"
    }, {
      "hit_count" : 1,
      "label" : "11",
      "value" : "11"
    } ]
  }, {
    "attribute_id" : "price",
    "label" : "Price",
    "values" : [ {
      "hit_count" : 4,
      "label" : "$50 - $14.69",
      "value" : "(50..100)"
    } ]
  } ],
  "selected_refinements" : {
    "price" : "(0..500)",
    "c_refinementColor" : "Black",
    "cgid" : "womens"
  },
  "selected_sorting_option" : "top-sellers",
  "sorting_options" : [ {
    "id" : "best-matches",
    "label" : "Best Matches"
  }, {
    "id" : "price-low-to-high",
    "label" : "Price Low To High"
  }, {
    "id" : "price-high-to-low",
    "label" : "Price High To Low"
  }, {
    "id" : "product-name-ascending",
    "label" : "Product Name A - Z"
  }, {
    "id" : "product-name-descending",
    "label" : "Product Name Z - A"
  }, {
    "id" : "brand",
    "label" : "Brand"
  }, {
    "id" : "most-popular",
    "label" : "Most Popular"
  }, {
    "id" : "top-sellers",
    "label" : "Top Sellers"
  } ],
  "start" : 0,
  "total" : 4
}

Search Products - Prices

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and price information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search/prices?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&currency={String}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
currency String The currency mnemonic specified for price.  
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search/prices?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5 HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=300,must-revalidate
Content-Length: 2516

{
  "_v" : "23.2",
  "_type":"product_search_result",
  "count" : 4,
  "hits" : [ {
    "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true",
    "product_id" : "25791388",
    "product_name" : "Zacco",
    "currency" : "USD",
    "price" : 99.00,
    "price_per_unit": 99.00,
    "prices" : {
       "USListPriceBook": 110.00,
       "USSalesPriceBook": 99.00
    }
    
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772717?pretty_print=true",
    "product_id" : "25772717",
    "product_name" : "Zerrick",
    "currency" : "USD",
    "price" : 99.00,
    "price_per_unit": 99.00,
    "prices" : {
       "USListPriceBook": 120.00,
       "USSalesPriceBook": 99.00
    }
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772792?pretty_print=true",
    "product_id" : "25772792",
    "product_name" : "Aylin",
    "currency" : "USD",
    "price" : 79.00,
    "price_per_unit": 79.00,
    "prices" : {
       "USListPriceBook": 89.00,
       "USSalesPriceBook": 79.00
    }
  }, {
    "link" : "http://example.com/dw/shop/v23_2/products/25772707?pretty_print=true",
    "product_id" : "25772707",
    "product_name" : "Bozwell",
    "currency" : "USD",
    "price" : 89.00,
    "price_per_unit": 89.00,
    "prices" : {
       "USListPriceBook": 99.00,
       "USSalesPriceBook": 89.00
    }
  } ],
  "query" : "shoes",
  "refinements" : [ {
    "attribute_id" : "cgid",
    "label" : "Category",
    "values" : [ {
      "hit_count" : 0,
      "label" : "Mens",
      "value" : "mens"
    }, {
      "hit_count" : 0,
      "label" : "Electronics",
      "value" : "electronics"
    }, {
      "hit_count" : 0,
      "label" : "Gift Certificates",
      "value" : "gift-certificates"
    }, {
      "hit_count" : 0,
      "label" : "Sale",
      "value" : "top-seller"
    }, {
      "hit_count" : 1,
      "label" : "New Arrivals",
      "value" : "newarrivals"
    }, {
      "hit_count" : 4,
      "label" : "Womens",
      "value" : "womens",
      "values" : [ {
        "hit_count" : 0,
        "label" : "Jewelry",
        "value" : "womens-jewelry"
      }, {
        "hit_count" : 4,
        "label" : "Accessories",
        "value" : "womens-accessories",
        "values" : [ {
          "hit_count" : 0,
          "label" : "Scarves",
          "value" : "womens-accessories-scarves"
        }, {
          "hit_count" : 4,
          "label" : "Shoes",
          "value" : "womens-accessories-shoes",
          "values" : [ ]
        } ]
      }, {
        "hit_count" : 0,
        "label" : "Clothing",
        "value" : "womens-clothing"
      } ]
    } ]
  }, {
    "attribute_id" : "c_refinementColor",
    "label" : "Color",
    "values" : [ {
      "hit_count" : 1,
      "label" : "Beige",
      "presentation_id" : "beige",
      "value" : "Beige"
    }, {
      "hit_count" : 4,
      "label" : "Black",
      "presentation_id" : "black",
      "value" : "Black"
    }, {
      "hit_count" : 0,
      "label" : "Blue",
      "presentation_id" : "blue",
      "value" : "Blue"
    }, {
      "hit_count" : 0,
      "label" : "Navy",
      "presentation_id" : "navy",
      "value" : "Navy"
    }, {
      "hit_count" : 1,
      "label" : "Brown",
      "presentation_id" : "brown",
      "value" : "Brown"
    }, {
      "hit_count" : 0,
      "label" : "Green",
      "presentation_id" : "green",
      "value" : "Green"
    }, {
      "hit_count" : 1,
      "label" : "Grey",
      "presentation_id" : "grey",
      "value" : "Grey"
    }, {
      "hit_count" : 0,
      "label" : "Orange",
      "presentation_id" : "orange",
      "value" : "Orange"
    }, {
      "hit_count" : 1,
      "label" : "Pink",
      "presentation_id" : "pink",
      "value" : "Pink"
    }, {
      "hit_count" : 0,
      "label" : "Purple",
      "presentation_id" : "purple",
      "value" : "Purple"
    }, {
      "hit_count" : 0,
      "label" : "Red",
      "presentation_id" : "red",
      "value" : "Red"
    }, {
      "hit_count" : 1,
      "label" : "White",
      "presentation_id" : "white",
      "value" : "White"
    }, {
      "hit_count" : 0,
      "label" : "Yellow",
      "presentation_id" : "yellow",
      "value" : "Yellow"
    }, {
      "hit_count" : 0,
      "label" : "Miscellaneous",
      "presentation_id" : "miscellaneous",
      "value" : "Miscellaneous"
    } ]
  }, {
    "attribute_id" : "c_isNew",
    "label" : "New Arrival",
    "values" : [ ]
  }, {
    "attribute_id" : "c_size",
    "label" : "Size",
    "values" : [ {
      "hit_count" : 0,
      "label" : "OS",
      "value" : "OS"
    }, {
      "hit_count" : 4,
      "label" : "6",
      "value" : "6"
    }, {
      "hit_count" : 4,
      "label" : "6.5",
      "value" : "6.5"
    }, {
      "hit_count" : 4,
      "label" : "7",
      "value" : "7"
    }, {
      "hit_count" : 4,
      "label" : "7.5",
      "value" : "7.5"
    }, {
      "hit_count" : 4,
      "label" : "8",
      "value" : "8"
    }, {
      "hit_count" : 3,
      "label" : "8.5",
      "value" : "8.5"
    }, {
      "hit_count" : 3,
      "label" : "9",
      "value" : "9"
    }, {
      "hit_count" : 4,
      "label" : "9.5",
      "value" : "9.5"
    }, {
      "hit_count" : 3,
      "label" : "10",
      "value" : "10"
    }, {
      "hit_count" : 1,
      "label" : "11",
      "value" : "11"
    } ]
  }, {
    "attribute_id" : "price",
    "label" : "Price",
    "values" : [ {
      "hit_count" : 4,
      "label" : "$50 - $16.49",
      "value" : "(50..100)"
    } ]
  } ],
  "selected_refinements" : {
    "price" : "(0..500)",
    "c_refinementColor" : "Black",
    "cgid" : "womens"
  },
  "selected_sorting_option" : "top-sellers",
  "sorting_options" : [ {
    "id" : "best-matches",
    "label" : "Best Matches"
  }, {
    "id" : "price-low-to-high",
    "label" : "Price Low To High"
  }, {
    "id" : "price-high-to-low",
    "label" : "Price High To Low"
  }, {
    "id" : "product-name-ascending",
    "label" : "Product Name A - Z"
  }, {
    "id" : "product-name-descending",
    "label" : "Product Name Z - A"
  }, {
    "id" : "brand",
    "label" : "Brand"
  }, {
    "id" : "most-popular",
    "label" : "Most Popular"
  }, {
    "id" : "top-sellers",
    "label" : "Top Sellers"
  } ],
  "start" : 0,
  "total" : 4
}

Search Products - Represented Products

Provides keyword and refinement search functionality for products. Only returns the product id, link, name and represented product information in the product search hit.

This resource does not return detailed information about variation products. If a variation product matches the query, basic information for the parent master product is returned. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search/represented_products?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search/represented_products?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5 HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "23.2",
  "_type":"product_search_result",
  "count" : 1,
  "hits" : [ {
    "_type": "product_search_hit",
    "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true",
    "product_id" : "25791388",
    "product_name" : "Zacco",
    "product_type": {
        "_type": "product_type",
        "item": true
    },
    "represented_product": {
        "_type": "product_ref",
        "id": "25791388",
        "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true"
    },
    "represented_products": [
        {
            "_type": "product_ref",
            "id": "25791388",
            "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true"
        },
        {
            "_type": "product_ref",
            "id": "25772717",
            "link" : "http://example.com/dw/shop/v23_2/products/25772717?pretty_print=true"
        },
        {
            "_type": "product_ref",
            "id": "25772792",
            "link" : "http://example.com/dw/shop/v23_2/products/25772792?pretty_print=true"
        },
        {
            "_type": "product_ref",
            "id": "25772707",
            "link" : "http://example.com/dw/shop/v23_2/products/25772707?pretty_print=true"
        }
    ]
  } ],
  "query" : "shoes",
  "refinements" : [ {
    "attribute_id" : "cgid",
    "label" : "Category",
    "values" : [ {
      "hit_count" : 0,
      "label" : "Mens",
      "value" : "mens"
    }, {
      "hit_count" : 0,
      "label" : "Electronics",
      "value" : "electronics"
    }, {
      "hit_count" : 0,
      "label" : "Gift Certificates",
      "value" : "gift-certificates"
    }, {
      "hit_count" : 0,
      "label" : "Sale",
      "value" : "top-seller"
    }, {
      "hit_count" : 1,
      "label" : "New Arrivals",
      "value" : "newarrivals"
    }, {
      "hit_count" : 4,
      "label" : "Womens",
      "value" : "womens",
      "values" : [ {
        "hit_count" : 0,
        "label" : "Jewelry",
        "value" : "womens-jewelry"
      }, {
        "hit_count" : 4,
        "label" : "Accessories",
        "value" : "womens-accessories",
        "values" : [ {
          "hit_count" : 0,
          "label" : "Scarves",
          "value" : "womens-accessories-scarves"
        }, {
          "hit_count" : 4,
          "label" : "Shoes",
          "value" : "womens-accessories-shoes",
          "values" : [ ]
        } ]
      }, {
        "hit_count" : 0,
        "label" : "Clothing",
        "value" : "womens-clothing"
      } ]
    } ]
  }, {
    "attribute_id" : "c_refinementColor",
    "label" : "Color",
    "values" : [ {
      "hit_count" : 1,
      "label" : "Beige",
      "presentation_id" : "beige",
      "value" : "Beige"
    }, {
      "hit_count" : 4,
      "label" : "Black",
      "presentation_id" : "black",
      "value" : "Black"
    }, {
      "hit_count" : 0,
      "label" : "Blue",
      "presentation_id" : "blue",
      "value" : "Blue"
    }, {
      "hit_count" : 0,
      "label" : "Navy",
      "presentation_id" : "navy",
      "value" : "Navy"
    }, {
      "hit_count" : 1,
      "label" : "Brown",
      "presentation_id" : "brown",
      "value" : "Brown"
    }, {
      "hit_count" : 0,
      "label" : "Green",
      "presentation_id" : "green",
      "value" : "Green"
    }, {
      "hit_count" : 1,
      "label" : "Grey",
      "presentation_id" : "grey",
      "value" : "Grey"
    }, {
      "hit_count" : 0,
      "label" : "Orange",
      "presentation_id" : "orange",
      "value" : "Orange"
    }, {
      "hit_count" : 1,
      "label" : "Pink",
      "presentation_id" : "pink",
      "value" : "Pink"
    }, {
      "hit_count" : 0,
      "label" : "Purple",
      "presentation_id" : "purple",
      "value" : "Purple"
    }, {
      "hit_count" : 0,
      "label" : "Red",
      "presentation_id" : "red",
      "value" : "Red"
    }, {
      "hit_count" : 1,
      "label" : "White",
      "presentation_id" : "white",
      "value" : "White"
    }, {
      "hit_count" : 0,
      "label" : "Yellow",
      "presentation_id" : "yellow",
      "value" : "Yellow"
    }, {
      "hit_count" : 0,
      "label" : "Miscellaneous",
      "presentation_id" : "miscellaneous",
      "value" : "Miscellaneous"
    } ]
  }, {
    "attribute_id" : "c_isNew",
    "label" : "New Arrival",
    "values" : [ ]
  }, {
    "attribute_id" : "c_size",
    "label" : "Size",
    "values" : [ {
      "hit_count" : 0,
      "label" : "OS",
      "value" : "OS"
    }, {
      "hit_count" : 4,
      "label" : "6",
      "value" : "6"
    }, {
      "hit_count" : 4,
      "label" : "6.5",
      "value" : "6.5"
    }, {
      "hit_count" : 4,
      "label" : "7",
      "value" : "7"
    }, {
      "hit_count" : 4,
      "label" : "7.5",
      "value" : "7.5"
    }, {
      "hit_count" : 4,
      "label" : "8",
      "value" : "8"
    }, {
      "hit_count" : 3,
      "label" : "8.5",
      "value" : "8.5"
    }, {
      "hit_count" : 3,
      "label" : "9",
      "value" : "9"
    }, {
      "hit_count" : 4,
      "label" : "9.5",
      "value" : "9.5"
    }, {
      "hit_count" : 3,
      "label" : "10",
      "value" : "10"
    }, {
      "hit_count" : 1,
      "label" : "11",
      "value" : "11"
    } ]
  }, {
    "attribute_id" : "price",
    "label" : "Price",
    "values" : [ {
      "hit_count" : 4,
      "label" : "$50 - $99.99",
      "value" : "(50..100)"
    } ]
  } ],
  "selected_refinements" : {
    "price" : "(0..500)",
    "c_refinementColor" : "Black",
    "cgid" : "womens"
  },
  "selected_sorting_option" : "top-sellers",
  "sorting_options" : [ {
    "id" : "best-matches",
    "label" : "Best Matches"
  }, {
    "id" : "price-low-to-high",
    "label" : "Price Low To High"
  }, {
    "id" : "price-high-to-low",
    "label" : "Price High To Low"
  }, {
    "id" : "product-name-ascending",
    "label" : "Product Name A - Z"
  }, {
    "id" : "product-name-descending",
    "label" : "Product Name Z - A"
  }, {
    "id" : "brand",
    "label" : "Brand"
  }, {
    "id" : "most-popular",
    "label" : "Most Popular"
  }, {
    "id" : "top-sellers",
    "label" : "Top Sellers"
  } ],
  "start" : 0,
  "total" : 1
}

Search Products - Variations

Provides keyword and refinement search functionality for products. Only returns the product id, name and variation information in the product search hit.

This resource does not return detailed information about variation products. Use the products resource to retrieve more details about a variation product.

Url

GET http://hostname:port/dw/shop/v23_2/product_search/variations?q={String}&refine={String}&sort={String}&start={Integer}&count={Integer}&locale={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT.
None No authentication.

Response Document

ProductSearchResult

Query Parameters

Parameter Type Description Constraints
count Integer The maximum number of instances per request. Default value is 25. maxIntegerValue=200, minIntegerValue=1
locale String The locale context.  
q String The query phrase to search for. maxLength=50
refine String Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=price=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementColor=red|green|blue. The following system refinement attribute ids are supported:
  • cgid: Allows to refine per single category id. Multiple category ids are not supported.
  • price: Allows to refine per single price range. Multiple price ranges are not supported.
  • pmid: Allows to refine per promotion id(s).
  • orderable_only: Unavailable products will be excluded from the search results if true is set. Multiple refinement values are not supported.
 
sort String The id of the sorting option to sort the search hits.  
start Integer The result set index to return the first instance for. Default value is 0. minIntegerValue=0

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedPriceRefinementException

malformedPrice (String)

Thrown if a price refinement parameter is malformed.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_search.beforeGET

beforeGET () : Status

The function is called before the request will be processed.

Returns:
a non-null Status ends the hook execution
dw.ocapi.shop.product_search.modifyGETResponse

modifyGETResponse (doc : ProductSearchResult ) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
a non-null Status ends the hook execution

Sample

REQUEST:
GET /dw/shop/v23_2/product_search/variations?q=shoes&refine_1=cgid=womens&refine_2=c_refinementColor=Black&refine_3=price=(0..500)&sort=top-sellers&count=5 HTTP/1.1
Host: example.com
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "23.2",
  "_type":"product_search_result",
  "count" : 1,
  "hits" : [ {
    "link" : "http://example.com/dw/shop/v23_2/products/25791388?pretty_print=true",
    "product_id" : "25791388",
    "product_name" : "Zacco",
    "variation_attributes" : [ {
      "id" : "color",
      "name" : "Color",
      "values" : [ {
        "name" : "Black",
        "value" : "BLKBKPA"
      } ]
    }, {
      "id" : "size",
      "name" : "size",
      "values" : [ {
        "name" : "6",
        "value" : "060"
      }, {
        "name" : "6.5",
        "value" : "065"
      }, {
        "name" : "7",
        "value" : "070"
      }, {
        "name" : "7.5",
        "value" : "075"
      }, {
        "name" : "8",
        "value" : "080"
      }, {
        "name" : "8.5",
        "value" : "085"
      }, {
        "name" : "9",
        "value" : "090"
      }, {
        "name" : "9.5",
        "value" : "095"
      }, {
        "name" : "10",
        "value" : "100"
      } ]
    }, {
      "id" : "width",
      "name" : "Width",
      "values" : [ {
        "name" : "M",
        "value" : "M"
      } ]
    } ]
  } ],
  "query" : "shoes",
  "refinements" : [ {
    "attribute_id" : "cgid",
    "label" : "Category",
    "values" : [ {
      "hit_count" : 0,
      "label" : "Mens",
      "value" : "mens"
    }, {
      "hit_count" : 0,
      "label" : "Electronics",
      "value" : "electronics"
    }, {
      "hit_count" : 0,
      "label" : "Gift Certificates",
      "value" : "gift-certificates"
    }, {
      "hit_count" : 0,
      "label" : "Sale",
      "value" : "top-seller"
    }, {
      "hit_count" : 1,
      "label" : "New Arrivals",
      "value" : "newarrivals"
    }, {
      "hit_count" : 4,
      "label" : "Womens",
      "value" : "womens",
      "values" : [ {
        "hit_count" : 0,
        "label" : "Jewelry",
        "value" : "womens-jewelry"
      }, {
        "hit_count" : 4,
        "label" : "Accessories",
        "value" : "womens-accessories",
        "values" : [ {
          "hit_count" : 0,
          "label" : "Scarves",
          "value" : "womens-accessories-scarves"
        }, {
          "hit_count" : 4,
          "label" : "Shoes",
          "value" : "womens-accessories-shoes",
          "values" : [ ]
        } ]
      }, {
        "hit_count" : 0,
        "label" : "Clothing",
        "value" : "womens-clothing"
      } ]
    } ]
  }, {
    "attribute_id" : "c_refinementColor",
    "label" : "Color",
    "values" : [ {
      "hit_count" : 1,
      "label" : "Beige",
      "presentation_id" : "beige",
      "value" : "Beige"
    }, {
      "hit_count" : 4,
      "label" : "Black",
      "presentation_id" : "black",
      "value" : "Black"
    }, {
      "hit_count" : 0,
      "label" : "Blue",
      "presentation_id" : "blue",
      "value" : "Blue"
    }, {
      "hit_count" : 0,
      "label" : "Navy",
      "presentation_id" : "navy",
      "value" : "Navy"
    }, {
      "hit_count" : 1,
      "label" : "Brown",
      "presentation_id" : "brown",
      "value" : "Brown"
    }, {
      "hit_count" : 0,
      "label" : "Green",
      "presentation_id" : "green",
      "value" : "Green"
    }, {
      "hit_count" : 1,
      "label" : "Grey",
      "presentation_id" : "grey",
      "value" : "Grey"
    }, {
      "hit_count" : 0,
      "label" : "Orange",
      "presentation_id" : "orange",
      "value" : "Orange"
    }, {
      "hit_count" : 1,
      "label" : "Pink",
      "presentation_id" : "pink",
      "value" : "Pink"
    }, {
      "hit_count" : 0,
      "label" : "Purple",
      "presentation_id" : "purple",
      "value" : "Purple"
    }, {
      "hit_count" : 0,
      "label" : "Red",
      "presentation_id" : "red",
      "value" : "Red"
    }, {
      "hit_count" : 1,
      "label" : "White",
      "presentation_id" : "white",
      "value" : "White"
    }, {
      "hit_count" : 0,
      "label" : "Yellow",
      "presentation_id" : "yellow",
      "value" : "Yellow"
    }, {
      "hit_count" : 0,
      "label" : "Miscellaneous",
      "presentation_id" : "miscellaneous",
      "value" : "Miscellaneous"
    } ]
  }, {
    "attribute_id" : "c_isNew",
    "label" : "New Arrival",
    "values" : [ ]
  }, {
    "attribute_id" : "c_size",
    "label" : "Size",
    "values" : [ {
      "hit_count" : 0,
      "label" : "OS",
      "value" : "OS"
    }, {
      "hit_count" : 4,
      "label" : "6",
      "value" : "6"
    }, {
      "hit_count" : 4,
      "label" : "6.5",
      "value" : "6.5"
    }, {
      "hit_count" : 4,
      "label" : "7",
      "value" : "7"
    }, {
      "hit_count" : 4,
      "label" : "7.5",
      "value" : "7.5"
    }, {
      "hit_count" : 4,
      "label" : "8",
      "value" : "8"
    }, {
      "hit_count" : 3,
      "label" : "8.5",
      "value" : "8.5"
    }, {
      "hit_count" : 3,
      "label" : "9",
      "value" : "9"
    }, {
      "hit_count" : 4,
      "label" : "9.5",
      "value" : "9.5"
    }, {
      "hit_count" : 3,
      "label" : "10",
      "value" : "10"
    }, {
      "hit_count" : 1,
      "label" : "11",
      "value" : "11"
    } ]
  }, {
    "attribute_id" : "price",
    "label" : "Price",
    "values" : [ {
      "hit_count" : 4,
      "label" : "$50 - $14.69",
      "value" : "(50..100)"
    } ]
  } ],
  "selected_refinements" : {
    "price" : "(0..500)",
    "c_refinementColor" : "Black",
    "cgid" : "womens"
  },
  "selected_sorting_option" : "top-sellers",
  "sorting_options" : [ {
    "id" : "best-matches",
    "label" : "Best Matches"
  }, {
    "id" : "price-low-to-high",
    "label" : "Price Low To High"
  }, {
    "id" : "price-high-to-low",
    "label" : "Price High To Low"
  }, {
    "id" : "product-name-ascending",
    "label" : "Product Name A - Z"
  }, {
    "id" : "product-name-descending",
    "label" : "Product Name Z - A"
  }, {
    "id" : "brand",
    "label" : "Brand"
  }, {
    "id" : "most-popular",
    "label" : "Most Popular"
  }, {
    "id" : "top-sellers",
    "label" : "Top Sellers"
  } ],
  "start" : 0,
  "total" : 1
}
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.