Creates the common draft catalog node.
1 min
POST
/episerverapi/commerce/nodes/commondraft/{lang}
Path Parameters
- langstringrequiredDescription
Header Parameters
- acceptstringDescriptionDefaulttext/plainAllowedtext/plainapplication/jsontext/json
Body Parameters
- bodyDraftNodeDescription
- codestringDescription
- parentNodeCodestringDescription
- namestringDescription
- startDatestring<date-time>DescriptionFormatdate-time
- endDatestring<date-time>DescriptionFormatdate-time
- metaClassstringDescription
- catalogstringDescription
- sortOrderinteger<int32>DescriptionFormatint32
- parentNodeResourceLinkDescription
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- assetsResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- childrenResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- entriesResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- metaFieldsDraftMetaFieldProperty[]Description
- namestringDescription
- typestringDescription
- datastringDescription
- seoInformationDraftSeoInfoDescription
- titlestringDescription
- uristringDescription
- uriSegmentstringDescription
- descriptionstringDescription
- keywordsstringDescription
Responses
200
- DraftNodeDescription
- codestringDescription
- parentNodeCodestringDescription
- namestringDescription
- startDatestring<date-time>DescriptionFormatdate-time
- endDatestring<date-time>DescriptionFormatdate-time
- metaClassstringDescription
- catalogstringDescription
- sortOrderinteger<int32>DescriptionFormatint32
- parentNodeResourceLinkDescription
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- assetsResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- childrenResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- entriesResourceLink[]Description
- titlestringDescription
- typestringDescription
- hrefstringDescription
- propertiesNameValue[]Description
- namestringDescription
- valuestringDescription
- metaFieldsDraftMetaFieldProperty[]Description
- namestringDescription
- typestringDescription
- datastringDescription
- seoInformationDraftSeoInfoDescription
- titlestringDescription
- uristringDescription
- uriSegmentstringDescription
- descriptionstringDescription
- keywordsstringDescription
400
401
curl
curl --request POST \
--url /episerverapi/commerce/nodes/commondraft/{lang} \
--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/nodes/commondraft/{lang}", 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/nodes/commondraft/{lang}")
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/nodes/commondraft/{lang}"
payload = {}
headers = {
'accept': 'text/plain',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The common draft catalog node is saved.
{
"code": "",
"parentNodeCode": "",
"name": "",
"startDate": "",
"endDate": "",
"metaClass": "",
"catalog": "",
"sortOrder": "",
"parentNode": {
"title": "",
"type": "",
"href": "",
"properties": [
{
"name": "",
"value": ""
}
]
},
"assets": [
{
"title": "",
"type": "",
"href": "",
"properties": [
{
"name": "",
"value": ""
}
]
}
],
"children": [
{
"title": "",
"type": "",
"href": "",
"properties": [
{
"name": "",
"value": ""
}
]
}
],
"entries": [
{
"title": "",
"type": "",
"href": "",
"properties": [
{
"name": "",
"value": ""
}
]
}
],
"metaFields": [
{
"name": "",
"type": "",
"data": ""
}
],
"seoInformation": {
"title": "",
"uri": "",
"uriSegment": "",
"description": "",
"keywords": ""
}
}400
// If the common draft catalog node model is not valid.
401
// If user does not have enough permission for this request.