Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Refund orders - API

Refund orders - API

Remonsam
Visitor
1 0 0

 

I'm trying to build an API to get the daily sales like this report (admin/reports/sales_over_time?since=2022-02-21&until=2022-02-21), but I didn't find a direct way to call this report through the API.

 

the only way I found is to call this API 

(/admin/api/2022-01/orders.json?status=any&created_at_min=2022-02-21T00:00:00-05:00&created_at_max=2022-02-22T00:00:00-05:00&limit=250) which is fine , however this API doesn't include the refund/return, and to do this I have to use the financial_status=refunded which ignore the dates created_at_min and created_at_max even I try to use updated_at_min and updated_at_max, but still the financial_status=refunded ignores the dates and bring all the refunds orders
 
any help, how I can get all the orders including the refund , or how I can get the refund orders between dates from and to 
 
Thanks
 
 
 

 

Reply 1 (1)

CloudlabSam
Shopify Partner
599 49 105

This call worked for me. Are you sure you aren't looking for partially_refunded

 

/admin/api/2022-01/orders.json?status=any&created_at_min=2022-02-21T00:00:00-05:00&created_at_max=2022-02-22T00:00:00-05:00&financial_status=refunded&limit=250