listInventories
get
/ccadmin/v1/inventories
Lists the inventories. Optionally takes the X-CCAsset-Language header to get translated content in another language.
Request
Supported Media Types
- application/json
Query Parameters
-
includeDefaultLocationInventory(optional): string
include non-geographic based inventory record in result, boolean true or false; default false
-
limit(optional): integer
This field determines the number of records to be fetched per REST call.
-
locationIds(optional): string
comma separated list of location ids to retrieve inventories for
-
offset(optional): integer
This field determines the offset/starting index from which data to be fetched.
-
productIds(optional): string
comma separated list of product ids for which to retrive inventories, valid only when type = product
-
q(optional): string
Query string built as per the SCIM standards that helps to search entered string across inventory properties like product's ???displayName??? and the childSku properties
-
showTranslations(optional): string
show translations, boolean true or false; default false
-
totalResults(optional): boolean
This field determines if the total count should be returned or not.
-
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
When locationIds query parameter is not passed, inventory info within each childSku will appear in a flat structure.
When locationIds query parameter is passed, inventory info will appear within a 'locationInventoryInfo' JSON object within each childSku.
Root Schema : listInventories_response
Type:
Show Source
object
-
items(optional):
array items
-
limit(optional):
integer
Limit of number of products.
-
offset(optional):
integer
Offset of product inventory.
-
sort(optional):
array sort
-
totalResults(optional):
integer
Total number of products.
Nested Schema : items
Type:
Show Source
object
-
childSKUs(optional):
array childSKUs
-
displayName(optional):
string
Display name of the product.
-
id(optional):
string
ID name of the product.
-
productNumber(optional):
string
Product number of the product. Product only.
-
stockStatus(optional):
string
Stock status of the product.
-
totalStockLevel(optional):
integer
Total stock level of the product.
-
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 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
Available to promise of SKU.
-
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 of SKU.
-
skuNumber(optional):
string
SKU number of SKU.
-
stockLevel(optional):
integer
Stock level of SKU.
-
stockThreshold(optional):
integer
Stock threshold of SKU.
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.
Nested Schema : items
Type:
Show Source
object
-
order(optional):
string
Direction of sort.
-
property(optional):
string
Name of property sorted by.
Example Response (application/json)
{
"totalResults":251,
"offset":0,
"limit":250,
"links":[
{
"rel":"self",
"href":"http://www.example.com/v1/inventories?type=product&includeDefaultLocationInventory=false"
},
{
"rel":"next",
"href":"http://www.example.com/v1/inventories?type=product&includeDefaultLocationInventory=false&offset=250&limit=1"
}
],
"sort":[
{
"property":"translations.1.displayName",
"order":"asc"
}
],
"items":[
{
"childSKUs":[
{
"skuNumber":"xsku2535_1",
"displayName":"A-Line Skirt",
"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":"xsku2535_1"
}
],
"totalStockLevel":600,
"id":"xprod2535"
}
]
}
Example Response (description)
Example response when locationIds parameter is passed in request.
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
Error Code / Description
------------------ ------------------
25100 / Internal inventory error
25101 / Missing product id
25134 / Inventory operation not supported for type
25135 / Invalid type
51003 / Invalid location id
85000 / Invalid query expression.
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