curl --request POST \
--url https://services.leadconnectorhq.com/products/collections \
--header 'Authorization: Bearer <token>' \
--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",
"rules": {
"logic": "AND",
"conditions": [
"<array>"
]
},
"productIds": [
"655b33a82209e60b6adb87a5",
"655b33a82209e60b6adb87a6"
],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
'{
"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": {}
}
}Create a new Product Collection for a specific location
curl --request POST \
--url https://services.leadconnectorhq.com/products/collections \
--header 'Authorization: Bearer <token>' \
--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",
"rules": {
"logic": "AND",
"conditions": [
"<array>"
]
},
"productIds": [
"655b33a82209e60b6adb87a5",
"655b33a82209e60b6adb87a6"
],
"seo": {
"title": "Best Sellers",
"description": "Collections where all the best products are available"
},
"ruleHash": "abc123def456",
"ruleVersion": 1,
"stats": {}
}
'{
"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": {}
}
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-07-28 Location Id
"6578278e879ad2646715ba9c"
The type of alt. For now it is only LOCATION
location "LOCATION"
Name of the Product Collection
"Best Sellers"
Slug of the Product Collection which helps in navigation
"best-sellers"
Unique Identifier of the Product Collection, Mongo Id
"66057f9d28536eae584ec047"
The URL of the image that is going to be displayed as the collection Thumbnail
"http://example.com/watermark.png"
Type of collection - manual or smart
manual, smart "manual"
Show child attributes
Array of product IDs for manual collections (required if type is manual)
[
"655b33a82209e60b6adb87a5",
"655b33a82209e60b6adb87a6"
]Show child attributes
Hash of the rules for change detection (auto-generated)
"abc123def456"
Version of the rules for smart collections (auto-generated)
1
Statistics about the collection (auto-generated)
Successful response
Show child attributes
Was this page helpful?