# API无法返回自动类型的商品系列的数据

**URL:** <https://community.shopify.com/t/api/417776>\
**Category:** Shopify 设计\
**Created:** [June 4, 2025, 8:41am UTC](https://community.shopify.com/t/api/417776 "2025-06-04T08:41:00Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

用户遇到通过 REST API 端点 `/admin/api/2025-04/custom_collections.json?ids=` 获取商品系列数据时的问题：

**问题描述：**
- 该接口只能返回手动类型的商品系列
- 无法返回自动类型的商品系列数据

**解决方案：**
- 需要使用 Shopify Admin GraphQL API 的 `collections` 查询
- 添加过滤条件 `collection_type:smart` 来获取自动（智能）商品系列
- REST API 的 `custom_collections` 端点仅用于手动系列，自动系列需要通过不同的 API 方法访问

<div class="post-metadata">

**Author:** ![Ellie2](https://avatars.discourse-cdn.com/v4/letter/e/49beb7/32.png) [@Ellie2](https://community.shopify.com/u/Ellie2)\
**Post date:** [June 4, 2025, 8:41am UTC](https://community.shopify.com/t/api/417776/1 "2025-06-04T08:41:00Z")

</div>

通过 /admin/api/2025-04/custom\_collections.json?ids= 接口，获取对应collection数据的时候，无法返回商品系列类型为自动的，但可以正常返回手动的。请问应该如何解决？十分感谢

---

<div class="post-metadata">

**Author:** ![AndyX](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/andyx/32/417600_2.png) [@AndyX](https://community.shopify.com/u/AndyX)\
**Post date:** [October 10, 2025, 8:28am UTC](https://community.shopify.com/t/api/417776/2 "2025-10-10T08:28:55Z")

</div>

To get smart collections using the Shopify Admin GraphQL API, you should use the [`collections`](https://shopify.dev/docs/api/admin-graphql/latest/queries/collections) query with the filter `collection_type:smart`. This will return all automated (smart) collections in your store.
