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

collectionobject
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
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 Create collection

Create a product collection.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

POST /api/202412/collections 

Request Params

collectionobject
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.

Response Data

collectionobject
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
A unique identifier for the collection.
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.
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>",
		"published":"true",
		"title":"Collection Title",
		"collects":"[102744899756584,102744899756583]",
		"countGoodsNum":"3"
	}
}'
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>",
    "published": "true",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "collects": "[102744899756584,102744899756583]",
    "countGoodsNum": "3"
  }
}

POST Add product to collection

Add a product to a specific product collection.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

POST /api/202412/collections/collect 

Request Params

collectobject
- Hide child properties
productIdsarray
A list of unsigned 64-bit integers used as unique identifiers for the products.
collectionIdnumber
A unique identifier for the collection.

Response Data

collectionsobject
- Hide child properties
resultboolean
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]",
		"collectionId":"11017685756584"
	}
}'
json
HTTP/1.1 200 OK
{
  "collections": {
    "result": "true"
  }
}

PUT Update collection

Modify the product collection.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

PUT /api/202412/collections/{collectionId} 

Request Params

collectionobject
Return collections details
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
A unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.

Response Data

collectionobject
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
A unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.
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>",
		"published":"true",
		"title":"Collection Title",
		"collectionId":"102984300756584",
		"collects":"[102744899756584,102744899756583]",
		"countGoodsNum":"3"
	}
}'
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>",
    "published": "true",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "collects": "[102744899756584,102744899756583]",
    "countGoodsNum": "3"
  }
}

DELETE Delete collection

Delete a product collection.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

DELETE /api/202412/collections/{collectionId} 

Request Params

collectionIdnumber
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
{}

DELETE Remove from collection

Delete specific products from a product collection.

Access scope

Requires ANY of the following access scopes: write_products

Endpoint

DELETE /api/202412/collections/collect 

Request Params

collectobject
- Hide child properties
productIdsarray
A list of unsigned 64-bit integers used as unique identifiers for the products.
collectionIdnumber
A unique identifier for the collection.

Response Data

collectionsobject
Return collection details.
- Hide child properties
resultboolean
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"
  }
}

GET Get collection

Retrieve a single product collection.

Access scope

Requires ANY of the following access scopes: write_products read_products

Endpoint

GET /api/202412/collections/{collectionId} 

Request Params

collectionIdnumber
A unique identifiers for product collections.

Response Data

collectionobject
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
A unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection.
collectsarray
List of unique identifiers for related collection products.
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>",
    "published": "true",
    "title": "Collection Title",
    "collectionId": "102984300756584",
    "collects": "[102744899756584,102744899756583]",
    "countGoodsNum": "3"
  }
}

GET Get collection list

Retrieve a list of product collections.

Access scope

Requires ANY of the following access scopes: write_products 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.
publishedStatusstring
List of whether resources are published to the online store。Enumeration values: published - Show only the collections published to the online store;unpublished - Show only the collections not published to the online store;any - Show all 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

collectionsarray
Return collections details.
- Hide child properties
titlestring
Product collection title.
bodyHtmlstring
Product collection description.
collectionTypenumber
Product collection type. Enumeration values: 1 - custom collection; 2 - smart collection.
imageobject
Product collection image.
+ Show child properties
publishedboolean
Whether published to the online store.
ruleSetobject
Rules for assigning products to collections in smart collections.
+ Show child properties
collectionIdnumber
A unique identifiers for product collections.
countGoodsNumnumber
Number of products associated with the collection
collectsarray
List of unique identifiers for related collection products.
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>",
      "published": "true",
      "title": "Collection Title",
      "collectionId": "102984300756584",
      "collects": "[102744899756584,102744899756583]",
      "countGoodsNum": "3"
    }
  ]
}

GET Get collection count

Retrieve a count of product collections.

Access scope

Requires ANY of the following access scopes: write_products read_products

Endpoint

GET /api/202412/collections/count 

Request Params

{}

Response Data

countnumber
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"
}