Item Search API input Parameters in Netsuite Suite Commerce.


Hi All,

When you call Netsuite Item Search in Suite Commerce, Netsuite actually store some parameters default to filter and sort Netsuite Item on website.

Parameter : c (optional)    
URL:  /api/items?c=1234567
Description: Specifies the NetSuite account.

Parameter : callback (optional)

URL/api/items?callback=mycallback
Description: Defines the JavaScript callback function to wrap the response in. Used for JSONP responses.

Parameter : commercecategoryid (optional)
URL:  /api/items?commercecategoryid=12345
Description: Specifies items by a given Commerce Category ID

Parameter : commercecategoryurl (optional)


URL:  /api/items?commercecategoryurl=%2Ffoo%2Fbar%2Fbaz
Description: Specifies items by a given Commerce Category URL


Parameter : commercecategoryname (optional)


 URL:  /api/items?commercecategoryname=Summer%20Sale
Description: Specifies items by a given Commerce Category Name


Parameter : correlateditems_fieldset (optional)
URL:  /api/items?fieldset=search&correlateditems_fieldset=mini
Description: Specifies the field set that overrides the reserved correlateditems field set.
 The correlateditems field set is used by the correlateditems_detail synthetic
 field by default to retrieve the item fields of all the correlated items.


Parameter : currency (optional)
URL: /api/items?currency=USD
Description: Specifies the currency in an API request. In an account that uses the Multi-Currency feature,
 pass the ISO Country Code to specify the currency format in which you want to display prices.


//---------------------------------------------------------------//
Parameter : debug (optional)
URL: /api/items?debug=true&fieldset
Description: Prints the API request parameters in the JSON response data.


//---------------------------------------------------------------//

Parameter: facet.exclude (optional)
URL: /api/items?include=facets&fieldset=search&language=en&country=US&currency=USD&pricelevel=5&c=1234567&n=2&custitem_categories=Kitchen-Utensils
&sort=pricelevel5&asc&limit=24&offset=0&c=1234567&facet.exclude=custitem_categories

Description: Excludes fields from faceting in Item Search API calls.
 This request parameter accepts comma delimited field names.
 Excluding facet fields that are not essential can help to speed up API calls.
 In the example below, the API call specifies a facet value (custitem_categories=Kitchen-Utensils)
 for   filtering,
 while excluding the field, custitem_categories from faceting.



//---------------------------------------------------------------//


Parameter : facet ranges (optional)
URL: /api/items?pricelevel5.ranges=1-9.99,10-19.99,20-*
Description: Defines range buckets for numeric facets. You can add the ranges suffix on the field ID:

//---------------------------------------------------------------//



Parameter : facet range filters (optional)
URL: /api/items?pricelevel5.from=10&pricelevel5.to=20
Description: Specifies a range of items to be returned in query results, and can only be used with numeric facet fields such as price.
Both from and to are required, and excluding one will result in an error.


//---------------------------------------------------------------//

Parameter : facets (optional)
URL: /api/items?color=red,blue&gender=women
Description: Specifies the facets and facet values that should be returned.
This parameter returns the item IDs associated with the facets specified.
 You can add a facet filter to the API request, followed by the facet values you want to use as the filter.


//---------------------------------------------------------------//

Parameter : fields (optional)
URL: /api/items?fields=internalid,name
Description: Specifies the item record fields returned in response data. Your request can include a valid field ID,
or multiple field IDs separated by commas to return multiple fields.

//---------------------------------------------------------------//

Parameter : fieldset (optional)
URL: /api/items?fieldset=item-detail-view
Description: Specifies the field set in an API request.
 Returns all of the fields associated with a field set.
 When the Commerce Category field is defined in the Web Site Setup record
 field sets, the Commerce Category details for a given item are returned.


//---------------------------------------------------------------//



Parameter : id (optional)
URL: /api/items?id=123
Description: Specifies the item record. To get information for a specific item,
 your request can contain the item record ID.
 To return multiple items in response data, list multiple
 item IDs separated by commas. If the item record ID is not valid,
 then an error is returned.



