createInventory
post
/ccadmin/v1/inventories
Create Inventory. Create inventory information.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : createInventory_request
{
"preorderThreshold":0,
"backorderLevel":0,
"preorderLevel":0,
"locationId":"loc1",
"availabilityDate":null,
"backorderThreshold":0,
"id":"sku123",
"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. - id
-
Type:
string
Required:true
ID of the inventory record. - locationId
-
Type:
string
ID of the location for which the inventory information is being created. - 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:
string
Stock threshold of the variant. - 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 : createInventory_response
- availabilityDate
-
Type:
string
Availability date of variant. Date format is an ISO standard such as yyyy-MM-dd. - availabilityStatus
-
Type:
integer
Availability status/ available count 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. - preorderLevel
-
Type:
integer
Preorder level of the variant. - preorderThreshold
-
Type:
integer
Preorder threshold of 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 of variant.
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
- 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, "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" }