createInventory

post

/ccadmin/v1/inventories

Create Inventory. Create inventory information.

Request

Supported Media Types
  • application/json
Body Parameter
Root Schema : createInventory_request

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createInventory_response
Example application/json

{
    "preorderThreshold":0,
    "backorderLevel":0,
    "displayName":null,
    "availabilityDate":null,
    "stockThreshold":0,
    "availabilityStatusMsg":"inStock",
    "stockLevel":120,
    "availableToPromise":null,
    "skuNumber":null,
    "preorderLevel":0,
    "locationId":null,
    "inventoryId":null,
    "backorderThreshold":0,
    "links":[
        {
            "rel":"self",
            "href":"http://www.example.com/inventories"
        }
    ],
    "availabilityStatus":1000,
    "locationInventoryInfo":null,
    "skuId":"sku40024"
}
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| |------------------|------------------| |25127|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,
  "id": "sku123",
  "stockThreshold": "10",
  "type": "variant",
  "stockLevel": "120"
}

Sample Response Payload returned by endpoint:

{
  "preorderThreshold": 0,
  "backorderLevel": 0,
  "displayName": null,
  "availabilityDate": null,
  "stockThreshold": 0,
  "availabilityStatusMsg": "inStock",
  "stockLevel": 120,
  "availableToPromise": null,
  "skuNumber": null,
  "preorderLevel": 0,
  "locationId": null,
  "inventoryId": null,
  "backorderThreshold": 0,
  "links": [{
    "rel": "self",
    "href": "http://www.example.com/inventories"
  }],
  "availabilityStatus": 1000,
  "locationInventoryInfo": null,
  "skuId": "sku40024"
}