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(required): string
The 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: string
ID of the catalog.
-
includeDefaultLocationInventory: boolean
If set to true then inventory detail not associated with any particular location will be included alongside the location specific inventory details
-
locationIds: string
A comma-separated list of location IDs for which inventory detail information is to be retrieved
-
type: string
Type of data whose inventory information it to be retrieved. The options are "product" and "variant". Defaults to "variant".
Header Parameters
-
X-CCAsset-Language: string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getInventory_response
Type:
Show Source
object
-
availabilityDate:
string
Availability date of SKU. Date format is an ISO standard such as yyyy-MM-dd.
-
availabilityStatus:
integer
Availability status of SKU.
-
availabilityStatusMsg:
string
Availability status message of SKU.
-
availableToPromise:
string
Tells whether product is available to promise.
-
backorderLevel:
integer
Backorder level of SKU.
-
backorderThreshold:
integer
Backorder threshold of SKU.
-
displayName:
string
Display name of SKU.
-
inventoryId:
string
Inventory ID of SKU.
-
locationId:
string
Location ID of SKU.
-
locationInventoryInfo:
array locationInventoryInfo
-
preorderLevel:
integer
Preorder level of SKU.
-
preorderThreshold:
integer
Preorder threshold of SKU.
-
skuId:
string
SKU ID.
-
skuNumber:
string
SKU number.
-
stockLevel:
integer
Stock level of SKU.
-
stockThreshold:
integer
Stock threshold of SKU.
-
translations:
object translations
Product translated properties.
Nested Schema : translations
Type:
object
Product translated properties.
Nested Schema : items
Type:
Show Source
object
-
availabilityDate:
string
Availability date of variant. Date format is an ISO standard such as yyyy-MM-dd.
-
availabilityStatus:
integer
Availability status/ available count of the variant.
-
availabilityStatusMsg:
string
Availability status message of the variant.
-
availableToPromise:
string
Available to promise.
-
backorderLevel:
integer
Backorder level of the variant.
-
backorderThreshold:
integer
Backorder threshold of the variant.
-
displayName:
string
Display name of the variant.
-
inventoryId:
string
Inventory id of the variant.
-
locationId:
string
Location id.
-
preorderLevel:
integer
Preorder level of the variant.
-
preorderThreshold:
integer
Preorder threshold of the variant.
-
skuNumber:
string
SKU number of the variant.
-
stockLevel:
integer
Stock level of the variant.
-
stockThreshold:
integer
Stock threshold of the variant.
Example Response (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 Response
The error response
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code