getInventory
get
/ccstore/v1/inventories/{id}
Get Inventory. Get inventory information for a variant or product. 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:trueThe ID of the product or sku whose inventory detail information is to be retrieved. The ID given should correspond to the type given. So if the type is a product, a product ID has to be given here else a sku ID.
Query Parameters
- catalogId
-
Type:
stringID of the catalog.- includeDefaultLocationInventory
Type:booleanIf set to true then inventory detail not associated with any particular location will be included alongside the location specific inventory details- locationIds
Type:stringA comma-separated list of location IDs for which inventory detail information is to be retrieved- type
Type:stringType of data whose inventory information it to be retrieved. The options are "product" and "variant". Defaults to "variant".Header 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":"Block Table", "availabilityDate":null, "stockThreshold":0, "availabilityStatusMsg":"inStock", "stockLevel":12, "availableToPromise":null, "skuNumber":"xsku2125_1", "preorderLevel":0, "locationId":null, "translations":null, "inventoryId":null, "backorderThreshold":0, "links":[ { "rel":"self", "href":"http://localhost:8080/ccstore/v1/inventories/xsku2125_1?catalogId=null" } ], "availabilityStatus":1000, "skuId":"xsku2125_1" }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": "Block Table", "availabilityDate": null, "stockThreshold": 0, "availabilityStatusMsg": "inStock", "stockLevel": 12, "availableToPromise": null, "skuNumber": "xsku2125_1", "preorderLevel": 0, "locationId": null, "translations": null, "inventoryId": null, "backorderThreshold": 0, "links": [{ "rel": "self", "href": "http://localhost:8080/ccstore/v1/inventories/xsku2125_1?catalogId=null" }], "availabilityStatus": 1000, "skuId": "xsku2125_1" }