updateInventory
put
/ccadmin/v1/inventories/{id}
Update inventory information based on ID.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
id of the variant
Query Parameters
-
showTranslations(optional): string
show translations, boolean true or false; default false
Inventory update request object.
Root Schema : updateInventory_request
Type:
Show Source
object
-
count(optional):
integer
Count of updated itemsExample:
1
-
date(optional):
string
The timestamp at which the inventory got updated in format yyyy-MM-dd HH:mm:ssExample:
2019-12-20 09:41:43
-
inventoryInfo(optional):
object inventoryInfo
Inventory information
Nested Schema : inventoryInfo
Type:
object
Inventory information
Show Source
-
updatedItems(optional):
array updatedItems
Array of updated items
Nested Schema : items
Type:
Show Source
object
-
newAvailabilityStatus(optional):
string
The availability status of the SKU after updateExample:
inStock
-
oldAvailabilityStatus(optional):
string
The availability status of the SKU before updateExample:
outOfStock
-
sku(optional):
object sku
Properties of SKU from Product Catalog
Nested Schema : sku
Type:
object
Properties of SKU from Product Catalog
Show Source
-
active(optional):
boolean
SKU active propertyExample:
true
-
id(optional):
string
SKU IDExample:
Cam_test_SKU_2
-
locationId(optional):
string
Location ID of the item
-
parentProducts(optional):
array parentProducts
Properties of parent product of the SKU from Product Catalog
-
variants(optional):
array variants
Array containing variant info of the SKU
Nested Schema : parentProducts
Type:
array
Properties of parent product of the SKU from Product Catalog
Show Source
Nested Schema : items
Type:
Show Source
object
-
active(optional):
boolean
Product active propertyExample:
true
-
description(optional):
string
Description of the product
-
displayName(optional):
string
Display name of the productExample:
Cam_test_1
-
id(optional):
string
Product IDExample:
Cam_test_1
-
longDescription(optional):
string
Long description of the product
-
primaryFullImageURL(optional):
string
Product image URLExample:
/img/no-image.jpg
Nested Schema : items
Type:
Show Source
object
-
optionName(optional):
string
Name of the variantExample:
color
-
optionValue(optional):
string
Value of the variant for this SKUExample:
Banana Mania
Response
Supported Media Types
- application/json
200 Response
When locationId is not passed in request body, inventory info will appear in a flat structure.
When locationIds ss passed in request body, inventory info will appear within a 'locationInventoryInfo' JSON object in the response.
Root Schema : updateInventory_response
Type:
Show Source
object
-
availabilityDate(optional):
string
Availability date. Date format is an ISO standard such as yyyy-MM-dd.
-
availabilityStatus(optional):
integer
Availability status 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 of the variant.
-
locationInventoryInfo(optional):
array locationInventoryInfo
-
preorderLevel(optional):
integer
Preorder level of the variant.
-
preorderThreshold(optional):
integer
Preorder threshold of the variant.
-
skuId(optional):
string
SKU id of the variant.
-
skuNumber(optional):
string
SKU number of the variant.
-
stockLevel(optional):
integer
Stock level of the variant.
-
stockThreshold(optional):
integer
Stock threshold.
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":"Sku_15DE",
"displayName":null,
"links":[
{
"rel":"self",
"href":"http://admin.example.com/ccadminui/v1/inventories/Sku_15DE"
}
],
"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":"Sku_15DE"
}
Example Response (description)
Example response when locationId 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
------------------ ------------------
25110 / Internal inventory error
25111 / Missing sku id
25112 / Invalid properties map
25115 / Inventory record not found
25116 / Location is invalid
25134 / Operation not supported for type
25135 / Invalid type
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