Development discussions around Shopify APIs
As i said in subject. I have a filter query in rest API. But that filters query returns all the new and old orders. Means the same order is being repeated everytime with new orders/Product included to it. So i want to know is there any tag or column specifying that this particular order has been imported or not. If anything similar to it please let me know. Or put me in different view way like can we avoid orders/product which has been pulled already.
I am not sure I understand completely what you mean, but it is possible to get orders from the API that have been done after an specific order ID. That might be helpful for you... i.e.:
Retrieve all orders after the specified ID
GET /admin/api/2020-01/orders.json?since_id=123
Ok consider this filter criteria "updated_at_min=10&status=open". I made it problematically this filter criteria to use every time. So i run first at 10 a.m let say i get 100 records. Next time i run after a 15 min gap i.e 10.15 a.m. I get 150 records. Which is 100 records i already pulled earlier and only 50 new records has came. So my question is how to avoid those 100 records on second try or avoid pulling same records in subsequent request. Hope now it is clear . If not plz let me know. Thanks in advance.
you can avoid the old records by saving the ID from the last order retrieved and using the filter since_id. By doing that you will just get all orders that have been generated after the ID that match with the other criteria of your search.
Also consider adding a limit (max 250) to your request, to avoid missing any records.
User | RANK |
---|---|
60 | |
11 | |
7 | |
7 | |
6 |
Thanks to all who participated in our AMA with 2H Media on planning your 2023 marketing bu...
By Jacqui Mar 30, 2023Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023