Posts the warehouse.
1 min
POST
/episerverapi/commerce/warehouses
Header Parameters
- acceptstringDescriptionDefaulttext/plainAllowedtext/plainapplication/jsontext/json
Body Parameters
- bodyWarehouseDescription
- namestringDescription
- isActivebooleanDescription
- isPrimarybooleanDescription
- sortOrderinteger<int32>DescriptionFormatint32
- codestringDescription
- fulfillmentPriorityOrderinteger<int32>DescriptionFormatint32
- isFulfillmentCenterbooleanDescription
- isPickupLocationbooleanDescription
- isDeliveryLocationbooleanDescription
- firstNamestringDescription
- lastNamestringDescription
- organizationstringDescription
- line1stringDescription
- line2stringDescription
- citystringDescription
- statestringDescription
- countryCodestringDescription
- countryNamestringDescription
- postalCodestringDescription
- regionCodestringDescription
- regionNamestringDescription
- daytimePhoneNumberstringDescription
- eveningPhoneNumberstringDescription
- faxNumberstringDescription
- emailstringDescription
Responses
200
- Warehouse
- namestringDescription
- isActivebooleanDescription
- isPrimarybooleanDescription
- sortOrderinteger<int32>DescriptionFormatint32
- codestringDescription
- fulfillmentPriorityOrderinteger<int32>DescriptionFormatint32
- isFulfillmentCenterbooleanDescription
- isPickupLocationbooleanDescription
- isDeliveryLocationbooleanDescription
- firstNamestringDescription
- lastNamestringDescription
- organizationstringDescription
- line1stringDescription
- line2stringDescription
- citystringDescription
- statestringDescription
- countryCodestringDescription
- countryNamestringDescription
- postalCodestringDescription
- regionCodestringDescription
- regionNamestringDescription
- daytimePhoneNumberstringDescription
- eveningPhoneNumberstringDescription
- faxNumberstringDescription
- emailstringDescription
400
401
curl
curl --request POST \
--url /episerverapi/commerce/warehouses \
--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/warehouses", 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/warehouses")
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/warehouses"
payload = {}
headers = {
'accept': 'text/plain',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The warehouse is saved.
{
"name": "",
"isActive": false,
"isPrimary": false,
"sortOrder": "",
"code": "",
"fulfillmentPriorityOrder": "",
"isFulfillmentCenter": false,
"isPickupLocation": false,
"isDeliveryLocation": false,
"firstName": "",
"lastName": "",
"organization": "",
"line1": "",
"line2": "",
"city": "",
"state": "",
"countryCode": "",
"countryName": "",
"postalCode": "",
"regionCode": "",
"regionName": "",
"daytimePhoneNumber": "",
"eveningPhoneNumber": "",
"faxNumber": "",
"email": ""
}400
// If the warehouse model is not valid.
401
// If user does not have enough permission for this request.