Solved

REST-API Order List Get API

babyorgano
Tourist
6 0 3

Hello Team,
I'm trying to get a list of orders using the rest API with a specific date and time, but the API response isn't returning accurate results.

Screenshot_5.png

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1358 226 475

This is an accepted solution.

Hi babyorgano,

 

Thanks for your post. The created_at time in the screenshot is 2022-12-18T04:36:54+05:30, which has a timezone modifier within it of +05:30 hours. 

 

When no timezone modifier is specified in the created_at_max and created_at_min fields of the Orders API query the system defaults to the UTC timezone which has a timezone modifier of 0 hours.

 

So, when the timezone modifier of +5:30 hours is subtracted from the created_at time of 2022-12-18T04:36:54+05:30 it is 2022-12-17T23:06:54+00:00 which is within the time specified in the query in UTC time.

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1358 226 475

This is an accepted solution.

Hi babyorgano,

 

Thanks for your post. The created_at time in the screenshot is 2022-12-18T04:36:54+05:30, which has a timezone modifier within it of +05:30 hours. 

 

When no timezone modifier is specified in the created_at_max and created_at_min fields of the Orders API query the system defaults to the UTC timezone which has a timezone modifier of 0 hours.

 

So, when the timezone modifier of +5:30 hours is subtracted from the created_at time of 2022-12-18T04:36:54+05:30 it is 2022-12-17T23:06:54+00:00 which is within the time specified in the query in UTC time.

 

Hope you have a great day

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog