getInventory
get
/ccadmin/v1/inventories/{id}
Get Inventory. Get variant or product inventory information based on ID. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueID of the variant or product.
Query Parameters
- includeDefaultLocationInventory
-
Type:
booleanflag indicating whether to include the non-geographic default location inventory- locationIds
Type:stringa comma-separated list of location ids- type
Type:stringinventory type, either variant or product. defaults to variantHeader Parameters- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : getInventory_response- example with locationIds
-
Type:
objectexample with locationIdsAdditional Properties Allowed:Result object with locationIds. - example without locationIds
-
Type:
objectexample without locationIdsAdditional Properties Allowed:Result object without locationIds.
Nested Schema : example with locationIdsType:objectResult object with locationIds.- If the selected case was a product.
-
Type:
objectIf the selected case was a product.Additional Properties Allowed:Result object if type is product. - If the selected case was a variant.
-
Type:
objectIf the selected case was a variant.Additional Properties Allowed:Result object if type is variant.
Nested Schema : example without locationIdsType:objectResult object without locationIds.- If the selected case was a product.
-
Type:
objectIf the selected case was a product.Additional Properties Allowed:Result object if type is product. - If the selected case was a variant.
-
Type:
objectIf the selected case was a variant.Additional Properties Allowed:Result object if type is variant.
Nested Schema : If the selected case was a product.Type:objectResult object if type is product.- childSKUs
-
Type:
arraychildSKUsAdditional Properties Allowed:List of SKU's for the product. - id
-
Type:
stringThe ID of the product. - stockStatus
-
Type:
stringThe current stock status of the product (inStock or outOfStock). - totalStockLevel
-
Type:
integerThe total stock level of the product.
Nested Schema : If the selected case was a variant.Type:objectResult object if type is variant.- displayName
-
Type:
stringThe display name of the SKU. - locationInventoryInfo
-
Type:
arraylocationInventoryInfoAdditional Properties Allowed:Location specific inventory information - skuId
-
Type:
stringThe SKU ID of the SKU. - skuNumber
-
Type:
stringThe SKU number of the SKU.
Nested Schema : childSKUsNested Schema : itemsType:object- displayName
-
Type:
stringThe display name of the SKU. - locationInventoryInfo
-
Type:
arraylocationInventoryInfoAdditional Properties Allowed:Location specific inventory information - skuId
-
Type:
stringThe SKU ID of the SKU. - skuNumber
-
Type:
stringThe SKU number of the SKU.
Nested Schema : locationInventoryInfoNested Schema : itemsType:object- availabilityDate
-
Type:
stringThe date when the SKU will be available. - availabilityStatus
-
Type:
integerThe availability status of the child SKU. - availabilityStatusMsg
-
Type:
stringThe current availability status of the child SKU. - availableToPromise
-
Type:
stringThe available to promise of the child SKU. - backorderLevel
-
Type:
integerThe back-order level of the child SKU. - backorderThreshold
-
Type:
integerThe back-order threshold of the child SKU. - inventoryId
-
Type:
stringThe inventory ID of the SKU. - locationId
-
Type:
stringThe location ID of the child SKU. - preorderLevel
-
Type:
integerThe pre-order level of the child SKU. - preorderThreshold
-
Type:
integerThe pre-order threshold of the child SKU. - stockLevel
-
Type:
integerThe stock level of the SKU. - stockThreshold
-
Type:
integerThe stock threshold of the child SKU.
Nested Schema : locationInventoryInfoNested Schema : itemsType:object- availabilityDate
-
Type:
stringThe date when the SKU will be available. - availabilityStatus
-
Type:
integerThe availability status of the child SKU. - availabilityStatusMsg
-
Type:
stringThe current availability status of the child SKU. - availableToPromise
-
Type:
stringThe available to promise of the child SKU. - backorderLevel
-
Type:
integerThe back-order level of the child SKU. - backorderThreshold
-
Type:
integerThe back-order threshold of the child SKU. - inventoryId
-
Type:
stringThe inventory ID of the SKU. - locationId
-
Type:
stringThe location ID of the child SKU. - preorderLevel
-
Type:
integerThe pre-order level of the child SKU. - preorderThreshold
-
Type:
integerThe pre-order threshold of the child SKU. - stockLevel
-
Type:
integerThe stock level of the SKU. - stockThreshold
-
Type:
integerThe stock threshold of the child SKU.
Nested Schema : If the selected case was a product.Type:objectResult object if type is product.- childSKUs
-
Type:
arraychildSKUsAdditional Properties Allowed:List of SKU's for the product. - id
-
Type:
stringThe ID of the product. - stockStatus
-
Type:
stringThe current stock status of the product (inStock or outOfStock). - totalStockLevel
-
Type:
integerThe total stock level of the product.
Nested Schema : If the selected case was a variant.Type:objectResult object if type is variant.- availabilityDate
-
Type:
stringThe date when the SKU will be available. - availabilityStatus
-
Type:
integerThe availability status of the child SKU. - availabilityStatusMsg
-
Type:
stringThe current availability status of the child SKU. - availableToPromise
-
Type:
stringThe available to promise of the child SKU. - backorderLevel
-
Type:
integerThe back-order level of the child SKU. - backorderThreshold
-
Type:
integerThe back-order threshold of the child SKU. - displayName
-
Type:
stringThe display name of the SKU. - inventoryId
-
Type:
stringThe inventory ID of the SKU. - locationId
-
Type:
stringThe location ID of the child SKU. - preorderLevel
-
Type:
integerThe pre-order level of the child SKU. - preorderThreshold
-
Type:
integerThe pre-order threshold of the child SKU. - skuId
-
Type:
stringThe SKU ID of the SKU. - skuNumber
-
Type:
stringThe SKU number of the SKU. - stockLevel
-
Type:
integerThe stock level of the SKU. - stockThreshold
-
Type:
integerThe stock threshold of the child SKU.
Nested Schema : childSKUsNested Schema : itemsType:object- availabilityDate
-
Type:
stringThe date when the SKU will be available. - availabilityStatus
-
Type:
integerThe availability status of the child SKU. - availabilityStatusMsg
-
Type:
stringThe current availability status of the child SKU. - availableToPromise
-
Type:
stringThe available to promise of the child SKU. - backorderLevel
-
Type:
integerThe back-order level of the child SKU. - backorderThreshold
-
Type:
integerThe back-order threshold of the child SKU. - displayName
-
Type:
stringThe display name of the SKU. - inventoryId
-
Type:
stringThe inventory ID of the SKU. - locationId
-
Type:
stringThe location ID of the child SKU. - preorderLevel
-
Type:
integerThe pre-order level of the child SKU. - preorderThreshold
-
Type:
integerThe pre-order threshold of the child SKU. - skuId
-
Type:
stringThe SKU ID of the SKU. - skuNumber
-
Type:
stringThe SKU number of the SKU. - stockLevel
-
Type:
integerThe stock level of the SKU. - stockThreshold
-
Type:
integerThe stock threshold of the child SKU.
Example application/json
{ "preorderThreshold":0, "backorderLevel":0, "displayName":"Cargo Pants", "availabilityDate":null, "stockThreshold":5, "availabilityStatusMsg":"inStock", "stockLevel":12, "availableToPromise":null, "skuNumber":"sku40015", "preorderLevel":0, "locationId":null, "inventoryId":null, "backorderThreshold":0, "links":[ { "rel":"self", "href":"http://www.example.com/v1/inventories/sku40015?locationId=wa-seattle" } ], "availabilityStatus":1000, "locationInventoryInfo":null, "skuId":"sku40015" }Default ResponseThe error responseBodyRoot Schema : errorModelType: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 : errorsNested Schema : itemsType: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:
{ "preorderThreshold": 0, "backorderLevel": 0, "displayName": "Cargo Pants", "availabilityDate": null, "stockThreshold": 5, "availabilityStatusMsg": "inStock", "stockLevel": 12, "availableToPromise": null, "skuNumber": "sku40015", "preorderLevel": 0, "locationId": null, "inventoryId": null, "backorderThreshold": 0, "links": [{ "rel": "self", "href": "http://www.example.com/v1/inventories/sku40015?locationId=wa-seattle" }], "availabilityStatus": 1000, "locationInventoryInfo": null, "skuId": "sku40015" }