//---------------------------------------------------------------//


Parameter : include (optional)
URL: /api/items?include=facets
Description: Specifies an item attribute in the API request.
 Use this parameter to incorporate additional data in the JSON response.
 For example, the sample query below includes facet fields in the JSON response.


//---------------------------------------------------------------//


Parameter : language (optional)
URL: /api/items?country=ES&language=es
Description: This example displays search results in Spanish:


//---------------------------------------------------------------//


Parameter : limit (optional)
URL: /api/items?limit=10
Description: Specifies the number of items displayed in search results.


//---------------------------------------------------------------//

Parameter : matrixchilditems_fieldset (optional)
URL: /api/items?fieldset=search&matrixchilditems_fieldset=mini
Description: Specifies the field set that overrides the reserved matrixchilditems field set.
In the following example, the default matrixchilditems field set is overridden
with a field set named mini using the Item Search API parameter matrixchilditems_fieldset.


//---------------------------------------------------------------//

Parameter :  n (optional)
URL: /api/items?n=3
Description: Specifies the SuiteCommerce Advanced site ID.


//---------------------------------------------------------------//

Parameter :  offset (optional)
URL: /api/items?limit=10&offset=10
Description: Defines a segmented list of items when used in combination with limit.
 You can generate data for paginated lists by specifying the number of
 items to display on each page. In a site template, you can create the
 UI element shoppers will use to page through product search results.



//---------------------------------------------------------------//


Parameter :  pricelevel (required)
URL: /api/items?pricelevel=5
Description: When a customer with a custom price level is logged in on the web store,
the price level assigned to that customer is retrieved instead of the default online price level.
Typically, the default online price in NetSuite is pricelevel=5.
If you have set up multiple price levels for items, ensure that you add all the price level fields as sort fields.


//---------------------------------------------------------------//


Parameter :  q (optional)
URL: /api/items?q=jeans
Description: Defines a keyword for the Item Search API request.
The keyword must exist in the search fields you specified on the Web Site
 Setup page in NetSuite. To select search fields,
 go to Setup > SuiteCommerce Advanced > Set Up Web Site > Search Index > Search Fields.


//---------------------------------------------------------------//


Parameter :  relateditems_fieldset (optional)
URL: /api/items?fieldset=search&relateditems_fieldset=mini
Description: Specifies the field set that overrides the reserved relateditems field set.
 The relateditems field set is used by the relateditems_detail synthetic field
 by default to retrieve the item fields of all the related items.


//---------------------------------------------------------------//


Parameter :  region (optional)
URL: /api/items?region=4
Description: Specifies a Subsidiary in a NetSuite OneWorld account. Use region with the Subsidiary ID.


//---------------------------------------------------------------//


Parameter :  sort (optional)
URL: /api/items?sort=storedisplayname:asc
Description: Defines the sort order of search results on your web site.


//---------------------------------------------------------------//


Parameter :  url (optional)
Description: Specifies the value in the URL Component field on the item record in an API request.
 The url parameter only returns data for the item record that matches the url component
 value in the request. Returns the Item ID, if nothing else is specified in the request.
URL: /api/items?url=Vok-500-Cellular-Phone
You can request associated images by using the fields parameter, for example:
URL: /api/items?url=Vok-500-Cellular-Phone&fields=itemimages_detail
You can also use a field set that contains image information:
URL: /api/items?url=Vok-500-Cellular-Phone&fieldset=search

//---------------------------End ------------------------------------//
**You can also take help of Netsuite's Suitelet and get details from suitelet.

Please let us know if you have any query.

Thanks
Abhi
 Download Netsuite Guru Android App
Follow Me on Linkedin
Our FB Page

Comments

  1. How can we get all fields of all inventory items based on the lastmodifieddate?Can you help with this?

    ReplyDelete
    Replies
    1. Hi
      please use search based lastmodifieddate and then load record and get all fields.
      there are many hidden fields also which you can see in object.

      Delete

Post a Comment

Thanks for you message, please join us on Facebook and Linkedin