Retrieve a return

Topic summary

Main issue: how to obtain a Return ID to retrieve or act on a return via Shopify’s Fulfillment Returns API.

Initial findings: Using REST (e.g., {store_url}/orders.json?return_status=return_requested) didn’t expose a Return ID. Checking /admin/orders/{order_id}.json was suggested, but it was unclear if return status/ID appears there. Concern was raised that returns initiated in Shopify Admin UI don’t expose a Return ID via REST, blocking approve/decline operations that require it.

Update/solution: Use Admin GraphQL. Query orders filtered by return status (OrderReturnStatus) to get the return request ID. With that ID, you can approve, decline, or cancel the return via the Returns API endpoints. Example docs and an illustrative screenshot were shared. Key terms: Return ID (identifier for a return request), REST (HTTP-based API), Admin GraphQL (Shopify’s graph-based API enabling targeted fields/filters).

Current status: A follow-up asks how to fetch only orders that have a Return ID (GraphQL filtering guidance). No final answer yet; discussion remains open. Images: one screenshot supports the GraphQL approach but isn’t required to understand the solution.

Summarized with AI on December 29. AI used: gpt-5.

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.

1 Like

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

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.

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

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_an_order

  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.

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.