listInventories

get

/ccadmin/v1/inventories

Lists the inventories. Optionally takes the X-CCAsset-Language header to get translated content in another language.

Request

Supported Media Types
Query Parameters
  • include non-geographic based inventory record in result, boolean true or false; default false
  • This field determines the number of records to be fetched per REST call.
  • comma separated list of location ids to retrieve inventories for
  • This field determines the offset/starting index from which data to be fetched.
  • comma separated list of product ids for which to retrive inventories, valid only when type = product
  • Query string built as per the SCIM standards that helps to search entered string across inventory properties like product's ???displayName??? and the childSku properties
  • show translations, boolean true or false; default false
  • This field determines if the total count should be returned or not.
  • inventory type, either variant or product. Defaults to variant
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

When locationIds query parameter is not passed, inventory info within each childSku will appear in a flat structure. When locationIds query parameter is passed, inventory info will appear within a 'locationInventoryInfo' JSON object within each childSku.
Body ()
Root Schema : listInventories_response
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : sort
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childSKUs
Type: array
Show Source
Nested Schema : translations
Type: object
Product translated properties.
Nested Schema : items
Type: object
Show Source
Nested Schema : locationInventoryInfo
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "totalResults":251,
    "offset":0,
    "limit":250,
    "links":[
        {
            "rel":"self",
            "href":"http://www.example.com/v1/inventories?type=product&includeDefaultLocationInventory=false"
        },
        {
            "rel":"next",
            "href":"http://www.example.com/v1/inventories?type=product&includeDefaultLocationInventory=false&offset=250&limit=1"
        }
    ],
    "sort":[
        {
            "property":"translations.1.displayName",
            "order":"asc"
        }
    ],
    "items":[
        {
            "childSKUs":[
                {
                    "skuNumber":"xsku2535_1",
                    "displayName":"A-Line Skirt",
                    "locationInventoryInfo":[
                        {
                            "preorderThreshold":0,
                            "backorderLevel":0,
                            "displayName":null,
                            "availabilityDate":null,
                            "availabilityStatusMsg":"inStock",
                            "stockThreshold":10,
                            "stockLevel":120,
                            "availableToPromise":null,
                            "skuNumber":null,
                            "preorderLevel":0,
                            "locationId":"loc1",
                            "translations":null,
                            "inventoryId":null,
                            "backorderThreshold":0,
                            "availabilityStatus":1000
                        }
                    ],
                    "skuId":"xsku2535_1"
                }
            ],
            "totalStockLevel":600,
            "id":"xprod2535"
        }
    ]
}
Example Response (description)
Example response when locationIds parameter is passed in request.

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: Error Code / Description ------------------ ------------------ 25100 / Internal inventory error 25101 / Missing product id 25134 / Inventory operation not supported for type 25135 / Invalid type 51003 / Invalid location id 85000 / Invalid query expression.
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