listInventories

get

/ccadmin/v1/inventories

List Inventories. Lists the inventories. Optionally takes the x-ccasset-language header to get translated content in another language.

Request

Supported Media Types
  • application/json
Query Parameters
type
Type: string
inventory type, either variant or product. defaults to variant
Header Parameters
X-CCAsset-Language
Type: string
The asset language of the request

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listInventories_response
Nested Schema : items
Type: array
Array having SKU of product.
Nested Schema : sort
Type: array
Array having order and property of product inventory.
Nested Schema : items
Type: object
Nested Schema : childSKUs
Type: array
List of child skus.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example 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":[
                {
                    "preorderThreshold":0,
                    "backorderLevel":0,
                    "displayName":"A-Line Skirt",
                    "availabilityDate":null,
                    "stockThreshold":0,
                    "availabilityStatusMsg":"inStock",
                    "stockLevel":100,
                    "availableToPromise":null,
                    "skuNumber":"xsku2535_1",
                    "preorderLevel":0,
                    "locationId":null,
                    "inventoryId":null,
                    "backorderThreshold":0,
                    "availabilityStatus":1000,
                    "locationInventoryInfo":null,
                    "skuId":"xsku2535_1"
                }
            ],
            "totalStockLevel":600,
            "id":"xprod2535"
        }
    ]
}
Default Response
The error response
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "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": [{
      "preorderThreshold": 0,
      "backorderLevel": 0,
      "displayName": "A-Line Skirt",
      "availabilityDate": null,
      "stockThreshold": 0,
      "availabilityStatusMsg": "inStock",
      "stockLevel": 100,
      "availableToPromise": null,
      "skuNumber": "xsku2535_1",
      "preorderLevel": 0,
      "locationId": null,
      "inventoryId": null,
      "backorderThreshold": 0,
      "availabilityStatus": 1000,
      "locationInventoryInfo": null,
      "skuId": "xsku2535_1"
    }],
    "totalStockLevel": 600,
    "id": "xprod2535"
  }]
}