Help identifying return date for Shopify exchanges (no refund) to sync return status in our app

We’re working on handling Shopify returns involving exchanges (with no refund) in our app, Fulfil, and need help determining the correct return date to sync the return status.

  • Fulfil requires both a restock location and a return date to mark a return as closed.
  • Currently, we use the refund transaction date from the Shopify Returns API as the return date.
  • For exchanges, there’s no refund, so no return date is available using the current logic.
  • Because of this, the return remains open in Fulfil even though it’s closed in Shopify.
  • We’d like to know which field(s) in the Shopify API we can use to determine the return or closure date for exchanges when no refund is issued.

Any guidance would be greatly appreciated.

1 Like

Hey @Dinesh_Kumar_R!

I was just testing this here, and for a date on the return, you can get this in the order.agreements object in the happenedAt field.

Here’s an example of a basic query to get this timestamp:

{
    order(id: "gid://shopify/Order/12345678910") {
        id
        returnStatus
        agreements(first: 10) {
            nodes {
                ... on ReturnAgreement {
                    id
                    happenedAt
                }
            }
        }
    }
}

Hey @Dinesh_Kumar_R , just checking in to make sure the above helped!