哈喽; Shopify商家,会在后台设置产品系列,从接口里,获取「产品系列」的字段数据。 后台的产品系列,若后台设置了产品条件,则,数据接口不返回;若未设置产品条件,则接口正常同步。请问,需要添加什么参数,才能获取,已经设置了产品条件的产品系列的数据呢? English: dear all Shopify merchants will set product series in the background and obtain the field data of “product series” from the interface. For the product series in the background, if the product conditions are set in the background, the data interface will not return; If the product condition is not set, the interface is synchronized normally. What parameters need to be added to obtain the data of the product series for which the product conditions have been set? Looking forward to your reply, thank you very much!
Topic summary
问题概述:调用 Shopify 接口获取“产品系列”(Collections)时,只要后台为系列设置了“产品条件”(用于自动归类的筛选规则),接口就不返回该系列;未设置条件的系列可正常返回。提问者询问是否需添加参数才能拿到带条件系列的数据。
复现信息:
- 后台建立了 7 个产品系列,并附有后台截图与响应示例。
- 使用 REST Admin API 路径 /admin/api/2020-07/custom_collections.json?since_id=0&limit=250。
- 返回结果仅包含部分系列(贴图标注为“第二个绿框”的那些),即未设置产品条件的系列;所有设置了产品条件的系列均未在该响应中出现。
讨论进展:
- 有人建议先查看具体“产品条件”设置。
- 跟帖者与提问者均表示与具体条件内容无关,只要填写了条件就无法同步返回。
当前状态:尚无明确解决方案或参数说明。关键未解问题是如何通过接口获取已设置“产品条件”的产品系列数据。贴图与返回 JSON 是理解问题复现的关键信息。
需要看看你的产品条件具体是什么
跟产品条件内容没关系,只要产品条件有填写内容都无法同步下来,我发个样例:
现在后台建立了7个产品系列:
响应如下,只返回了第二个绿框的内容:
{“custom_collections”:[{“id”:207495266470,“handle”:“frontpage”,“title”:“主页”,“updated_at”:“2022-12-20T08:38:21-05:00”,“body_html”:null,“published_at”:“2020-07-15T21:41:18-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/207495266470”},{“id”:208736354470,“handle”:“first-manual-collection”,“title”:“First Manual Collection”,“updated_at”:“2022-12-20T07:47:38-05:00”,“body_html”:“\u003cp\u003e5000 songs in your pocket\u003c/p\u003e”,“published_at”:“2020-07-22T04:49:46-04:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/208736354470”,“image”:{“created_at”:“2020-07-22T04:49:45-04:00”,“alt”:null,“width”:58,“height”:58,“src”:“https://cdn.shopify.com/s/files/1/0432/3855/5814/collections/crawlRecommend.png?v=1595407786”}},{“id”:212946780326,“handle”:“macbooks”,“title”:“Macbooks”,“updated_at”:“2022-12-20T07:47:38-05:00”,“body_html”:null,“published_at”:“2020-08-14T08:57:36-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/212946780326”},{“id”:212946845862,“handle”:“macbooks-1”,“title”:“Macbooks”,“updated_at”:“2022-12-14T01:41:40-05:00”,“body_html”:null,“published_at”:“2020-08-14T08:57:45-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/212946845862”},{“id”:213942698150,“handle”:“夏季新品系列”,“title”:“夏季新品系列”,“updated_at”:“2022-12-14T01:41:40-05:00”,“body_html”:“”,“published_at”:“2020-08-19T07:36:55-04:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/213942698150”},{“id”:292691968166,“handle”:“aaaaa”,“title”:“AAAAA”,“updated_at”:“2022-12-14T05:18:07-05:00”,“body_html”:“11111”,“published_at”:“2022-12-14T05:18:07-05:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/292691968166”}]}
跟产品条件内容没关系,只要产品条件有填写内容都无法同步下来,我发个样例:
现在后台建立了7个产品系列:
响应如下,只返回了第二个绿框的内容:
{“custom_collections”:[{“id”:207495266470,“handle”:“frontpage”,“title”:“主页”,“updated_at”:“2022-12-20T08:38:21-05:00”,“body_html”:null,“published_at”:“2020-07-15T21:41:18-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/207495266470”},{“id”:208736354470,“handle”:“first-manual-collection”,“title”:“First Manual Collection”,“updated_at”:“2022-12-20T07:47:38-05:00”,“body_html”:“\u003cp\u003e5000 songs in your pocket\u003c/p\u003e”,“published_at”:“2020-07-22T04:49:46-04:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/208736354470”,“image”:{“created_at”:“2020-07-22T04:49:45-04:00”,“alt”:null,“width”:58,“height”:58,“src”:“https://cdn.shopify.com/s/files/1/0432/3855/5814/collections/crawlRecommend.png?v=1595407786”}},{“id”:212946780326,“handle”:“macbooks”,“title”:“Macbooks”,“updated_at”:“2022-12-20T07:47:38-05:00”,“body_html”:null,“published_at”:“2020-08-14T08:57:36-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/212946780326”},{“id”:212946845862,“handle”:“macbooks-1”,“title”:“Macbooks”,“updated_at”:“2022-12-14T01:41:40-05:00”,“body_html”:null,“published_at”:“2020-08-14T08:57:45-04:00”,“sort_order”:“best-selling”,“template_suffix”:null,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/212946845862”},{“id”:213942698150,“handle”:“夏季新品系列”,“title”:“夏季新品系列”,“updated_at”:“2022-12-14T01:41:40-05:00”,“body_html”:“”,“published_at”:“2020-08-19T07:36:55-04:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/213942698150”},{“id”:292691968166,“handle”:“aaaaa”,“title”:“AAAAA”,“updated_at”:“2022-12-14T05:18:07-05:00”,“body_html”:“11111”,“published_at”:“2022-12-14T05:18:07-05:00”,“sort_order”:“best-selling”,“template_suffix”:“”,“published_scope”:“web”,“admin_graphql_api_id”:“gid://shopify/Collection/292691968166”}]}
平台那边的产品系列,不填条件的,都能正常返回,只有在产品条件字段里面设置了数据,接口就不返回了。很奇怪

