Retrieve a return

A7am
Shopify Partner
1 0 1

I need to retrieve a return, I am stuck with this how to get a return Id in order to retrieve a return.
When we do request a return, I get the return ID. 
But Other than that there is a way to get the return ID using admin APIs.

I have also tried this 
{store_URL}/orders.json?return_status=return_requested

In this i did not got the return ID.

Replies 5 (5)

Nafiul
Shopify Partner
39 4 7

Please check the order data using the get request /admin/orders/{order_id}.json  and then check the response in your console and then you will figure out how you can use it. But I am not sure if you will get the return status or not but you will get the return id. 

Thank you
Nafiul

- Was my reply helpful? Please Click Like
- Question answered? Mark it as an Accepted Solution.
Your Coffee Tip fuels our coding support magic.BUY ME A COFFEE
Looking for an experienced Shopify developer? Visit PointerFlow.com

Pahadsingh
Shopify Partner
4 0 0

Is there an update on this?

Seems like Return ID is only available if return is created using API call - https://shopify.dev/docs/apps/fulfillment/returns-apps/returns#step-2-request-a-return.

There seems no way to fetch the return ID if the return was initiated using Shopify Admin UI. And retrieving a return needs the ID -https://shopify.dev/docs/apps/fulfillment/returns-apps/returns#step-2-request-a-return 

Same applies to the Approve/Decline operations for Returns, where Return ID is mandatory.

 

It will be great if someone from Shopify can through some light on this.

tushargtti
Visitor
3 0 0

Was there any update on it, we are also looking to retrieve Returns from Shopify.

Pahadsingh
Shopify Partner
4 0 0

Yes, can be done through GraphQL

  1. Get Orders with Returns requested. This gives the request ID needed for subsequent calls.
    You can filter the results based on order#.
    Examples - https://shopify.dev/docs/api/admin-graphql/2024-01/queries/order#examples-Get_sales_agreements_for_a...
    order.png

     

  2. List of available Statuses that you could use - https://shopify.dev/docs/api/admin-graphql/2024-01/enums/OrderReturnStatus
  3. Using the Return ID
    1. Approve Return - https://shopify.dev/docs/apps/fulfillment/returns-apps/returns#approve-a-request
    2. Decline Return - https://shopify.dev/docs/apps/fulfillment/returns-apps/returns#decline-a-request
    3. Optional, Cancel return - https://shopify.dev/docs/apps/fulfillment/returns-apps/returns#step-5-optional-cancel-a-return

Hope this saves some time.

tushargtti
Visitor
3 0 0

Yes it does saves a lot of time. Is there a way to get only the Orders with Return Id. I'm new to GraphQL so trying to understand as I go.