Create Product Collection
Create a new Product Collection for a specific location
POST
/
products
/
collections
Create Product Collection
curl --request POST \
--url https://services.leadconnectorhq.com/products/collections \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"collectionId": "66057f9d28536eae584ec047",
"image": "http://example.com/watermark.png",
"type": "manual",
"productIds": [
"655b33a82209e60b6adb87a5",
"655b33a82209e60b6adb87a6"
],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
altId: '6578278e879ad2646715ba9c',
altType: 'LOCATION',
name: 'Best Sellers',
slug: 'best-sellers',
collectionId: '66057f9d28536eae584ec047',
image: 'http://example.com/watermark.png',
type: 'manual',
productIds: ['655b33a82209e60b6adb87a5', '655b33a82209e60b6adb87a6'],
seo: {
title: 'Best Sellers',
description: 'Collections where all the best products are available'
},
ruleHash: 'abc123def456',
ruleVersion: 1,
stats: {}
})
};
fetch('https://services.leadconnectorhq.com/products/collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/products/collections"
payload = {
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"collectionId": "66057f9d28536eae584ec047",
"image": "http://example.com/watermark.png",
"type": "manual",
"productIds": ["655b33a82209e60b6adb87a5", "655b33a82209e60b6adb87a6"],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"_id": "655b33a82209e60b6adb87a5",
"altId": "Z4Bxl8J4SaPEPLq9IQ8g",
"name": "Best Sellers",
"slug": "best-sellers",
"type": "manual",
"createdAt": "2024-02-22T09:27:19.728Z",
"image": "http://example.com/watermark.png",
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"rules": {},
"ruleVersion": 1,
"ruleHash": "abc123def456",
"stats": {}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}Body
application/json
Last modified on March 8, 2026
Was this page helpful?
Create Product Collection
curl --request POST \
--url https://services.leadconnectorhq.com/products/collections \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"collectionId": "66057f9d28536eae584ec047",
"image": "http://example.com/watermark.png",
"type": "manual",
"productIds": [
"655b33a82209e60b6adb87a5",
"655b33a82209e60b6adb87a6"
],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
'const options = {
method: 'POST',
headers: {Version: '<version>', 'Content-Type': 'application/json'},
body: JSON.stringify({
altId: '6578278e879ad2646715ba9c',
altType: 'LOCATION',
name: 'Best Sellers',
slug: 'best-sellers',
collectionId: '66057f9d28536eae584ec047',
image: 'http://example.com/watermark.png',
type: 'manual',
productIds: ['655b33a82209e60b6adb87a5', '655b33a82209e60b6adb87a6'],
seo: {
title: 'Best Sellers',
description: 'Collections where all the best products are available'
},
ruleHash: 'abc123def456',
ruleVersion: 1,
stats: {}
})
};
fetch('https://services.leadconnectorhq.com/products/collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/products/collections"
payload = {
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"collectionId": "66057f9d28536eae584ec047",
"image": "http://example.com/watermark.png",
"type": "manual",
"productIds": ["655b33a82209e60b6adb87a5", "655b33a82209e60b6adb87a6"],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
headers = {
"Version": "<version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"_id": "655b33a82209e60b6adb87a5",
"altId": "Z4Bxl8J4SaPEPLq9IQ8g",
"name": "Best Sellers",
"slug": "best-sellers",
"type": "manual",
"createdAt": "2024-02-22T09:27:19.728Z",
"image": "http://example.com/watermark.png",
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"rules": {},
"ruleVersion": 1,
"ruleHash": "abc123def456",
"stats": {}
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}