Skip to main content

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Collect

Requires products access scope.

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.

Was this section helpful?
#

Endpoints


Anchor to

The Collect resource

Anchor to

Properties


collection_id
deprecated

The ID of the custom collection containing the product.


created_at
deprecated

The date and time (ISO 8601 format) when the collect was created.


id
deprecated

A unique numeric identifier for the collect.


position
deprecated

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
deprecated

The unique numeric identifier for the product in the custom collection.


sort_value
deprecated

This is the same value as position but padded with leading zeroes to make it alphanumeric-sortable. This value is applied only when the custom collection is sorted manually.


updated_at
deprecated

The date and time (ISO 8601 format) when the collect was last updated.


Was this section helpful?
{}

The Collect resource

{
"collection_id": 841564295,
"created_at": "2018-04-25T13:51:12-04:00",
"id": 841564295,
"position": 2,
"product_id": 632910392,
"sort_value": "0000000002",
"updated_at": "2018-04-25T13:51:12-04:00"
}

Anchor to POST request, Adds a product to a custom collection
post
Adds a product to a custom collection

Adds a product to a custom collection.

Anchor to Parameters of Adds a product to a custom collectionParameters


api_version
string
required

Was this section helpful?

Anchor to post-collects-examplesExamples

Creating a collect without a product or collection ID fails and returns an error

Was this section helpful?
post

/admin/api/2025-07/collects.json

curl -d '{"collect":{"product_id":921728736,"collection_id":841564295}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2025-07/collects.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"

{}

Response

JSON
HTTP/1.1 201 Created
{
"collect": {
"id": 1071559576,
"collection_id": 841564295,
"product_id": 921728736,
"created_at": "2025-07-01T14:43:01-04:00",
"updated_at": "2025-07-01T14:43:01-04:00",
"position": 2,
"sort_value": "0000000002"
}
}

Retrieves a list of collects. Note: This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to Make paginated requests to the REST Admin API.


api_version
string
required

fields

Show only certain fields, specified by a comma-separated list of field names.


limit
≤ 250
default 50

The maximum number of results to show.


since_id

Restrict results to after the specified ID.


Was this section helpful?

Retrieve all collects for the shop

Retrieve only collects for a certain collection

Query parameters
collection_id=841564295

The ID of the custom collection containing the product.

Retrieve only collects for a certain product

Query parameters
product_id=632910392

The unique numeric identifier for the product in the custom collection.

Was this section helpful?
get

/admin/api/2025-07/collects.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/collects.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
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": 773559378,
"collection_id": 395646240,
"product_id": 632910392,
"created_at": null,
"updated_at": null,
"position": 1,
"sort_value": "0000000001"
}
]
}

Anchor to GET request, Retrieves a specific collect by its ID
get
Retrieves a specific collect by its ID
deprecated

Retrieves a specific collect by its ID.


api_version
string
required

collect_id
string
required

fields

Show only certain fields, specified by a comma-separated list of field names.


Was this section helpful?

Retrieve a collect with a certain ID

Path parameters
collect_id=455204334
string
required
Was this section helpful?
get

/admin/api/2025-07/collects/455204334.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/collects/455204334.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

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

Retrieves a count of collects.


api_version
string
required

Was this section helpful?

Count all collects for the shop

Count only collects for a certain collection

Query parameters
collection_id=841564295

The ID of the custom collection containing the product.

Count only collects for a certain product

Query parameters
product_id=632910392

The unique numeric identifier for the product in the custom collection.

Was this section helpful?
get

/admin/api/2025-07/collects/count.json

curl -X GET "https://your-development-store.myshopify.com/admin/api/2025-07/collects/count.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"count": 2
}

Removes a product from a collection.


api_version
string
required

collect_id
string
required

Was this section helpful?

Was this section helpful?
del

/admin/api/2025-07/collects/455204334.json

curl -X DELETE "https://your-development-store.myshopify.com/admin/api/2025-07/collects/455204334.json" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{}