Collection
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-01/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2020-01/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2020-01/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2020-01/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-04/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2020-04/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2020-04/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2020-04/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-07/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2020-07/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2020-07/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2020-07/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2020-10/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2020-10/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2020-10/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2020-10/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2021-01/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2021-01/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2021-01/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2021-01/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/2021-04/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/2021-04/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/2021-04/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/2021-04/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}
A collection is a grouping of products that merchants can create to make their stores easier to browse. For example, a merchant might create a collection for a specific type of product that they sell, such as Footwear. Merchants can create collections by selecting products individually or by defining rules that automatically determine whether products are included.
Shopify stores start with a single collection, called Frontpage. This is a collection of products that are shown on the front page of the online store.
There are two different types of collection:
- Custom collections, which contain products that are manually added to a collection by a merchant. For more information, see the CustomCollection resource.
- Smart collections, which contain products that are automatically added based on selection conditions that a merchant chooses. For more information, see the SmartCollection resource.
The Collect resource is used to connect a product to a custom collection.
What you can do with Collection
The Shopify API lets you do the following with the Collection resource. More detailed versions of these general actions may be available:
- GET /admin/api/unstable/collections/{collection_id}.json Retrieves a single collection
- GET /admin/api/unstable/collections/{collection_id}/products.json Retrieve a list of products belonging to a collection
Collection properties
body_html |
A description of the collection, complete with HTML markup. Many templates display this on their collection pages. |
handle |
A unique, human-readable string for the collection automatically generated from its title. This is used in themes by the Liquid templating language to refer to the collection. (limit: 255 characters) |
image |
Image associated with the collection. Valid values are:
|
id
read-only |
The ID for the collection. |
published_at
read-only |
The time and date (ISO 8601 format) when the collection was made visible. Returns |
published_scope
read-only |
Whether the collection is published to the Point of Sale channel. Valid values:
|
sort_order |
The order in which products in the collection appear. Valid values:
|
template_suffix |
The suffix of the liquid template being used. For example, if the value is |
title
required |
The name of the collection. (limit: 255 characters) |
updated_at
read-only |
The date and time (ISO 8601 format) when the collection was last modified. |
Endpoints
fields
|
Show only certain fields, specified by a comma-separated list of field names. |
Retrieve a specific collection by its ID
GET /admin/api/unstable/collections/841564295.json
View Response
HTTP/1.1 200 OK
{
"collection": {
"id": 841564295,
"handle": "ipods",
"updated_at": "2008-02-01T19:00:00-05:00",
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"products_count": 1,
"collection_type": "custom",
"published_scope": "web",
"title": "IPods",
"body_html": "<p>The best selling ipod ever</p>",
"admin_graphql_api_id": "gid://shopify/Collection/841564295",
"image": {
"created_at": "2021-02-05T20:05:52-05:00",
"alt": "iPod Nano 8gb",
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?v=1612573552"
}
}
}
page
parameter will return an error. To learn more, see Making requests to paginated REST Admin API endpoints.. The products returned are sorted by the collection's sort order.
limit
|
The number of products to retrieve. (default:50 , maximum: 250 )
|
Retrieve a list of products belonging to a collection
GET /admin/api/unstable/collections/841564295/products.json
View Response
HTTP/1.1 200 OK
{
"products": [
{
"id": 632910392,
"title": "IPod Nano - 8GB",
"body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.</p>",
"vendor": "Apple",
"product_type": "Cult Products",
"created_at": "2021-02-05T20:05:52-05:00",
"handle": "ipod-nano",
"updated_at": "2021-02-05T20:05:52-05:00",
"published_at": "2007-12-31T19:00:00-05:00",
"template_suffix": null,
"published_scope": "web",
"tags": "Emotive, Flash Memory, MP3, Music",
"admin_graphql_api_id": "gid://shopify/Product/632910392",
"options": [
{
"id": 594680422,
"product_id": 632910392,
"name": "Color",
"position": 1
}
],
"images": [
{
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
},
{
"id": 562641783,
"product_id": 632910392,
"position": 2,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1612573552",
"variant_ids": [
808950810
],
"admin_graphql_api_id": "gid://shopify/ProductImage/562641783"
}
],
"image": {
"id": 850703190,
"product_id": 632910392,
"position": 1,
"created_at": "2021-02-05T20:05:52-05:00",
"updated_at": "2021-02-05T20:05:52-05:00",
"alt": null,
"width": 123,
"height": 456,
"src": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1612573552",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/850703190"
}
}
]
}