Posts the catalog entry warehouse inventory.
1 min
POST
/episerverapi/commerce/entries/{entryCode}/inventories
Path Parameters
- entryCodestringrequired
Query Parameters
- entryCodestringDescription
Header Parameters
- acceptstringDescriptionDefaulttext/plainAllowedtext/plainapplication/jsontext/json
Body Parameters
- bodyWarehouseInventoryDescription
- catalogEntryCodestringDescription
- warehouseCodestringDescription
- warehouseLinkResourceLinkDescription
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- inStockQuantitynumber<double>DescriptionFormatdouble
- reservedQuantitynumber<double>DescriptionFormatdouble
- reorderMinQuantitynumber<double>DescriptionFormatdouble
- preorderQuantitynumber<double>DescriptionFormatdouble
- backorderQuantitynumber<double>DescriptionFormatdouble
- allowBackorderbooleanDescription
- allowPreorderbooleanDescription
- inventoryStatusstringDescription
- preorderAvailabilityDatestring<date-time>DescriptionFormatdate-time
- backorderAvailabilityDatestring<date-time>DescriptionFormatdate-time
- purchaseAvailableDatestring<date-time>DescriptionFormatdate-time
Responses
200
- WarehouseInventory
- catalogEntryCodestringDescription
- warehouseCodestringDescription
- warehouseLinkResourceLinkDescription
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- inStockQuantitynumber<double>DescriptionFormatdouble
- reservedQuantitynumber<double>DescriptionFormatdouble
- reorderMinQuantitynumber<double>DescriptionFormatdouble
- preorderQuantitynumber<double>DescriptionFormatdouble
- backorderQuantitynumber<double>DescriptionFormatdouble
- allowBackorderbooleanDescription
- allowPreorderbooleanDescription
- inventoryStatusstringDescription
- preorderAvailabilityDatestring<date-time>DescriptionFormatdate-time
- backorderAvailabilityDatestring<date-time>DescriptionFormatdate-time
- purchaseAvailableDatestring<date-time>DescriptionFormatdate-time
400
401
404
curl
curl --request POST \
--url /episerverapi/commerce/entries/{entryCode}/inventories \
--header 'accept: text/plain'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "text/plain");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("/episerverapi/commerce/entries/{entryCode}/inventories", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/episerverapi/commerce/entries/{entryCode}/inventories")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "text/plain"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/episerverapi/commerce/entries/{entryCode}/inventories"
payload = {}
headers = {
'accept': 'text/plain',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The warehouse inventory is saved.
{
"catalogEntryCode": "",
"warehouseCode": "",
"warehouseLink": {
"title": "",
"type": "",
"href": "",
"properties": [
{
"name": "",
"value": ""
}
]
},
"inStockQuantity": "",
"reservedQuantity": "",
"reorderMinQuantity": "",
"preorderQuantity": "",
"backorderQuantity": "",
"allowBackorder": false,
"allowPreorder": false,
"inventoryStatus": "",
"preorderAvailabilityDate": "",
"backorderAvailabilityDate": "",
"purchaseAvailableDate": ""
}400
// If the catalog entry warehouse inventory model is not valid.
401
// If user does not have enough permission for this request.
404
// If entry does not exist.