updateInventory
put
/ccadmin/v1/inventories/{id}
Update Inventory. Update inventory information based on ID.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueID of the variant.
Body Parameter
Root Schema : updateInventory_request
{
"preorderThreshold":0,
"backorderLevel":0,
"preorderLevel":0,
"locationId":"loc1",
"availabilityDate":null,
"backorderThreshold":0,
"stockThreshold":"10",
"type":"variant",
"stockLevel":"120"
}
- availabilityDate
-
Type:
stringAvailability date. Date format is an ISO standard such as yyyy-MM-dd. - backorderLevel
-
Type:
integerBackorder level of the variant. - backorderThreshold
-
Type:
integerBackorder threshold of the variant. - locationId
-
Type:
stringID of the location for which the inventory is being updated. - preorderLevel
-
Type:
integerPreorder level of the variant. - preorderThreshold
-
Type:
integerPreorder threshold of the variant. - stockLevel
-
Type:
stringStock level of the variant. - stockThreshold
-
Type:
integerStock threshold. - type
-
Type:
stringInventory type, either variant or product. defaults to variant.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateInventory_response
- availabilityDate
-
Type:
stringAvailability date. Date format is an ISO standard such as yyyy-MM-dd. - availabilityStatus
-
Type:
integerAvailability status of the variant. - availabilityStatusMsg
-
Type:
stringAvailability status Message of the variant. - availableToPromise
-
Type:
stringAvailable to promise. - backorderLevel
-
Type:
integerBackorder level of the variant. - backorderThreshold
-
Type:
integerBackorder threshold of the variant. - displayName
-
Type:
stringDisplay name of the variant. - inventoryId
-
Type:
stringInventory id of the variant. - locationId
-
Type:
stringLocation id of the variant. - preorderLevel
-
Type:
integerPreorder level of the variant. - preorderThreshold
-
Type:
integerPreorder threshold of the variant. - skuId
-
Type:
stringSKU ID of the variant. - skuNumber
-
Type:
stringSKU number of the variant. - stockLevel
-
Type:
integerStock level of the variant. - stockThreshold
-
Type:
integerStock threshold.
Example application/json
{
"preorderThreshold":0,
"backorderLevel":0,
"displayName":null,
"availabilityDate":null,
"stockThreshold":10,
"availabilityStatusMsg":"inStock",
"stockLevel":47,
"availableToPromise":null,
"skuNumber":null,
"preorderLevel":0,
"locationId":null,
"inventoryId":null,
"backorderThreshold":0,
"links":[
{
"rel":"self",
"href":"http://www.example.com/v1/inventories/sku40020"
}
],
"availabilityStatus":1000,
"locationInventoryInfo":null,
"skuId":"sku40020"
}
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|
|------------------|------------------|
|25116|Location is invalid|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"preorderThreshold": 0,
"backorderLevel": 0,
"preorderLevel": 0,
"locationId": "loc1",
"availabilityDate": null,
"backorderThreshold": 0,
"stockThreshold": "10",
"type": "variant",
"stockLevel": "120"
}
Sample Response Payload returned by endpoint:
{
"preorderThreshold": 0,
"backorderLevel": 0,
"displayName": null,
"availabilityDate": null,
"stockThreshold": 10,
"availabilityStatusMsg": "inStock",
"stockLevel": 47,
"availableToPromise": null,
"skuNumber": null,
"preorderLevel": 0,
"locationId": null,
"inventoryId": null,
"backorderThreshold": 0,
"links": [{
"rel": "self",
"href": "http://www.example.com/v1/inventories/sku40020"
}],
"availabilityStatus": 1000,
"locationInventoryInfo": null,
"skuId": "sku40020"
}