updateInventory
put
/ccadmin/v1/inventories/{id}
Update Inventory. Update inventory information based on ID.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
ID 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:
string
Availability date. Date format is an ISO standard such as yyyy-MM-dd. - backorderLevel
-
Type:
integer
Backorder level of the variant. - backorderThreshold
-
Type:
integer
Backorder threshold of the variant. - locationId
-
Type:
string
ID of the location for which the inventory is being updated. - preorderLevel
-
Type:
integer
Preorder level of the variant. - preorderThreshold
-
Type:
integer
Preorder threshold of the variant. - stockLevel
-
Type:
string
Stock level of the variant. - stockThreshold
-
Type:
integer
Stock threshold. - type
-
Type:
string
Inventory 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:
string
Availability date. Date format is an ISO standard such as yyyy-MM-dd. - availabilityStatus
-
Type:
integer
Availability status of the variant. - availabilityStatusMsg
-
Type:
string
Availability status Message of the variant. - availableToPromise
-
Type:
string
Available to promise. - backorderLevel
-
Type:
integer
Backorder level of the variant. - backorderThreshold
-
Type:
integer
Backorder threshold of the variant. - displayName
-
Type:
string
Display name of the variant. - inventoryId
-
Type:
string
Inventory id of the variant. - locationId
-
Type:
string
Location id of the variant. - preorderLevel
-
Type:
integer
Preorder level of the variant. - preorderThreshold
-
Type:
integer
Preorder threshold of the variant. - skuId
-
Type:
string
SKU ID of the variant. - skuNumber
-
Type:
string
SKU number of the variant. - stockLevel
-
Type:
integer
Stock level of the variant. - stockThreshold
-
Type:
integer
Stock 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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" }