ANS-1319 · WEB SERVICES & INTEGRATIONS

NetSuite Web Services: Search Serialized Inventory (Advanced Bin)

Understand how to retrieve serialized inventory details, including bin numbers and quantities, for items configured with advanced inventory management.

Short answer

To search for serialized inventory items via NetSuite web services, use `ItemSearchAdvanced` with `inventoryDetailJoin` for bin numbers and quantities. A subsequent `InventoryNumberSearch` is needed to retrieve actual serial numbers, as the initial search only returns their internal IDs.

Scenario

Users need to programmatically retrieve detailed information about serialized inventory items, specifically their serial numbers, bin locations, and quantities, when the "Advanced Bin / Numbered Inventory Management" feature is enabled in NetSuite. The initial attempt to use `ItemSearchAdvanced` only yields the internal ID of the inventory number, not the serial number itself.

Solution

NetSuite web services can be used to search for serialized inventory items when the "Advanced Bin / Numbered Inventory Management" feature is enabled. This process typically involves an initial search for the item details, followed by a more specific search for the inventory numbers (serial numbers) themselves.Important Note on Web Services and WSDL Versions:The following examples utilize SOAP web services with WSDL versions illustrative of an older implementation. NetSuite is actively deprecating SOAP web services, with full deprecation scheduled for the 2028.2 release. For new integrations, it is strongly recommended to use REST web services. The last planned SOAP endpoint is 2025.2. While the core concepts of ItemSearchAdvanced and inventoryDetailJoin remain relevant, the specific WSDL namespaces shown below reflect an older approach.1. Initial Search for Item Details using ItemSearchAdvanced:To retrieve general item details and associated inventory information, including bin numbers and quantities, an ItemSearchAdvanced request can be made. This search will return the internal ID of the inventory number, which can then be used in a subsequent search to get the actual serial number.

xml<soapenv:Body>   <platformMsgs:search       xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com"       xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"       xmlns:xsd="http://www.w3.org/2001/XMLSchema"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xmlns:platformCore="urn:core_2012_1.platform.webservices.netsuite.com"       xmlns:platformMsgs="urn:messages_2012_1.platform.webservices.netsuite.com"       xmlns:s0="urn:accounting_2012_1.lists.webservices.netsuite.com">      <platformMsgs:searchRecord xsi:type="s0:ItemSearchAdvanced">         <s0:criteria>            <s0:basic>               <platformCommon:internalId operator="anyOf">                  <platformCore:searchValue internalId="111"type="serializedInventoryItem" />               </platformCommon:internalId>            </s0:basic>         </s0:criteria>         <s0:columns>            <s0:inventoryDetailJoin>               <platformCommon:binNumber />               <platformCommon:externalId />               <platformCommon:internalId />               <platformCommon:inventoryNumber />               <platformCommon:quantity />            </s0:inventoryDetailJoin>         </s0:columns>      </platformMsgs:searchRecord>   </platformMsgs:search></soapenv:Body>

The expected response from this search will include the inventoryDetailJoin with the internal ID of the inventory number:

xml<soapenv:Body>   <searchResponsexmlns="urn:messages_2012_1.platform.webservices.netsuite.com">      <platformCore:searchResultxmlns:platformCore="urn:core_2012_1.platform.webservices.netsuite.com">         <platformCore:status isSuccess="true" />         <platformCore:totalRecords>31</platformCore:totalRecords>         <platformCore:pageSize>1000</platformCore:pageSize>         <platformCore:totalPages>1</platformCore:totalPages>         <platformCore:pageIndex>1</platformCore:pageIndex>         <platformCore:searchId>WEBSERVICES_TSTDRV594049_05162012145800475280551266_a0a82b34</platformCore:searchId>         <platformCore:searchRowList>            <platformCore:searchRowxsi:type="listAcct:ItemSearchRow"xmlns:listAcct="urn:accounting_2012_1.lists.webservices.netsuite.com">               <listAcct:inventoryDetailJoinxmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com">                  <platformCommon:internalId>                     <platformCore:searchValue internalId="35" />                  </platformCommon:internalId>                  <platformCommon:inventoryNumber>                     <platformCore:searchValue internalId="38" />                  </platformCommon:inventoryNumber>                  <platformCommon:quantity>                     <platformCore:searchValue>1.0</platformCore:searchValue>                  </platformCommon:quantity>               </listAcct:inventoryDetailJoin>            </platformCore:searchRow>.... .... ....      </platformCore:searchRowList>         </platformCore:searchResult>   </searchResponse></soapenv:Body>

It is important to note that this response only returns the internal ID of the Inventory Number (Serial Number).2. Subsequent Search for Serial Numbers using InventoryNumberSearch:To obtain the actual serial number string, a separate search using InventoryNumberSearch is required, typically using the internal ID retrieved from the ItemSearchAdvanced result.

xml<soapenv:Body>   <platformMsgs:search       xmlns:platformCommon="urn:common_2012_1.platform.webservices.netsuite.com"       xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"       xmlns:xsd="http://www.w3.org/2001/XMLSchema"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xmlns:platformCore="urn:core_2012_1.platform.webservices.netsuite.com"       xmlns:platformMsgs="urn:messages_2012_1.platform.webservices.netsuite.com"       xmlns:s0="urn:accounting_2012_1.lists.webservices.netsuite.com">      <platformMsgs:searchRecord xsi:type="s0:InventoryNumberSearch

Expert NetSuite Support

Need help with this NetSuite issue?

Web Services & Integrations consulting and configuration support

Talk to a consultant