Inventory status Learn how to retrieve a product's inventory status.
Getting the inventory status for one or more products
The following GET /v1/shoppers/me/products/inventory-status
request gets the inventory for a specific product. You can use either the product identifier or an external reference identifier as a query parameter. Passing an invalid product identifier or external reference identifier will be ignored. The request returns an empty collection with a 200 status if you do not provide an identifier.
cURL 200 OK response
Copy curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/products/inventory-status' \
--header 'authorization: bearer ***\
...
Copy {
"products" : {
"uri" : "https://api.digitalriver.com/v1/shoppers/me/products/inventorystatus" ,
"inventoryStatus" : [
{
"uri" : "https://api.digitalriver.com/v1/shoppers/me/products/64578500/inventory-status" ,
"product" : [
{
"uri" : "https://api.digitalriver.com/v1/shoppers/me/products/64578500" ,
"id" : 64578500 ,
"externalReferenceId" : "Test External Reference Number" ,
"companyId" : "demosft1"
}
] ,
"availableQuantity" : 2147483647 ,
"availableQuantityIsEstimated" : "false" ,
"productIsInStock" : "true" ,
"productIsAllowsBackorders" : "true" ,
"productIsTracked" : "false" ,
"requestedQuantityAvailable" : "true" ,
"status" : "PRODUCT_INVENTORY_IN_STOCK" ,
"statusIsEstimated" : "false" ,
"expectedInStockDate" : "string" ,
"customStockMessage" : "string"
}
]
}
}
Getting the inventory status for a specific product
The following GET /v1/shoppers/me/products/{productId}/inventory-status request gets the inventory for a specific product identifier (productId
). You must provide the productId
.
cURL Second Tab
Copy curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/products/{productId}/inventorystatus' \
--header 'Authorization: Basic ***' \
...
Copy {
"inventoryStatus" : {
"uri" : "https://api.digitalriver.com/v1/shoppers/me/products/64578500/inventory-status" ,
"product" : [
{
"uri" : "https://api.digitalriver.com/v1/shoppers/me/products/64578500" ,
"id" : 64578500 ,
"externalReferenceId" : "Test External Reference Number" ,
"companyId" : "demosft1"
}
] ,
"availableQuantity" : 2147483647 ,
"availableQuantityIsEstimated" : "false" ,
"productIsInStock" : "true" ,
"productIsAllowsBackorders" : "true" ,
"productIsTracked" : "false" ,
"requestedQuantityAvailable" : "true" ,
"status" : "PRODUCT_INVENTORY_IN_STOCK" ,
"statusIsEstimated" : "false" ,
"expectedInStockDate" : "string" ,
"customStockMessage" : "string"
}
}