graphQL Query to get orders that have returns?

graphQL Query to get orders that have returns?

Chris_Sydney
Shopify Partner
108 4 23

Hey, 

 

I am looking for a graphQL query that that gets the order numbers for returns? I think it needs to be query orders {}

 

Preferably with the returnID so I can use the query {}. 

 

I guess, I want to get a list of all orders with returns on them and also filter by an update date. 

 

Any ideas?

Reply 1 (1)

Rahul02
Shopify Partner
3 0 0

I think you need the Orders through admin api you can try this query in graphql admin api

 

query GetReturnOrders {
orders(first: 10, query: "return_status:returned") { # Adjust the number as needed
edges {
node {
id
name # Order number
returnStatus
createdAt
                            }
                   }
         }
}