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

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateInventory_response
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
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

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"
}