Skip to main content

Instant Search [GET]

Overview

Supply a valid token and site name along with the search phrase to get instant search results.

Parameters

ParameterTypeDescription
Tokenstring (query)Token supplied during on-boarding or can be generated from within RCMAdmin.
SiteNamestring (query)This is the site name used to describe your regional version of the website, as supplied in the feeds to RCM.
SearchPhrasestringThis is the search phrase the customer has typed into the search bar.
Limitinteger($int32)Limit the amount of products returned back. i.e. to show no more than 5 send 5 as the Limit.
ResultsTypestring (query)Set the amount of product data to return. This can be either IDS or PRODUCT.
CurrencystringCurrency of products to be returned back. This assumes you have supplied products in these currencies. Use the 3 Digit ISO code.

Example API call

V.Search.get({
query: "shirt",
take: 10,
popularSearchCount: 5,
trendingProductCount: 5,
fullProductData: true,
}, (error, data) => {
const test = JSON.stringify(data, null, 4);
const elm = document.querySelector('#search-json');

elm.innerHTML = "<pre>" + test + "</pre>";
});

Example Result

200 response
{
"searchPhrase": "string",
"didYouMeanPhrases": [
"string"
],
"autoFillSuggestions": "string",
"totalMatchedItems": 0,
"results": [
{
"RCMProductId": 0,
"thirdPartyProductId": "string",
"productCode": "string",
"title": "string",
"price": 0,
"salePrice": 0,
"rrp": 0,
"productUrl": "string",
"imageUrl": "string",
"position": 0,
"currency": "string"
}
],
"productIds": [
0
],
"trackingData": {
"action": 0,
"pageId": 0,
"ruleId": 0,
"matchedRules": [
"string"
]
},
"responseTime": "string",
"token": "string"
}

Search Page [GET]

Overview

Supply a valid token and site name with a search phrase to retrieve the full merch page JSON data.

Parameters

ParameterTypeDescription
Tokenstring (query)Token supplied during on-boarding or can be generated from within RCMAdmin.
SiteNamestring (query)This is the site name used to describe your regional version of the website, as supplied in the feeds to RCM.
SearchPhrasestringThis is the search phrase the customer has typed into the search bar.
Currencystring (query)3 Digit ISO Currency code. for example. GDP, FRA, USD etc.
Takeinteger($int32) (query)How many products to get, i.e. 10 products
Skipinteger($int32) (query)CHow many products to skip, for example if we are showing 10 products per page and are page two we would supply skip the first 10.
SortBystring (query)Which Sort to apply to the dataset.
FilterByIdsarray[integer] (query)Which Facets are currently selected.

Example API Call

blank

Example Result

200 response
{
"title": "string",
"url": "string",
"metaTitle": "string",
"metaDescription": "string",
"pageContent": "string",
"onPageTitle": "string",
"onPageDescription": "string",
"ruleId": 0,
"totalProducts": 0,
"adverts": [
{
"title": "string",
"image": "string",
"position": 0,
"url": "string"
}
],
"facets": [
{
"facetId": 0,
"position": 0,
"collapsed": true,
"defaultCount": 0,
"numberOfColumns": 0,
"facetName": "string",
"facetValues": [
{
"facetId": 0,
"facetValueId": 0,
"facetName": "string",
"facetValue": "string",
"position": 0,
"count": 0
}
]
}
],
"products": [
{
"productCode": "string",
"title": "string",
"description": "string",
"productUrl": "string",
"imageUrl": "string",
"RCMProductId": 0,
"thirdPartyProductId": "string",
"rank": 0,
"price": 0,
"rrp": 0,
"isAdvert": true
}
]
}