Retrieve stock statuses

get

/ccstore/v1/stockStatus

Retrieves the stock statuses and orderable quantity details of all the items specified.

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

Supported Media Types
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.
    Default Value: false
  • The catalog ID of the products.
  • Set to OUT_OF_STOCK to exclude out of stock items in response
  • Flag to include all the stock details for each SKU when the skuId is not sent as part of the query.
    Default Value: false
  • 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).
  • Product ids separated by comma. Supports the productId:skuId format to narrow down the results to a particular sku.
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

Returned when the operation succeeds.
Body ()
Root Schema : getStockStatuses_response
Type: object
Show Source
Nested Schema : items
Type: array
List of products along with stock statuses and orderable quantities
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
[
    {
        "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

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