Receives a backwards-compatible catalog import file and imports the contents into Commerce.
1 min
POST
/episerverapi/commerce/import/catalog
Header Parameters
- acceptstringDescriptionDefaulttext/plainAllowedtext/plainapplication/jsontext/json
Responses
200
- string<uuid>Formatuuid
401
curl
curl --request POST \
--url /episerverapi/commerce/import/catalog \
--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/import/catalog", 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/import/catalog")
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/import/catalog"
payload = {}
headers = {
'accept': 'text/plain',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The catalogs are imported.
""401
// If user does not have enough permission for this request.