How to do Item Search Query and Results in Netsuite Suite Commerce?
Hi All,
In this post we are going to explain about querying Item Search and Sample Response.
How to Item Search API Query?
The query string below limits the results to one item, requests the search field set, and includes facets in the response data:
Response Contains:
1.total : if your search query matches only nine items out of the 1000 items in your catalogue, the value of total displayed is nine
2. items: This is an array of items that includes the fields specified using the
3. facets: This shows the facets associated with items returned in the response data. Use the
After you have selected Facet Fields, a web developer can use the Item Search API to query for products with a certain facet value.
.
4. links: This is data for creating hyperlinks that are automatically returned by the API.
5. corrections: This shows the past and current values for facet URL components in the Item Search API request. If you did not enter any aliases in NetSuite for facets or facet values you used in the past, then the corrections property returns no data.
6. locale: This is an object that represents the locale with respect to internationalization.
7. volatility: This refers to the CDN cache settings for your SuiteCommerce Advanced implementation. Changing this setting in your application can have a significant performance impact.
8. code: This is the HTTP status code.
To select facet fields for the search index:
total:205,
items:[
{
],
facets:[
links:[
{
rel: "next" ,
href:"link will appear here"
}
] ,
corrections:
country: "US",
language:"en",
currency: "USD",
region: 1
},
volatility: "unique",
code: 200
}
Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page
In this post we are going to explain about querying Item Search and Sample Response.
How to Item Search API Query?
The query string below limits the results to one item, requests the search field set, and includes facets in the response data:
http://www.mywebstore_suite.com/api/items?
pricelevel=5&limit=1&fieldset=search&offset=1&include=facets
Response Contains:
1.total : if your search query matches only nine items out of the 1000 items in your catalogue, the value of total displayed is nine
2. items: This is an array of items that includes the fields specified using the
fields
or fieldset
parameter.3. facets: This shows the facets associated with items returned in the response data. Use the
include
parameter to show all of facets you defined in on the Web Site Setup page. Select the facets, or item attributes, that shoppers can use to filter their searches for products on your site.After you have selected Facet Fields, a web developer can use the Item Search API to query for products with a certain facet value.
.
4. links: This is data for creating hyperlinks that are automatically returned by the API.
5. corrections: This shows the past and current values for facet URL components in the Item Search API request. If you did not enter any aliases in NetSuite for facets or facet values you used in the past, then the corrections property returns no data.
6. locale: This is an object that represents the locale with respect to internationalization.
7. volatility: This refers to the CDN cache settings for your SuiteCommerce Advanced implementation. Changing this setting in your application can have a significant performance impact.
8. code: This is the HTTP status code.
To select facet fields for the search index:
-
Go to Setup > SuiteCommerce Advanced > Set Up Web Site.
-
Click Edit next to your SuiteCommerce Advanced site.
-
Click Search Index, and then Facet Fields.
Sample Response:
{total:205,
items:[
{
ispurchasable: false,
itemid: "ExampleItem1",
onspecial: false,
onlinecustomerprice: 2.33,
pricelevel5: 2.33,
internalid: 1234
}],
facets:[
{
id: "custitem24",
values: [
{
url: "Men",
label: "Men"
},
{
url: "Women",
label: "Women"
}
]
},
{
id: "custitem25",
values: [
{
url: "Men",
label: "Men"
},
{
url: "Women",
label: "Women"
}
]
}
],
links:[
{
rel: "next" ,
href:"link will appear here"
}
] ,
corrections:
[
{
type:"facet",
id:"custitem_category",
usedAlias:"custitem_category",
url:"EquipmentCategory"
},
{
type:"facet-value",
facet:"custitem_category",
usedAlias:"HockeyPlayer",
url:"Player"
}
],
locale:{country: "US",
language:"en",
currency: "USD",
region: 1
},
volatility: "unique",
code: 200
}
Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page
Comments
Post a Comment
Thanks for you message, please join us on Facebook and Linkedin