Real-time Inventory Check is a standout feature within the Inventory API that provides sellers with the ability to synchronize their inventory with eBay's platform instantaneously. This feature is particularly beneficial for sellers who manage their products across multiple sales channels with rapidly changing inventory levels. By enabling this feature and providing eBay with an API endpoint, eBay can make a call to this endpoint during the checkout process to ensure that the stock levels are accurate and that there is enough inventory to fulfill the order. This helps in maintaining accurate inventory levels, reducing order cancellations, and streamlining operations, thereby enhancing the buyer experience and optimizing seller operations. It's a valuable tool in an online marketplace where customer expectations for availability and fast delivery are high, and it helps sellers avoid stock discrepancies that can negatively impact their business
To enable this feature, a merchant must enable and provide an API endpoint to eBay. When building/enabling this endpoint, the merchant must make sure that one call can support multiple SKUs and inventory locations, and the response time should be 500 ms or less. This endpoint must include OAuth authentication.
Merchants who wish to enable Real-time Inventory Check can submit their endpoint through a DTS support ticket.
Note: Real Time Inventory Check is only available to users with a Premium Support Status of Active. For more information on Premium Technical Support, see Developer Technical Support.
Request from eBay to merchant
The call from eBay to the merchant will use the HTTP POST method. The POST method should not rely on application/x-www-form-urlencode, and it should use the Content-Type and Accept request headers, with both values set to application/json. The request payload will include the following:
- merchantLocationKey: this string is the unique identifier of the inventory location, and this identifier was created when the merchant first created the inventory location; this field is case-sensitive
- SKU: this string is the unique identifier of the inventory item, and this identifier was created when the merchant first created the inventory item; this field is case-sensitive
- fulfillmentType: this field takes one of the following enumeration values, based on the fulfillment type:
PICKUP_IN_STORE
,SHIP_TO_STORE
, orSHIP_TO_HOME
- requestedQuantity: this integer value is the purchase quantity
Below is a sample request in JSON format:
{
"locationID":"SUNNYVALE-123",
"SKU":"SKU1234",
"fulfillmentType":"SHIP_TO_HOME",
"requestedQuantity":10
}
Response from merchant to eBay
In the response, the merchant will be expected to return the following fields to eBay:
- isAvailable: this boolean indicates whether or not adequate quantity exists for the merchant to fulfill the order
- lastUpdated: this a UTC epoch timestamp that indicates when the last inventory check for the inventory item was performed
- totalAvailableQuantity: this integer value indicates the currently available quantity for the inventory item
Below is a sample response in JSON format:
{
"isAvailable": true,
"lastUpdated": 1371091052,
"totalAvailableQuantity":20
}
Behavior of API when issues occur
Below are some issues that may occur when eBay makes a call to the merchant's endpoint, and how the issue will be handled:
- API is unreachable or times out (no response returned within 500 milliseconds). If this issue occurs, the latest quantity on record with eBay is considered as the true inventory status, and checkout will be processed without the response from the merchant
- API returns as "out of stock" or zero quantity. This response will cause eBay to block the order and notify the buyer that the item is out of stock. The eBay offer/listing will be updated with an available quantity of 0
- API returns a quantity less than the purchase quantity (or, totalAvailableQuantity is less than requestedQuantity). Checkout is temporarily blocked, but eBay gives the buyer the option of buying up to the available quantity of the item. The available quantity of the eBay offer/listing is not updated unless the buyer chooses to purchase a lesser quantity of the item