Checking inventory levels
Learn how to retrieve the available quantity and time of inventory items.
In Digital River coordinated fulfillments, you can call the Inventory Levels API to access product availability information at individual warehouses. After you submit an inventory level request, each inventory level object contained in the response is associated with one inventory item and one location.
You can use an inventory level to sequence your checkout and provide product availability information to customers.
Submitting an inventory level request
When you submit a GET/inventory-levels
request, you're required to provide an array of inventory item identifiers as a query parameter.
You can also filter the results by when inventory levels were last updated, whether the product is available, and which warehouse locations can ship the product to a specific country.
If you don't apply any filters, each inventory item identifier you specify in the request returns one or more inventory level objects. However, the application of search filters, such as available
or shipToCountry
, may result in your query returning no results. For example, when you use the shipToCountry
filter (which must be formatted as an ISO 3166 country code), you'll only get inventory level information if the product can be shipped to that country.
An inventory level
After you successfully submit a GET/inventory-levels
request, a 200 OK
response contains a data
array. Each element of this array represents an inventory level.
When a product is located at a single warehouse, you get back one inventory level. However, when an product is warehoused at multiple locations, we provide the inventory level at each location.
An inventory level provides the unique identifier, warehouse location and availability of an inventory item. The object also indicates when the inventory level was last updated.
Product location
The locationId
represents the identifier of the fulfiller's warehouse that contains the inventory item.
Product availability
If the product is available
, then the availableQuantity
of the inventory level is greater than zero. In these cases, availableTime
is null and not returned.
If available
is false
, then availableTime
provides an estimated time when the product is scheduled for restocking (assuming the fulfiller has provided this information). When the fulfiller doesn’t provide an estimated restocking time, then availableTime
is null and not returned.
Using an inventory level
You can use an inventory level to provide product availability information to customers. During the checkout process, it can help you determine when to display or conceal a product on your storefront, notify customers when an item is almost out of stock or when it will be available again, display the remaining number of products in stock, and determine if an item is available for shipping to a specific country.
As an example, let's say you want to determine the availability of a coffee maker and whether it can be shipped to Sweden. To do this, submit a GET/inventory-levels
that specifies the inventory item identifier, the shipToCountry
as SE
, and sets available
to true
.
In this case, Digital River determines that a machine that can be shipped to Sweden is only available at one location, so the response returns just a single inventory-level object.
Your integration can also use an inventory level to determine whether to reserve an inventory item or create a fulfillment order.
Last updated