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
-
availabilityDate(optional):
string
Availability date. Date format is an ISO standard such as yyyy-MM-dd.
-
backorderLevel(optional):
integer
Backorder level of the variant.
-
backorderThreshold(optional):
integer
Backorder threshold of the variant.
-
locationId(optional):
string
ID of the location for which the inventory is being updated.
-
preorderLevel(optional):
integer
Preorder level of the variant.
-
preorderThreshold(optional):
integer
Preorder threshold of the variant.
-
stockLevel(optional):
string
Stock level of the variant.
-
stockThreshold(optional):
integer
Stock threshold.
-
type(optional):
string
Inventory type, either variant or product. Defaults to variant.
Example:
{
"preorderThreshold":0,
"backorderLevel":0,
"preorderLevel":0,
"locationId":"loc1",
"availabilityDate":null,
"backorderThreshold":0,
"stockThreshold":"10",
"type":"variant",
"stockLevel":"120"
}
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