Inventory Inquiry

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

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 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.

In either case, the request body and parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoints, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.

V5 Production URLhttps://{tenantId}-translation.mozu.com/api/v5/inventory
V5 Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v5/inventory
Inventory Specific Production URLhttps://{tenantId}-translation.mozu.com/inv/api/v5/inventory/
Inventory Specific Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/inv/api/v5/inventory/
Supported FormatsJSON
HTTP MethodPOST

Example

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

Required Parameters

These parameters are necessary for the Inventory API to return a successful response:

ParameterTypeDescription
fulfillerIDintegerA unique identifier for a fulfiller. The minimum value is “0”.
manufacturerIDintegerA unique identifier for a manufacturer. The minimum value is “100”.
typeenumThe inventory request type (ALL, PARTIAL, ANY, ALL_STORES). See below for more details.
itemsarrayList of items to search on. The minimum length is 1. See below for more details.

The type enum values are defined as:

ValueDescription
ALLReturns locations that have the full quantity available for all of the products in the request.
PARTIALReturns locations that have the full quantity available for at least one of the products in the request.
ANYReturns locations that have any quantity available for any of the products in the request.
ALL_STORESReturns all stores that are part of the location network and their inventory levels, even if they have no current inventory available for a product in the request.

Each entry in the items array is an object that requires a quantity and any one of the other parameters in the table below:

ParameterTypeDescription
partNumberstringThe product part number. The minimum length is 1.
upcstringThe product’s Universal Product Code. The minimum length is 1.
skustringThe product’s Stock Keeping Unit code. The minimum length is 1.
quantityintegerThe quantity of the product. The minimum value is “0”.

Optional Parameters

Other possible parameters can be provided to specify other details about the product. These variables are:

ParameterTypeDescription
catalogIDintegerA unique identifier for the catalog. The minimum value is “0”.
requestLocationobjectThe specific location that is being requested. See below for more details.
limitintegerThe maximum number of results to return, defaults to 100 for most. The minimum value is “0”.
locationWhitelistarrayList of numeric location identifiers that are allowed to be included in results.
locationBlacklistarrayList of numeric location identifiers that are NOT allowed to be included in results. This works like rejectedLocations.
locationWhitelistExternalIDsarrayList of external location identifiers that are allowed to be included in results.
locationBlacklistExternalIDsarrayList of external location identifiers that are NOT allowed to be included in results.
locationPriorityListarrayList of numeric location identifiers that should be returned before all others, preventing them from being excluded by limit. These identifiers should be Integers.
ignoreSafetyStockbooleanWhether to ignore the safety stock buffer put in place. The default is “false”.
includeNegativeInventorybooleanWhether to allow items with negative inventory in the results. The default is “false”.
shippingLocationbooleanWhether to limit results to locations that are shipping enabled.
taxableLocationbooleanFilter results by locations that apply tax (true) or don’t (false).
restockEnabledbooleanFilter results by locations that are restock-enabled (true) or not (false).
pickupEnabledbooleanFilter results by locations that are pickup-enabled (true) or not (false).
finderbotEnabledbooleanFilter results by locations that have finderbot enabled (true) or don’t (false).
aggregateExportEnabledbooleanFilter results by locations that have aggregate export enabled (true) or don’t (false).
hasStorefrontbooleanFilter 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.

ParameterTypeDescription
longitudenumberThe longitude coordinate of this location.
latitudenumberThe latitude coordinate of this location.
postalCodestringThe postal code of this location.
radiusnumberThe distance from the location. The minimum value is “0”.
unitenumThe unit of distance used for the radius (“MILES” or “KM”). The default is “MILES”.
countryCodestringThe 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.

{
 "manufacturerID": "00000",
 "fulfillerID": "010101",
 "includeNegativeInventory":true,
 "type": "ANY",
 "requestLocation":{
    "postalCode": "11111",
    "radius": 100,
    "unit": "MILES",
    "countryCode": "US"
 }, 
 "items": [{
  "partNumber": "testsku120",
  "quantity": 1
 }]
}

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.

[
 {
 "locationName": "1",
 "locationID": 111111,
 "manufacturerID": 00000,
 "onHand": 101,
 "available": 94,
 "partNumber": "testsku120"
 "sku": "testsku120",
 "ltd": 0,
 "floor": 0,
 "safetyStock": 0,
 "distance": 0,
 "shippingLocation": true,
 "restockEnabled": false,
 "pickupEnabled": true,
 "countryCode": "US",
 "finderbotEnabled": false,
 "hasStorefront": false,
 }
]