Skip to content

About Collection

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Product Collections are essential organizational units in Genstore's product management system, enabling merchants to group related products for better presentation and management. Genstore provides a series of RESTful interfaces supporting the creation, management, and query of product collections, helping merchants create better browsing and shopping experiences.

Core Features

  • Basic Operations: Create product series, update series information, delete product series.
  • Information Query: Get series details, list series, count series.
  • Manage Products in Collections: Add products to series, remove products from series, list series products.

Use Cases

  • Product Category Display: Merchandising teams can organize products into collections, configure display rules, and manage seasonal layouts through the API, creating engaging shopping experiences that drive category performance.
  • Marketing Campaign Support: Marketing teams can quickly create and update themed collections, schedule promotional displays, and coordinate multi-channel product launches, maximizing campaign effectiveness and product visibility.
  • Product Management Optimization: Product managers can efficiently maintain multiple collections, synchronize product information across categories, and update collection rules in batch, streamlining collection maintenance and reducing operational overhead.

Product Collection Object

The product collection object.

Properties

collectionobjectrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedbooleanrequired
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumberrequired
The unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.
bash
{
  "collection": {
    "collectionType": "1",
    "image": {
      "src": "https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
    },
    "ruleSet": {
      "appliedDisjunctively": "true",
      "rules": [
        {
          "condition": "["test"]",
          "column": "title",
          "relation": "equals"
        }
      ]
    },
    "bodyHtml": "<p>Test Description</p>",
    "published": "true",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "collects": "[102744899756584,102744899756583]",
    "countGoodsNum": "3"
  }
}

POST Add product to collection

Adds multiple products to an existing collection in a single operation. This mutation provides an efficient way to bulk-manage collection membership without individual product updates.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

POST /api/202412/collections/collect 

Request Params

collectobjectrequired
- Hide child properties
productIdsarrayrequired
A list of unsigned 64-bit integers used as unique identifiers for the products.
collectionIdnumberrequired
A unique identifier for the collection.

Response Data

collectionsobjectrequired
- Hide child properties
resultbooleanrequired
Whether the addition was successful.
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/collections/collect" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"collect":{
		"productIds":[
			102745723756584,
			102745723756585
		],
		"collectionId":"11017685756584"
	}
}'
json
HTTP/1.1 200 OK
{
  "collections": {
    "result": "true"
  }
}

POST Create collection

Creates a collection to group products together in the online store and other sales channels. For example, an athletics store might create different collections for running attire, shoes, and accessories.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

POST /api/202412/collections 

Request Params

collectionobjectrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
handlestringrequired
A unique, human-readable string of the collection's title.

Response Data

collectionobjectrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumberrequired
The unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
handlestringrequired
A unique, human-readable string of the collection's title.
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/collections" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"collection":{
		"collectionType":"1",
		"image":{
			"src":"https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
		},
		"ruleSet":{
			"appliedDisjunctively":"true",
			"rules":[
				{
					"condition":[
						"test"
					],
					"column":"title",
					"relation":"equals"
				}
			]
		},
		"bodyHtml":"<p>Test Description</p>",
		"handle":"",
		"title":"Collection Title"
	}
}'
json
HTTP/1.1 200 OK
{
  "collection": {
    "collectionType": "1",
    "image": {
      "src": "https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
    },
    "ruleSet": {
      "appliedDisjunctively": "true",
      "rules": [
        {
          "condition": [
            "test"
          ],
          "column": "title",
          "relation": "equals"
        }
      ]
    },
    "bodyHtml": "<p>Test Description</p>",
    "handle": "",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "countGoodsNum": "3"
  }
}

PUT Update collection

Updates a collection, modifying its properties, products, or publication settings. Collections help organize products together in the online store and other sales channels.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

PUT /api/202412/collections/{collectionId} 

Request Params

collectionobjectrequired
Return collections details
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
handlestringrequired
A unique, human-readable string of the collection's title.

Response Data

collectionobjectrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumberrequired
The unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
handlestringrequired
A unique, human-readable string of the collection's title.
bash
curl -X PUT \ 
https://{shop}.genmystore.com/api/202412/collections/{collectionId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"collection":{
		"collectionType":"1",
		"image":{
			"src":"https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
		},
		"ruleSet":{
			"appliedDisjunctively":"true",
			"rules":[
				{
					"condition":[
						"test"
					],
					"column":"title",
					"relation":"equals"
				}
			]
		},
		"bodyHtml":"<p>Test Description</p>",
		"handle":"",
		"title":"Collection Title"
	}
}'
json
HTTP/1.1 200 OK
{
  "collection": {
    "collectionType": "1",
    "image": {
      "src": "https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
    },
    "ruleSet": {
      "appliedDisjunctively": "true",
      "rules": [
        {
          "condition": [
            "test"
          ],
          "column": "title",
          "relation": "equals"
        }
      ]
    },
    "bodyHtml": "<p>Test Description</p>",
    "handle": "",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "countGoodsNum": "3"
  }
}

DELETE Remove from collection

Removes multiple products from a collection in a single operation. This mutation can process large product sets (up to 100 products) and may take significant time to complete for collections with many products.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

DELETE /api/202412/collections/collect 

Request Params

collectobjectrequired
- Hide child properties
productIdsarrayrequired
A list of unsigned 64-bit integers used as unique identifiers for the products.
collectionIdnumberrequired
A unique identifier for the collection.

Response Data

collectionsobjectrequired
Return collection details.
- Hide child properties
resultbooleanrequired
Whether deletion was successful.
bash
curl -X DELETE \ 
https://{shop}.genmystore.com/api/202412/collections/collect" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "collections": {
    "result": "true"
  }
}

DELETE Delete collection

Deletes a collection and removes it permanently from the store. This operation cannot be undone and will remove the collection from all sales channels where it was published.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

DELETE /api/202412/collections/{collectionId} 

Request Params

collectionIdnumberrequired
A unique identifiers for product collections.

Response Data

{}
bash
curl -X DELETE \ 
https://{shop}.genmystore.com/api/202412/collections/{collectionId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{}

GET Get collection

Retrieves a collection by its ID. A collection represents a grouping of products that merchants can display and sell as a group in their online store and other sales channels.

Access scope

Requires ANY of the following access scopes: read_products

Endpoint

GET /api/202412/collections/{collectionId} 

Request Params

collectionIdnumberrequired
A unique identifiers for product collections.

Response Data

collectionobjectrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumberrequired
The unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
handlestringrequired
A unique, human-readable string of the collection's title.
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/collections/{collectionId}" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "collection": {
    "collectionType": "1",
    "image": {
      "src": "https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
    },
    "ruleSet": {
      "appliedDisjunctively": "true",
      "rules": [
        {
          "condition": [
            "test"
          ],
          "column": "title",
          "relation": "equals"
        }
      ]
    },
    "bodyHtml": "<p>Test Description</p>",
    "handle": "",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "countGoodsNum": "3"
  }
}

GET Get collection count

Retrieve a count of product collections.

Access scope

Requires ANY of the following access scopes: read_products

Endpoint

GET /api/202412/collections/count 

Request Params

{}

Response Data

countnumberrequired
Return collection count.
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/collections/count" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "count": "3"
}

GET Get collection list

Retrieves a list of collections in a store. Collections are groups of products that merchants can organize for display in their online store and other sales channels. For example, an athletics store might create different collections for running attire, shoes, and accessories.

Access scope

Requires ANY of the following access scopes: read_products

Endpoint

GET /api/202412/collections 

Request Params

titlestring
Product collection title.
collectionTypenumber
Product collection type.
idsarray
The list of unique identifiers for product collections.
sortOrderstring
List sorting rules. Enumeration values:
* created - Sort by creation time in ascending order;
* created-desc - Sort by creation time in descending order;
* updated - Sort by update time in ascending order;
* updated-desc - Sort by update time in descending order.
pageTokennumber
Cursor representing a certain page of pagination.
limitnumber
Limit on the number of items per page.

Response Data

collectionsarrayrequired
Return collections details.
- Hide child properties
titlestringrequired
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumberrequired
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumberrequired
The unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
handlestringrequired
A unique, human-readable string of the collection's title.
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/collections" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "collections": [
    {
      "collectionType": "1",
      "image": {
        "src": "https://cdn.shopify.com/s/files/1/0600/8317/5513/files/wax-special_150x.png?v=1716260624"
      },
      "ruleSet": {
        "appliedDisjunctively": "true",
        "rules": [
          {
            "condition": [
              "test"
            ],
            "column": "title",
            "relation": "equals"
          }
        ]
      },
      "bodyHtml": "<p>Test Description</p>",
      "handle": "",
      "title": "Collection Title",
      "collectionId": "102984300756584",
      "countGoodsNum": "3"
    }
  ]
}