Re: Inconsistent API response for orders

Solved

Inconsistent API response for orders

collabpay
Shopify Partner
3 1 1

I'm querying the orders API for the latest data for stores and getting inconsistent results.

 

/admin/api/2023-07/orders.json
{
created_at_min: '2023-09-25T23:37:41-00:00',
limit: 50,
financial_status: 'paid,partially_paid,partially_refunded,refunded'
}

 

Sometimes it's returning data, other times it returns nothing. This is for the same query parameters. I'm not hitting any rate limits. 

 

Anything I'm missing to why it would be returning different data?

Accepted Solution (1)
collabpay
Shopify Partner
3 1 1

This is an accepted solution.

Hi @SBD_ 

 

I have found the issue. Looks like the orders were being archived before I could sync them into my app.

 

I have added status: 'any'  to the query and it has fixed it.

 

Thank you for your time.

View solution in original post

Replies 2 (2)

SBD_
Shopify Staff
1829 272 417

Hey @collabpay 

 

Are you changing created_at value, or are any order statuses changing? Are you still able to replicate?

Scott | Developer Advocate @ Shopify 

collabpay
Shopify Partner
3 1 1

This is an accepted solution.

Hi @SBD_ 

 

I have found the issue. Looks like the orders were being archived before I could sync them into my app.

 

I have added status: 'any'  to the query and it has fixed it.

 

Thank you for your time.