Inventory Inquiry with SOAP
Although inventory management is usually performed as outlined in Bulk Data Exchange or REST APIs, clients using XML-RPC APIs can also use Simple Object Access Protocol (SOAP). SOAP is a uniform way of passing XML-encoded data, and in this case forms the structure of how inventory data is displayed. After initial inventory import, the Inventory Inquiry API can be used to determine the inventory availability across all fulfillment locations. This document explains the complex types used for communicating with the Inventory Inquiry API for Version 3 SOAP.
Getting Started
System Requirements
To use the Inventory Inquiry API, there should be a server with Internet access that runs its own SOAP client to send data to the OMS server. The user also need to obtain and import the XML-formatted Inventory Web Services Definition Language (WSDL) file. The WSDL defines the Inventory Inquiry API calls and objects.
Authentication
The AuthenticationHeader is required for all requests to the Inventory Inquiry API.
Name | Type | Description |
AccessKey | xsd:string | The Access Key provided by Kibo. |
AuthenticationHeader
<element name="AuthenticationHeader">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="AccessKey">
<simpleType>
<restriction base="xsd:string">
<pattern value="[a-f0-9]{32}" />
</restriction>
</simpleType>
</element>
</sequence>
<anyAttribute />
</complexType>
</element>
Get Inventory
Required Parameters
The following parameters are always required for an inventory request.
Element | Type | Description |
Catalog | impl:ManufacturerCatalog | A structure of two integers: ManufacturerID and CatalogID. |
Quantities | impl:ArrayOf_impl_ItemQuantity | An array of the ItemQuantity structure. |
LocationNames | impl:ArrayOfLocationNames | An array of strings containing location names. |
Location | impl:RequestLocation | A structure containing the request location information. |
Type | impl:InventoryRequestType | The type of request being made. This is an enumeration. |
Limit | xsd:int | Integer representing the limit of records to be returned. |
IgnoreSafetyStock | xsd:boolean | Set the results to not take safety stock into consideration. Default = false. |
IncludeNegativeInventory | xsd:boolean | Include Inventory records that are negative. Default = false. |
STHEnabled | xsd:boolean | Include locations that are Ship to Home Enabled. |
RestockEnabled | xsd:boolean | Include locations that are able to be re-stocked (Ship to Store). |
PickupEnabled | xsd:boolean | Include locations that allow In-Store Pickup. |
RankType | impl:RankType | An Enumeration of strings for how to rank the returned locations. |
ManufacturerCatalog | | |
ManufacturerID | xsd:Int | The OMS ManufacturerID |
CatalogID | xsd:Int | The OMS CatalogID |
ItemQuantity | | |
PartNumber | xsd:string | Item part number. |
UPC | xsd:string | Item UPC code. |
LocationUPC | xsd:string | The UPC code at the specific location if different from the UPC. |
Quantity | xsd:int | The Quantity Available to Sell. |
StockThreshold | xsd:int | This is essentially a safety stock at the request level. An example would be: Quantity = 2, Threshold = 2. When the request is processed by OMS, it would interpret the request as any store with a quantity of four or more. |
LocationNames | | |
LocationNames | xsd:string | An unbounded list of strings for passing multiple location names. |
RequestLocation | | |
Unit | impl:UnitType | An enumeration of strings. |
Radius | xsd:PositiveInteger | Integer representing the radius to use to calculate distance. |
PostalCode | xsd:string | Postal code to use for the starting point of the radius search. |
Latitude | xsd:double | Latitude. |
Longitude | xsd:double | Longitude. |
CountryCode | xsd:string | String representing the country in which to run the search. See Country Codes in this guide for values. |
UnitType | | |
UnitType | xsd:string | An enumeration of the unit type (MILES or KM). |
InventoryRequestType | | |
InventoryRequestType | xsd:string | An enumeration of the request type (ALL, PARTIAL, ANY, or ALL_STORES). |
RankType | | |
RankType | xsd:string | An enumeration of the rank type (STH, RESTOCK, ANY, or ALL_STORES). |
InventoryResponse | | |
InventoryResponse | impl:InventoryResponse | Structure returned from the getInventory method. |
Example Request
This Inventory Request calls the method getInventory.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="https://v3.client.coexprivate.api.shopatron.com">
<soapenv:Header>
<v3:AuthenticationHeader>
<v3:AccessKey>YOUR PROVIDED ACCESS KEY</v3:AccessKey>
</v3:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<v3:InventoryRequest>
<v3:Catalog>
<v3:ManufacturerID>OMS Supplied
ManufacturerID</v3:ManufacturerID>
<v3:CatalogID>OMS Supplied CatalogID</v3:CatalogID>
</v3:Catalog>
<v3:Quantities>
<!--1 or more repetitions:-->
<v3:items>
<v3:PartNumber>SamplePart</v3:PartNumber>
<v3:UPC>SamplePart</v3:UPC>
<v3:LocationUPC>SamplePart</v3:LocationUPC>
<v3:Quantity>1</v3:Quantity>
<v3:StockThreshold>0</v3:StockThreshold>
</v3:items>
</v3:Quantities>
<v3:Type>ANY</v3:Type>
<v3:Limit>10000</v3:Limit>
<v3:RankType>STH</v3:RankType>
</v3:InventoryRequest>
</soapenv:Body>
</soapenv:Envelope>
Example Response
This sample demonstrates what might be returned by the successful request above.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://v3.client.coexprivate.api.shopatron.com" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<parameters>
<ns1:items>
<ns1:LocationName>Fulfiller Location Name 1</ns1:LocationName>
<ns1:CatalogID>OMS Supplied CatalogID</ns1:CatalogID>
<ns1:ManufacturerID>OMS Supplied
ManufacturerID</ns1:ManufacturerID>
<ns1:OnHand>100000</ns1:OnHand>
<ns1:Available>100000</ns1:Available>
<ns1:PartNumber>SamplePart</ns1:PartNumber>
<ns1:UPC>SamplePart</ns1:UPC>
<ns1:LocationUPC>SamplePart</ns1:LocationUPC>
<ns1:LTD>2</ns1:LTD>
<ns1:Floor>3</ns1:Floor>
<ns1:SafetyStock>4</ns1:SafetyStock>
<ns1:STHEnabled>true</ns1:STHEnabled>
<ns1:RestockEnabled>false</ns1:RestockEnabled>
<ns1:PickupEnabled>false</ns1:PickupEnabled>
<ns1:CountryCode>US</ns1:CountryCode>
<ns1:STHRank>9</ns1:STHRank>
<ns1:RestockRank>0</ns1:RestockRank>
<ns1:Distance xsi:nil="true" />
</ns1:items>
<ns1:items>
<ns1:LocationName>Fulfiller Location Name 2</ns1:LocationName>
<ns1:CatalogID>OMS Supplied CatalogID</ns1:CatalogID>
<ns1:ManufacturerID>OMS Supplied
ManufacturerID</ns1:ManufacturerID>
<ns1:OnHand>100000</ns1:OnHand>
<ns1:Available>100000</ns1:Available>
<ns1:PartNumber>SamplePart</ns1:PartNumber>
<ns1:UPC>SamplePart</ns1:UPC>
<ns1:LocationUPC>SamplePart</ns1:LocationUPC>
<ns1:LTD>2</ns1:LTD>
<ns1:Floor>3</ns1:Floor>
<ns1:SafetyStock>4</ns1:SafetyStock>
<ns1:STHEnabled>true</ns1:STHEnabled>
<ns1:RestockEnabled>false</ns1:RestockEnabled>
<ns1:PickupEnabled>false</ns1:PickupEnabled>
<ns1:CountryCode>US</ns1:CountryCode>
<ns1:STHRank>8</ns1:STHRank>
<ns1:RestockRank>0</ns1:RestockRank>
<ns1:Distance xsi:nil="true" />
</ns1:items>
</parameters>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Inventory Adjust
Required Parameters
The following parameters are always required for an inventory adjust request.
Element | Type | Description |
LocationName | xsd:string | Fulfillment location name. |
Items | impl:ArrayOf_impl_AdjustItem | Array of type AdjustItem |
Example Request
This request calls the method adjustInventory.
<<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="https://v3.client.coexprivate.api.shopatron.com">
<soapenv:Header>
<v3:AuthenticationHeader>
<v3:AccessKey>0</v3:AccessKey>
</v3:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<v3:AdjustRequest>
<v3:LocationName>0553293354</v3:LocationName>
<v3:Items>
<!--Zero or more repetitions:-->
<v3:items>
<v3:PartNumber>TransientItem0001</v3:PartNumber>
<v3:UPC>TransientItem0001</v3:UPC>
<v3:LocationUPC>TransientItem0001</v3:LocationUPC>
<v3:Quantity>1000</v3:Quantity>
<v3:BinID>0</v3:BinID>
</v3:items>
</v3:Items>
</v3:AdjustRequest>
</soapenv:Body>
</soapenv:Envelope>
Example Response
This sample demonstrates what might be returned by the successful request above.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://v3.client.coexprivate.api.shopatron.com">
<SOAP-ENV:Body>
<ns1:AdjustResponse>1024</ns1:AdjustResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Refresh Inventory
Required Parameters
The following parameters are always required for an inventory refresh request.
Element | Type | Description |
LocationName | xsd:string | Fulfillment location to refresh. |
Items | impl:ArrayOf_impl_AdjustItem | Array of type RefreshItem structure. |
RefreshItem | | |
PartNumber | xsd:string | Part Number. |
UPC | xsd:string | UPC. |
LocationUPC | xsd:string | Fulfillment Location UPC. |
BinID | xsd:int | Bin location to refresh. |
Quantity | xsd:int | Quantity to refresh. |
LTD | xsd:double | Life Time to Date value |
Floor | xsd:int | Floor for the Part Number |
SafetyStock | xsd:int | Safety Stock Level for the location bin |
Example Request
This example calls the refreshInventory method.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v3="https://v3.client.coexprivate.api.shopatron.com">
<soapenv:Header>
<v3:AuthenticationHeader>
<v3:AccessKey>0</v3:AccessKey>
</v3:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<v3:RefreshRequest>
<v3:LocationName>0553293354</v3:LocationName>
<v3:Items>
<v3:items>
<v3:PartNumber>TransientItem0001</v3:PartNumber>
<v3:UPC>TransientItem0001</v3:UPC>
<v3:LocationUPC>TransientItem0001</v3:LocationUPC>
<v3:Quantity>1000</v3:Quantity>
<v3:LTD>4</v3:LTD>
<v3:Floor>3</v3:Floor>
<v3:SafetyStock>2</v3:SafetyStock>
</v3:items>
</v3:Items>
</v3:RefreshRequest>
</soapenv:Body>
</soapenv:Envelope>
Example Response
This example demonstrates a response from the successful request above.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://v3.client.coexprivate.api.shopatron.com">
<SOAP-ENV:Body>
<ns1:RefreshResponse>10431</ns1:RefreshResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>