Collect
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-01/collects.json Adds a product to a custom collection
- DELETE /admin/api/2020-01/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2020-01/collects.json Retrieves a list of collects
- GET /admin/api/2020-01/collects/count.json Retrieves a count of collects
- GET /admin/api/2020-01/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2020-01/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2020-01/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2020-01/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2020-01/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2020-01/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2020-01/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2020-01/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2020-01/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2020-01/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-04/collects.json Adds a product to a custom collection
- DELETE /admin/api/2020-04/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2020-04/collects.json Retrieves a list of collects
- GET /admin/api/2020-04/collects/count.json Retrieves a count of collects
- GET /admin/api/2020-04/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2020-04/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2020-04/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2020-04/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2020-04/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2020-04/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2020-04/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2020-04/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2020-04/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2020-04/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-07/collects.json Adds a product to a custom collection
- DELETE /admin/api/2020-07/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2020-07/collects.json Retrieves a list of collects
- GET /admin/api/2020-07/collects/count.json Retrieves a count of collects
- GET /admin/api/2020-07/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2020-07/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2020-07/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2020-07/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2020-07/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2020-07/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2020-07/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2020-07/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2020-07/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2020-07/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2020-10/collects.json Adds a product to a custom collection
- DELETE /admin/api/2020-10/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2020-10/collects.json Retrieves a list of collects
- GET /admin/api/2020-10/collects/count.json Retrieves a count of collects
- GET /admin/api/2020-10/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2020-10/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2020-10/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2020-10/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2020-10/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2020-10/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2020-10/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2020-10/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2020-10/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2020-10/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2021-01/collects.json Adds a product to a custom collection
- DELETE /admin/api/2021-01/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2021-01/collects.json Retrieves a list of collects
- GET /admin/api/2021-01/collects/count.json Retrieves a count of collects
- GET /admin/api/2021-01/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2021-01/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2021-01/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2021-01/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2021-01/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2021-01/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2021-01/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2021-01/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2021-01/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2021-01/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/2021-04/collects.json Adds a product to a custom collection
- DELETE /admin/api/2021-04/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/2021-04/collects.json Retrieves a list of collects
- GET /admin/api/2021-04/collects/count.json Retrieves a count of collects
- GET /admin/api/2021-04/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/2021-04/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/2021-04/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/2021-04/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/2021-04/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/2021-04/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/2021-04/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/2021-04/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/2021-04/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/2021-04/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}
The Collect resource connects a product to a custom collection.

Collects are meant for managing the relationship between products and custom collections. For every product in a custom collection there is a collect that tracks the ID of both the product and the custom collection. A product can be in more than one collection, and will have a collect connecting it to each collection. Unlike many Shopify resources, collects aren't apparent to store owners.
Collects are for placing products in custom collections only. Smart collections use rules to determine which products are their members. Creating a collect that links a product to a smart collection results in a 403 Forbidden error.
For more information on custom collections, see the CustomCollection resource.
What you can do with Collect
The Shopify API lets you do the following with the Collect resource. More detailed versions of these general actions may be available:
- POST /admin/api/unstable/collects.json Adds a product to a custom collection
- DELETE /admin/api/unstable/collects/{collect_id}.json Removes a product from a collection
- GET /admin/api/unstable/collects.json Retrieves a list of collects
- GET /admin/api/unstable/collects/count.json Retrieves a count of collects
- GET /admin/api/unstable/collects/{collect_id}.json Retrieves a specific collect by its ID
Collect properties
collection_id |
The ID of the custom collection containing the product. |
created_at |
The date and time (ISO 8601 format) when the collect was created. |
id |
A unique numeric identifier for the collect. |
position |
The position of this product in a manually sorted custom collection. The first position is 1. This value is applied only when the custom collection is sorted manually. |
product_id |
The unique numeric identifier for the product in the custom collection. |
sort_value |
This is the same value as |
updated_at |
The date and time (ISO 8601 format) when the collect was last updated. |
Endpoints
Create a new link between an existing product and an existing collection
POST /admin/api/unstable/collects.json
{
"collect": {
"product_id": 921728736,
"collection_id": 841564295
}
}
View Response
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559575,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:45-05:00",
"updated_at": "2021-01-01T14:19:45-05:00",
"position": 2,
"sort_value": "0000000002"
}
}
Creating a collect without a product or collection ID fails and returns an error
HTTP/1.1 422 Unprocessable Entity
{
"errors": {
"product": [
"can't be blank"
],
"collection": [
"can't be blank"
]
}
}
Delete the link between a product an a collection
DELETE /admin/api/unstable/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.
limit
|
The maximum number of results to show. (default:50 , maximum: 250 )
|
since_id
|
Restrict results to after the specified ID. |
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve all collects for the shop
GET /admin/api/unstable/collects.json
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 800915878,
"collection_id": 482865238,
"product_id": 921728736,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain product
GET /admin/api/unstable/collects.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 358268117,
"collection_id": 482865238,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}
Retrieve only collects for a certain collection
GET /admin/api/unstable/collects.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"collects": [
{
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
},
{
"id": 1071559577,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2021-01-01T14:19:56-05:00",
"updated_at": "2021-01-01T14:19:56-05:00",
"position": 2,
"sort_value": "0000000002"
}
]
}
Count all collects for the shop
GET /admin/api/unstable/collects/count.json
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain product
GET /admin/api/unstable/collects/count.json?product_id=632910392
View Response
HTTP/1.1 200 OK
{
"count": 2
}
Count only collects for a certain collection
GET /admin/api/unstable/collects/count.json?collection_id=841564295
View Response
HTTP/1.1 200 OK
{
"count": 1
}
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a collect with a certain ID
GET /admin/api/unstable/collects/455204334.json
View Response
HTTP/1.1 200 OK
{
"collect": {
"id": 455204334,
"collection_id": 841564295,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
}