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
-
availabilityDate(optional):
string
Availability date of SKU. Date format is an ISO standard such as yyyy-MM-dd.
-
availabilityStatus(optional):
integer
Availability status of SKU.
-
availabilityStatusMsg(optional):
string
Availability status message of SKU.
-
availableToPromise(optional):
string
Tells whether product is available to promise.
-
backorderLevel(optional):
integer
Backorder level of SKU.
-
backorderThreshold(optional):
integer
Backorder threshold of SKU.
-
displayName(optional):
string
Display name of SKU.
-
inventoryId(optional):
string
Inventory ID of SKU.
-
locationId(optional):
string
Location ID of SKU.
-
locationInventoryInfo(optional):
array locationInventoryInfo
-
preorderLevel(optional):
integer
Preorder level of SKU.
-
preorderThreshold(optional):
integer
Preorder threshold of SKU.
-
skuId(optional):
string
SKU ID.
-
skuNumber(optional):
string
SKU number.
-
stockLevel(optional):
integer
Stock level of SKU.
-
stockThreshold(optional):
integer
Stock threshold of SKU.
-
translations(optional):
object translations
Product translated properties.
Nested Schema : translations
Type:
object
Product translated properties.
Nested Schema : items
Type:
Show Source
object
-
availabilityDate(optional):
string
Availability date of variant. Date format is an ISO standard such as yyyy-MM-dd.
-
availabilityStatus(optional):
integer
Availability status/ available count of the variant.
-
availabilityStatusMsg(optional):
string
Availability status message of the variant.
-
availableToPromise(optional):
string
Available to promise.
-
backorderLevel(optional):
integer
Backorder level of the variant.
-
backorderThreshold(optional):
integer
Backorder threshold of the variant.
-
displayName(optional):
string
Display name of the variant.
-
inventoryId(optional):
string
Inventory id of the variant.
-
locationId(optional):
string
Location id.
-
preorderLevel(optional):
integer
Preorder level of the variant.
-
preorderThreshold(optional):
integer
Preorder threshold of the variant.
-
skuNumber(optional):
string
SKU number of the variant.
-
stockLevel(optional):
integer
Stock level of the variant.
-
stockThreshold(optional):
integer
Stock threshold of the variant.
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