Retrieve stock statuses
/ccstore/v1/stockStatus
This endpoint requires a product ID or list of product IDs in order to retrieve stock status.
This endpoint by default returns all stock statuses. It is recommended that you set the optional query parameter actualStockStatus
to true. It is false by default to avoid backwards compatibility issues with older clients using this endpoint, but it allows more accurate stock status information to be returned should errors occurred accessing inventory levels.
Additionally you can optionally filter the retrieved stock statuses to exclude specific stock statuses such as out of stock.
Furthermore if multiple inventories are defined, you can optionally pass in the inventory locations you wish to filter by. In order to do this, pass in the IDs of the locations in the locationIds
header.
Request
- application/json
-
actualStockStatus(optional): boolean
When this parameter is true, the actual stock status of the product / sku will be returned to the client. By default, we show all products / skus as in stock when the stock level is 0.Default Value:
false
-
catalogId(optional): string
The catalog ID of the products.
-
excludeStatus(optional): string
Set to OUT_OF_STOCK to exclude out of stock items in response
-
expandStockDetails(optional): boolean
Flag to include all the stock details for each SKU when the skuId is not sent as part of the query.Default Value:
false
-
locationIds(optional): string
Inventory location ids separated by comma. When multiple inventories exist specify which inventory location(s) to query. If you wish to explicitly query the default inventory (no location id set) then use the 'NULL' id. If locationIds are not specified then the query will default to use the site's inventory location id if set, otherwise the query will use the default inventory (no location id set).
-
products: string
Product ids separated by comma. Supports the productId:skuId format to narrow down the results to a particular sku.
-
X-CCAsset-Language(optional): string
The asset language of the request
Response
- application/json
200 Response
object
-
items(optional):
array items
List of products along with stock statuses and orderable quantities
array
object
-
availabilityDate(optional):
string
Availability date of the product
-
backOrderableQuantity(optional):
integer
Quantity that can be backordered
-
catalogId(optional):
string
Catalog id of the product
-
catRefId(optional):
string
Sku reference id
-
inStockQuantity(optional):
integer
Quantity that is in stock
-
locationId(optional):
string
Inventory location id of the product
-
orderableQuantity(optional):
integer
Maximum quantity that can be ordered
-
preOrderableQuantity(optional):
integer
Quantity that can be preordered
-
productId(optional):
string
ID of the product
-
stockStatus(optional):
string
Stock status of the product
[
{
"catalogId":"cloudLakeCatalog",
"productId":"prod10011",
"preOrderableQuantity":0,
"orderableQuantity":95,
"stockStatus":"IN_STOCK",
"availabilityDate":null,
"backOrderableQuantity":50,
"catRefId":"sku10024",
"inStockQuantity":25
},
{
"catalogId":"cloudLakeCatalog",
"productId":"Product_9E",
"preOrderableQuantity":50,
"orderableQuantity":95,
"locationId":"CRSHome-GlenAllen186",
"stockStatus":"IN_STOCK",
"availabilityDate":null,
"backOrderableQuantity":0,
"catRefId":"Sku_9F",
"inStockQuantity":25
},
{
"catalogId":"cloudLakeCatalog",
"productId":"Product_9E",
"preOrderableQuantity":50,
"orderableQuantity":95,
"locationId":"CRSHome-GlenAllen187",
"stockStatus":"IN_STOCK",
"availabilityDate":null,
"backOrderableQuantity":0,
"catRefId":"Sku_9F",
"inStockQuantity":25
},
{
"catalogId":"null",
"productId":"Product_9E",
"locationId":"CRSHome-GlenAllen186",
"stockStatus":"OUT_OF_STOCK",
"catRefId":"Sku_9F"
}
]
Default Response
Error Code | Description | >
---|---|
20030 | General error accessing product information |
25100 | General error accessing inventory information |
200104 | Catalog not accessible by current profile |
200105 | Catalog does not exist |
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
array
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code