Collects API no longer returns Smart Collections

Solved
Highlighted
Tourist
11 1 0

On this page: https://shopify.dev/docs/admin-api/rest/reference/products/smartcollection?api[version]=2020-04

It states: "The Collect resource is used to connect a product to a smart collection.".

We've been using the GET Collects call: https://shopify.dev/docs/admin-api/rest/reference/products/collect?api[version]=2020-04#index-2020-0...

But it looks like it is no longer returning Smart Collections. So for some customers who only have Smart Collections the GET Collects API method just returns an empty array.

As far as I know, this used to work correctly but changed at some point in the beginning of May.

 

Example requests:

GET https://fietsenwinkel-deals.myshopify.com/admin/api/2020-01/collects.json?limit=250

GET https://winghandel.myshopify.com/admin/api/2020-04/collects.json?limit=250

GET https://direct-outdoor2.myshopify.com/admin/api/2020-04/collects.json?limit=250

 

Response:

{"collects":[]}

 

I've tried the 2020-01 and the 2020-04 version of the API but they both return the same empty array.

 

Our partner ID is: 739940

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
624 102 129

This is an accepted solution.

Hi @EasyAds 

 

If we take a look at the REST Admin API documentation for the "Collects" resource in version 2019-10 (https://shopify.dev/docs/admin-api/rest/reference/products/collect?api[version]=2020-01), we see the following warning message:

 

collects-api-2019-10.png

 

This is also detailed in our API versioning release notes (https://shopify.dev/concepts/about-apis/versioning/release-notes/2020-01) . If you want to use API version 2020-01 or higher and you want to use the REST Admin API to interact with smart collections, please refer to the following document: https://shopify.dev/tutorials/migrate-from-collect-endpoint-to-collections

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

Highlighted
Tourist
11 1 0

Wow.

 

Wouldn't that information make more sense in the documentation of the 2020-01 version?

When we implemented this newer version we looked at the documentation for that version, not of the previous version of course.

 

Anyway, thanks for pointing it out.

I can make some people happy :)

 

Best regards,

Marc

0 Likes