简体   繁体   English

在Shopify Python API中查询客户保存的搜索

[英]Querying Customer Saved Searches in Shopify Python API

I'm trying to get all customers who abandoned their order last week. 我试图让所有上周放弃订单的客户。

I was able to achieved it through the REST API , however, I wonder how to achieve the same thing via Shopify Python API. 我能够通过REST API实现它,但是,我想知道如何通过Shopify Python API实现相同的功能。

Here's the code I tried in Postman: 这是我在邮递员中尝试的代码:

https://{shop}.myshopify.com/admin/api/2019-07/customer_saved_searches/{customer_saved_search_id}/customers.json?limit=250

Also, it seems like there's a 250 results limit in the REST API, is there a way to exceed it? 另外,REST API似乎有250个结果限制,有没有办法超过它?

The Python SDK is a bit of afterthought of Shopify. Python SDK是Shopify的后事。 Sadly. 可悲的是。

Regarding the paging on th REST request. 关于REST请求的分页。 Just add the query parameter ...?page=2 at the end of your URL. 只需在URL末尾添加查询参数...?page=2

Regarding the Python SDK, following will do the trick: 关于Python SDK,以下方法可以解决问题:

id = 23423423423
css = shopify.CustomerSavedSearch.find(id)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM