Creates a new collection.
1 min
POST
https://api.upstartcommerce.com/pim/product-lines/collections
Body Parameters
- bodyPimCollection.jsonrequired
Responses
201
- CreateCollection201Response
- idstring<uuid>Formatuuid
Response Headers
- Allow
- ETag
- Cache-Control
- Content-Type
- Location
curl
curl --request POST \
--url https://api.upstartcommerce.com/pim/product-lines/collections \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.upstartcommerce.com/pim/product-lines/collections", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.upstartcommerce.com/pim/product-lines/collections")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.upstartcommerce.com/pim/product-lines/collections"
payload = {}
headers = {
'accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// Collection created successfully.
{
"id": ""
}