是否有一个API呼叫可以列出Shopify中所有可用产品ID的(ID&ID)?

发布于 2025-02-05 05:23:55 字数 259 浏览 3 评论 0原文

我使用 Postman gui 来检索Shopify API的物品列表。

我想知道是否存在一种单独获取可用产品ID的方法,最好是单个API get调用的值列表。我知道的是,

/admin/api/2022-04/products.json

它返回了所有产品信息的列表,并且在它们上循环/穿越JSON并不是很有效。我希望必须有一种简单的方法来一次唯一地获取所有身份证。应该没有吗?

I use POSTMAN GUI for retrieving a list of items from Shopify API.

I would like to know if there exists a way to get available product id's alone, preferably as a list of values over a single api GET call. The one I know of is

/admin/api/2022-04/products.json

It returns a list of all product information, and looping over them/traversing the json is not very efficient. I hope there must be an easy way to fetch all ID's alone in one go. Should there be not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雾里花 2025-02-12 05:23:57

您可以将/admin/api/2022-04/products.json?fields=ID添加到请求的结尾,以仅限于单个字段或乘以限制输出。

请注意,如果您有250多种产品,则需要提出多个请求,因为该请求仅限于250种产品。

You can add /admin/api/2022-04/products.json?fields=id to the end of your request to limit the output only for a single field or multiply.

Please note that if you have more than 250 products you will need to make more than one request, since the request is limited to 250 products.

妖妓 2025-02-12 05:23:57

您可以使用批量查询拨打Admin API的所有产品ID。这将导致您收到一个URL,其中您以JSONL格式下载文件,而商店中的每个产品ID都没有其他方法的分页或限制。

You can make one call to the Admin API for all your product IDs using the Bulk Query. That will result in you receiving a URL where you download a file in JSONL format with every single product ID in your store, without the paging or limits of other approaches.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文