getInventory
get
/ccadmin/v1/inventories/{id}
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: string
id of the variant or product
Query Parameters
-
catalogId(optional): string
id of catalog
-
includeDefaultLocationInventory(optional): boolean
flag indicating whether to include the non-geographic default location inventory
-
locationIds(optional): string
a comma-separated list of location ids
-
showTranslations(optional): string
show translations, boolean true or false; default false
-
type(optional): string
inventory type, either variant or product, defaults to variant
Header Parameters
-
X-CCAsset-Language(optional): string
asset language of the request
Response
Supported Media Types
- application/json
200 Response
Success response.
Root Schema : getInventory_response
Type:
Show Source
object
-
example with locationIds(optional):
object example with locationIds
Result object with locationIds.
-
example without locationIds(optional):
object example without locationIds
Result object without locationIds.
Nested Schema : example with locationIds
Type:
object
Result object with locationIds.
Show Source
-
If the selected case was a product.(optional):
object If the selected case was a product.
Result object if type is product.
-
If the selected case was a variant.(optional):
object If the selected case was a variant.
Result object if type is variant.
Nested Schema : example without locationIds
Type:
object
Result object without locationIds.
Show Source
-
If the selected case was a product.(optional):
object If the selected case was a product.
Result object if type is product.
-
If the selected case was a variant.(optional):
object If the selected case was a variant.
Result object if type is variant.
Nested Schema : If the selected case was a product.
Type:
object
Result object if type is product.
Show Source
-
childSKUs(optional):
array childSKUs
List of SKU's for the product.
-
id(optional):
string
The ID of the product.
-
stockStatus(optional):
string
The current stock status of the product (inStock or outOfStock).
-
totalStockLevel(optional):
integer
The total stock level of the product.
Nested Schema : If the selected case was a variant.
Type:
object
Result object if type is variant.
Show Source
-
displayName(optional):
string
The display name of the SKU.
-
locationInventoryInfo(optional):
array locationInventoryInfo
Location specific inventory information
-
skuId(optional):
string
The SKU ID of the SKU.
-
skuNumber(optional):
string
The SKU number of the SKU.
Nested Schema : items
Type:
Show Source
object
-
displayName(optional):
string
The display name of the SKU.
-
locationInventoryInfo(optional):
array locationInventoryInfo
Location specific inventory information
-
skuId(optional):
string
The SKU ID of the SKU.
-
skuNumber(optional):
string
The SKU number of the SKU.
Nested Schema : locationInventoryInfo
Type:
array
Location specific inventory information
Show Source
Nested Schema : items
Type:
Show Source
object
-
availabilityDate(optional):
string
The date when the SKU will be available.
-
availabilityStatus(optional):
integer
The availability status of the child SKU.
-
availabilityStatusMsg(optional):
string
The current availability status of the child SKU.
-
availableToPromise(optional):
string
The available to promise of the child SKU.
-
backorderLevel(optional):
integer
The back-order level of the child SKU.
-
backorderThreshold(optional):
integer
The back-order threshold of the child SKU.
-
inventoryId(optional):
string
The inventory ID of the SKU.
-
locationId(optional):
string
The location ID of the child SKU.
-
preorderLevel(optional):
integer
The pre-order level of the child SKU.
-
preorderThreshold(optional):
integer
The pre-order threshold of the child SKU.
-
stockLevel(optional):
integer
The stock level of the SKU.
-
stockThreshold(optional):
integer
The stock threshold of the child SKU.
Nested Schema : locationInventoryInfo
Type:
array
Location specific inventory information
Show Source
Nested Schema : items
Type:
Show Source
object
-
availabilityDate(optional):
string
The date when the SKU will be available.
-
availabilityStatus(optional):
integer
The availability status of the child SKU.
-
availabilityStatusMsg(optional):
string
The current availability status of the child SKU.
-
availableToPromise(optional):
string
The available to promise of the child SKU.
-
backorderLevel(optional):
integer
The back-order level of the child SKU.
-
backorderThreshold(optional):
integer
The back-order threshold of the child SKU.
-
inventoryId(optional):
string
The inventory ID of the SKU.
-
locationId(optional):
string
The location ID of the child SKU.
-
preorderLevel(optional):
integer
The pre-order level of the child SKU.
-
preorderThreshold(optional):
integer
The pre-order threshold of the child SKU.
-
stockLevel(optional):
integer
The stock level of the SKU.
-
stockThreshold(optional):
integer
The stock threshold of the child SKU.
Nested Schema : If the selected case was a product.
Type:
object
Result object if type is product.
Show Source
-
childSKUs(optional):
array childSKUs
List of SKU's for the product.
-
id(optional):
string
The ID of the product.
-
stockStatus(optional):
string
The current stock status of the product (inStock or outOfStock).
-
totalStockLevel(optional):
integer
The total stock level of the product.
Nested Schema : If the selected case was a variant.
Type:
object
Result object if type is variant.
Show Source
-
availabilityDate(optional):
string
The date when the SKU will be available.
-
availabilityStatus(optional):
integer
The availability status of the child SKU.
-
availabilityStatusMsg(optional):
string
The current availability status of the child SKU.
-
availableToPromise(optional):
string
The available to promise of the child SKU.
-
backorderLevel(optional):
integer
The back-order level of the child SKU.
-
backorderThreshold(optional):
integer
The back-order threshold of the child SKU.
-
displayName(optional):
string
The display name of the SKU.
-
inventoryId(optional):
string
The inventory ID of the SKU.
-
locationId(optional):
string
The location ID of the child SKU.
-
preorderLevel(optional):
integer
The pre-order level of the child SKU.
-
preorderThreshold(optional):
integer
The pre-order threshold of the child SKU.
-
skuId(optional):
string
The SKU ID of the SKU.
-
skuNumber(optional):
string
The SKU number of the SKU.
-
stockLevel(optional):
integer
The stock level of the SKU.
-
stockThreshold(optional):
integer
The stock threshold of the child SKU.
Nested Schema : items
Type:
Show Source
object
-
availabilityDate(optional):
string
The date when the SKU will be available.
-
availabilityStatus(optional):
integer
The availability status of the child SKU.
-
availabilityStatusMsg(optional):
string
The current availability status of the child SKU.
-
availableToPromise(optional):
string
The available to promise of the child SKU.
-
backorderLevel(optional):
integer
The back-order level of the child SKU.
-
backorderThreshold(optional):
integer
The back-order threshold of the child SKU.
-
displayName(optional):
string
The display name of the SKU.
-
inventoryId(optional):
string
The inventory ID of the SKU.
-
locationId(optional):
string
The location ID of the child SKU.
-
preorderLevel(optional):
integer
The pre-order level of the child SKU.
-
preorderThreshold(optional):
integer
The pre-order threshold of the child SKU.
-
skuId(optional):
string
The SKU ID of the SKU.
-
skuNumber(optional):
string
The SKU number of the SKU.
-
stockLevel(optional):
integer
The stock level of the SKU.
-
stockThreshold(optional):
integer
The stock threshold of the child SKU.
Example Response (application/json)
{
"skuNumber":"sku40015",
"displayName":"Cargo Pants",
"links":[
{
"rel":"self",
"href":"http://www.example.com/v1/inventories/sku40015?locationId=wa-seattle"
}
],
"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":"sku40015"
}
Example Response (description)
Example response when locationIds parameter is passed in request
Default Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code