Solved

Refund API

Lovenishgarg
Visitor
1 0 1

We are analyzing the Refund Order API for our use case and following the below documentation

https://shopify.dev/api/admin/rest/reference/orders/refund#index-2021-07

 

Use case: We want to fetch all the Refunds created after a defined time frame, irrespective of the orders they belong to.

 

We are using a similar pattern in our Order API, with the following criteria

https://shopify.dev/api/admin/rest/reference/orders/order

created_at_min - Show orders created at or after date.

 

Do we have this functionality available for Refund API?

If not, is there an alternative to know the Refunds created in the system without knowing the Order ID?

Accepted Solution (1)

AndrewYap
Visitor
1 1 0

This is an accepted solution.

Hi @Lovenishgarg you can trying adding these attribute when you call the order api,

"status=any" => to take all order including archived order

"financial_status=refunded" => to filter order only take in refunded

"processed_at_min=YYYY-MM-DD&processed_at_max=YYYY-MM-DD" => to set defined time frame

eg:- "/admin/api/2021-10/orders.json?status=any&financial_status=refunded&processed_at_min=2021-10-01&processed_at_max=2021-10-02"

 

Hope this help you.

View solution in original post

Replies 2 (2)

AndrewYap
Visitor
1 1 0

This is an accepted solution.

Hi @Lovenishgarg you can trying adding these attribute when you call the order api,

"status=any" => to take all order including archived order

"financial_status=refunded" => to filter order only take in refunded

"processed_at_min=YYYY-MM-DD&processed_at_max=YYYY-MM-DD" => to set defined time frame

eg:- "/admin/api/2021-10/orders.json?status=any&financial_status=refunded&processed_at_min=2021-10-01&processed_at_max=2021-10-02"

 

Hope this help you.

markmaurerrr
Shopify Partner
5 0 7

How can this answer be accepted? processed_at is no indicator for when the refund was made.
I still can't believe there is no proper refunds endpoint and we have to process basically through all orders and check the refunds node children for the refund dates.

Bildschirmfoto 2023-06-19 um 20.59.13.png