How to get all daily refunds via API

Solved
gg7
New Member
1 0 1

Hello there,

 

I'm wondering if it's possible to get a daily list of all refunds for the day without having to query through each past order as specified here: https://help.shopify.com/en/api/reference/orders/refund

It seems quite inefficient to have to go through each order to find all refunds.

 

Thanks!

Accepted Solution (1)

Accepted Solutions
Visely-Team
Shopify Partner
1843 210 464

This is an accepted solution.

You can use Orders API - https://help.shopify.com/en/api/reference/orders/order#index-2020-01 - with financial_status=refunded query param as well as updated_at_min and updated_at_max

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog

View solution in original post

Replies 4 (4)
Visely-Team
Shopify Partner
1843 210 464

This is an accepted solution.

You can use Orders API - https://help.shopify.com/en/api/reference/orders/order#index-2020-01 - with financial_status=refunded query param as well as updated_at_min and updated_at_max

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Sling
Shopify Partner
5 0 0

Hey Shopify Team!

I'm trying to get refunds for some orders in the way you proposed, I'm not entirely successful with it though.

So today we have Feb 25th 2021. We have a client who had some Order created on Nov 18th 2020. Then, this order was refunded on Jan 11th 2021. When I'm trying to fetch refunds like 

`/orders.json?limit=250&status=any&fields=id&since_id=1&financial_status=refunded&updated_at_min=2021-01-01`

I'm not getting this order in the response. Does this relates to https://community.shopify.com/c/API-Announcements/ACTION-REQUIRED-Apps-require-Shopify-approval-to-r... Is this expected behaviour?

 

Thanks, Pawel

hamma11
Tourist
4 0 1

facing similar issue. were you able to solve it? thanks

 

jenkinsbilly
New Member
1 0 0

Hi there, this does not solve the problem when pulling historical data.

 

If a purchase is made on day 1 and refunded on day 2, a confirmation email is sent on day 3. The orders 'updated_at' endpoint will not get the refund on the correct date, as a new 'updated_at' value is added on day 3.

 

The only real fix i see, is to use the proposed solution and then filter each day to find the discrepancies. Then manually search the orders in the platform and append the required fields to your dataset. I hope there is another way?