Shopify API - Select 所有客户都基于标签?
Shopify API - Select all the customer based on tags?
我们已经用 "Price Level 1"、"Price Level 2"、"Price Level 3" 等不同标签定义了我们 shopify 商店中的所有客户 ---- 等等,直到 "Price Level 16" 和新客户没有任何标签。通过 shopify API 我想根据那里的标签获取客户,我尝试了不同的 URL
https://apikey:password@hostname/admin/customers.json?tags:Price Level 1
https://apikey:password@hostname/admin/customers.json?tags="Price Level 1"
https://apikey:password@hostname/admin/customers.json?query=Price Level 1
但所有 URL 都给我相同的结果,即带有任何标签的客户。请指导我根据确切的标签名称获取客户的最佳方法,以及如何在没有任何标签的情况下获取客户。
要应用查询,您需要使用搜索端点:
https://store.myshopify.com/admin/customers/search.json?query=%27Price%20level%201%27
请注意,当您的标签有空格时,您必须在查询中包含引号。如果您使用的是 Node,那么最简单的方法是
escape("'Price Level 1'");
我们已经用 "Price Level 1"、"Price Level 2"、"Price Level 3" 等不同标签定义了我们 shopify 商店中的所有客户 ---- 等等,直到 "Price Level 16" 和新客户没有任何标签。通过 shopify API 我想根据那里的标签获取客户,我尝试了不同的 URL
https://apikey:password@hostname/admin/customers.json?tags:Price Level 1
https://apikey:password@hostname/admin/customers.json?tags="Price Level 1"
https://apikey:password@hostname/admin/customers.json?query=Price Level 1
但所有 URL 都给我相同的结果,即带有任何标签的客户。请指导我根据确切的标签名称获取客户的最佳方法,以及如何在没有任何标签的情况下获取客户。
要应用查询,您需要使用搜索端点:
https://store.myshopify.com/admin/customers/search.json?query=%27Price%20level%201%27
请注意,当您的标签有空格时,您必须在查询中包含引号。如果您使用的是 Node,那么最简单的方法是
escape("'Price Level 1'");