This API allows the user to request the inventory information of an item or items that belong to a particular manufacturer. Note that this is a POST call instead of a GET as may be expected – in this inquiry, additional information is required in a request body to specify the inventory being retrieved.
Note that unlike other OMS APIs, there are two endpoints that may be used. Each endpoint is associated with a different API key related to a package – either an “Inventory V5” or “Inventory Specific” package. The Inventory Specific package is the preferred endpoint to use, but some implementations may use Inventory V5 depending on their configuration.
|Call – Inventory V5||https://integration.shopatron.com/api/v5/inventory|
|Call – Inventory Specific||https://integration.shopatron.com/inv/api/v5/inventory|
An example use of the Inventory API follows below, or view the sample Postman Collection.
The example case will inquire about an inventory with the following properties:
- Inventory of item “testsku120”
- At any location of manufacturer 00000 within 100 miles of Postal Code 11111
These parameters are necessary for the Inventory API to return a successful response:
|fulfillerID||integer||A unique identifier for a fulfiller. The minimum value is “0”.|
|manufacturerID||integer||A unique identifier for a manufacturer. The minimum value is “100”.|
|type||enum||The inventory request type (ALL, PARTIAL, ANY, ALL_STORES). See below for more details.|
|items||array||List of items to search on. The minimum length is 1. See below for more details.|
The type enum values are defined as:
|ALL||Only return locations that have ALL of the quantity available for ALL of the products in the request.|
|PARTIAL||Only locations that have the ALL of the quantity available for AT LEAST ONE of the products in the request, and only those products.|
|ANY||ANY location that has ANY quantity available for ANY of the products in the request.|
|ALL_STORES||ALL_STORES that are part of the location network will be returned, even if they have no inventory for the specified product.|
Each entry in the items array is an object that requires a quantity and any one of the other parameters in the table below:
|partNumber||string||The product part number. The minimum length is 1.|
|upc||string||The product’s Universal Product Code. The minimum length is 1.|
|sku||string||The product’s Stock Keeping Unit code. The minimum length is 1.|
|quantity||integer||The quantity of the product. The minimum value is “0”.|
Other possible parameters can be provided to specify other details about the product. These variables are:
|catalogID||integer||A unique identifier for the catalog. The minimum value is “0”.|
|requestLocation||object||The specific location that is being requested. See below for more details.|
|limit||integer||The maximum number of results to return, defaults to 100 for most. The minimum value is “0”.|
|locationWhitelist||array||List of numeric location identifiers that are allowed to be included in results.|
|locationBlacklist||array||List of numeric location identifiers that are NOT allowed to be included in results. This works like rejectedLocations.|
|locationWhitelistExternalIDs||array||List of external location identifiers that are allowed to be included in results.|
|locationBlacklistExternalIDs||array||List of external location identifiers that are NOT allowed to be included in results.|
|locationPriorityList||array||List of numeric location identifiers that should be returned before all others, preventing them from being excluded by limit. These identifiers should be Integers.|
|ignoreSafetyStock||boolean||Whether to ignore the safety stock buffer put in place. The default is “false”.|
|includeNegativeInventory||boolean||Whether to allow items with negative inventory in the results. The default is “false”.|
|shippingLocation||boolean||Whether to limit results to locations that are shipping enabled.|
|taxableLocation||boolean||Filter results by locations that apply tax (true) or don’t (false).|
|restockEnabled||boolean||Filter results by locations that are restock-enabled (true) or not (false).|
|pickupEnabled||boolean||Filter results by locations that are pickup-enabled (true) or not (false).|
|finderbotEnabled||boolean||Filter results by locations that have finderbot enabled (true) or don’t (false).|
|aggregateExportEnabled||boolean||Filter results by locations that have aggregate export enabled (true) or don’t (false).|
|hasStorefront||boolean||Filter results by locations that have physical storefronts (true) or don’t (false).|
The requestLocation details is an object that includes the following parameters to identify a single location that the inventory search should be made within range of. The longitude, latitude, or postal code are required.
|longitude||number||The longitude coordinate of this location.|
|latitude||number||The latitude coordinate of this location.|
|postalCode||string||The postal code of this location.|
|radius||number||The distance from the location. The minimum value is “0”.|
|unit||enum||The unit of distance used for the radius (“MILES” or “KM”). The default is “MILES”.|
|countryCode||string||The country code for this location.|
The Full Request
This is the entire request that will inquire about an inventory item from a particular manufacturer, within a particular postal code range.
The Full Response
This is the entire response of the inquiry. It returns with order data grouped by location. In this case there is only one location with inventory of this product, so there is only one block of data. If applicable, this response will also return the inventoryLocatorName (a parameter provided via the Refresh and Adjust APIs) to indicate where the inventory item can be found at the location.
If the particular configuration of OMS makes use of inventory attributes, those would be returned in this response as an array of strings. These attributes are cached in an inventory map with no expiration, so they can be retrieved as necessary for cases such as inventory replenishment.