Retrieve stock status by ID

get

/ccstore/v1/stockStatus/{id}

Retrieves the stock status of a product.

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. It allows more accurate stock status information to be returned should errors occurred accessing inventory levels.

If multiple inventories are present you can optionally pass in the inventory location you wish to filter by. In order to do this pass in the ID of the location in the locationId header.

Request

Supported Media Types
Path Parameters
Query Parameters
  • 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.
  • Catalog ID of the product
  • When multiple inventories are defined specify the individual inventory location to use. If you wish to explicitly query the default inventory (no location id set) then use the 'NULL' id. If locationId is 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).
  • ID of the SKU of the product
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : getStockStatus_response
Type: object
Show Source
Example Response (application/json)
{
    "productId":"xprod2138",
    "preOrderableQuantity":0,
    "orderableQuantity":12,
    "locationId":"CRSHome-GlenAllen186",
    "stockStatus":"IN_STOCK",
    "availabilityDate":null,
    "backOrderableQuantity":0,
    "catRefId":"xsku2138",
    "inStockQuantity":12
}

Default Response

The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
Error CodeDescription
20030General error accessing product information
25100General error accessing inventory information
200104Catalog not accessible by current profile
200105Catalog does not exist
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top