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:
stringinventory type, either variant or product. defaults to variant
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe 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
- items
-
Type:
arrayitemsAdditional Properties Allowed:Array having SKU of product. - limit
-
Type:
integerLimit of number of products. - offset
-
Type:
integerOffset of product inventory. - sort
-
Type:
arraysortAdditional Properties Allowed:Array having order and property of product inventory. - totalResults
-
Type:
integerTotal number of products.
Nested Schema : items
Nested Schema : sort
Nested Schema : items
Type:
object- childSKUs
-
Type:
arraychildSKUsAdditional Properties Allowed:List of child skus. - displayName
-
Type:
stringDisplay name of the product. - id
-
Type:
stringID name of the product. - productNumber
-
Type:
stringProduct number of the product. - stockStatus
-
Type:
stringStock status of the product. - totalStockLevel
-
Type:
stringTotal stock level of the product.
Nested Schema : childSKUs
Nested Schema : items
Type:
object- availabilityDate
-
Type:
stringAvailability date of SKU. Date format is an ISO standard such as yyyy-MM-dd. - availabilityStatus
-
Type:
integerAvailability status of SKU. - availabilityStatusMsg
-
Type:
stringAvailability status message of SKU. - availableToPromise
-
Type:
stringAvailable to promise of SKU. - backorderLevel
-
Type:
integerBackorder level of SKU. - backorderThreshold
-
Type:
integerBackorder threshold of SKU. - displayName
-
Type:
stringDisplay name of SKU. - inventoryId
-
Type:
stringInventory ID of SKU. - locationId
-
Type:
stringLocation ID of SKU. - preorderLevel
-
Type:
integerPreorder level of SKU. - preorderThreshold
-
Type:
integerPreorder threshold of SKU. - skuId
-
Type:
stringSKU ID of SKU. - skuNumber
-
Type:
stringSKU number of SKU. - stockLevel
-
Type:
integerStock level of SKU. - stockThreshold
-
Type:
integerStock threshold of SKU.
Nested Schema : items
Type:
object- order
-
Type:
stringOrder of listing in product inventory. - property
-
Type:
stringDisplay name as a product property.
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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
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"
}]
}