Why does Shopify API show refunds only for the last two months?

feel_vitalii
Shopify Partner
6 0 0

I'm trying to get refunded orders with rest api, but I can see refunds only for last 2 month. When I did same few weeks ago it also show me only last 2 month refunds. 

Replies 6 (6)

Gabe
Shopify Staff
16357 2587 3853

Hey @feel_vitalii 

 

You have reached the German community here but we can chat in English too. 😉

 

It's not quite clear what the issue is. Are you building an app, and if yes, what type of app?

 

Have you checked the API documentation and are you using a GET like the following?

 

It would be best to utilize a more recent versioning, such as 2022-10 or 2023-10. If you are curious to look, we do have a document that covers the Shopify API Versions here (click here). I would recommend testing a new GET Request via a new versioning, and using this API documentation for reference. This should allow you to pull the data you're after appropriately.

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog

feel_vitalii
Shopify Partner
6 0 0

@Gabe ty for reply!
But i'm using latest api to get orders with fin status "refunded".

The problem is that i receive data only for last 2 month. 
For example, today i did api call and get last order with created date "3 Dec 2022". Yesterday it was "2 Dec 2022".
I tried to do this call for several Shopify stores.

feel_vitalii_0-1675257596268.png

 

Gabe
Shopify Staff
16357 2587 3853

Hey @feel_vitalii 

 

As this seems to be an issue with the system, in order to assist you with this, we will need to do this via a ticket. Have you already opened a ticket with our support team?

 

If not, please send an email to our support here from the email address you use to log in to your Shopify store, and enter your myshopify.com URL there as well. Once they authenticate your account, they can help you out.

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog

Gabe
Shopify Staff
16357 2587 3853

Hey @feel_vitalii 

 

Have you found a solution yet? If not, can you post the full api call code here in this thread that you are using to get the orders with fin status refunded? As your screenshot shows a code that is coming to the same 2-month max result for several stores, there could be an issue with your call.

 

Could you try changing the parameters to see if that changes anything i.e. the financial_status parameter is set to "refunded,", the limit parameter is set to 250, which is the maximum number of orders that can be returned in a single API call and the status parameter is set to "any," which means that it will return orders in any order status? Perhaps try changing this last parameter.

 

So to retrieve orders with a different financial status and over a longer time period, you can try adjusting the parameters in your API call for a set timeframe. For example, if you want to retrieve all orders regardless of financial status and over the past year, you can use the following API call for testing purposes:

 

https://${shopUrl}/admin/api/2022-10/orders.json?limit=250&status=any&created_at_min=2022-02-10T00:00:00-00:00

 

This API call will return up to 250 orders with the financial status "refunded" that were created in the last 12 months. The created_at_min parameter specifies the minimum date and time for which orders will be returned, in this case, February 10th, 2022 at 00:00:00.

Note that the limit parameter can be adjusted to retrieve a different number of orders, and the created_at_min parameter can be adjusted to retrieve orders over a different time period.

 

You could try other Statuses. In the Shopify API, the status parameter can be set to several different values to filter orders based on their order status and any of these can also be refunded. Some of the possible values include:

  • open: Returns orders that are open, meaning they have been created but not yet closed.

  • closed: Returns orders that have been closed, meaning they have been processed and completed.

  • cancelled: Returns orders that have been cancelled by the customer or the merchant.

  • pending: Returns orders that are pending payment.

  • processing: Returns orders that are being processed.

  • fulfilled: Returns orders that have been fulfilled, meaning the products have been shipped to the customer.

  • unfulfilled: Returns orders that have not been fulfilled.

You can specify a single status value or a comma-separated list of multiple status values to retrieve orders that match any of those statuses. For example:

 

https://${shopUrl}/admin/api/2022-10/orders.json?limit=250&status=closed,fulfilled&financial_status=refunded

 

This API call will return up to 250 orders with the financial status "refunded" and an order status of either "closed" or "fulfilled."

 

 

Let me know and we can try to troubleshoot this further! 😉

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog

feel_vitalii
Shopify Partner
6 0 0

When I try to count it I can see more amount if I try to get this orders with request..

 

image.png

image2.png

  

 
Gabe
Shopify Staff
16357 2587 3853

Hey @feel_vitalii 

 

Perhaps this error and troubleshooting guide might help, as well as the shopify-app-node (GitHub repo) that might be worth exploring.

Otherwise, try some other common troubleshooting steps like: updating versions for CLInode and npm which may help rule out local factors. Past that, for errors and more technical questions regarding the Shopify CLI directly, this GitHub repo (CLI) is going to be a good place to post! If you can't find an open issue that is directly related to what you are seeing (or asking), feel free to create a new one there and include as much detail as possible.

Gabe | Social Care @ Shopify
 - War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen! 
 - Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung 
 - Um mehr zu erfahren, besuche das Shopify Help Center oder den Shopify Blog