Exchange order details

I’m trying to retrieve the datetime and location/facility where an exchange is created in Shopify. What’s the recommended way to access this information using GraphQL?

So far, I’ve been following this relationship:

order → refunds → return → exchangeLineItems

However, I’m not seeing a clear way to get the exchange creation timestamp or the associated location. Am I on the right path, or is there a better GraphQL query/connection for this use case?

1 Like

Hey @Chinmay_Sharma,

ExchangeLineItem doesn’t have createdAt or location fields directly, so you’ll need to grab those from adjacent objects.

For the timestamp, you can use Return.createdAt or ReturnAgreement.happenedAt via order.agreements.

For location, that lives on ReverseFulfillmentOrderDisposition through Return → reverseFulfillmentOrders → lineItems → dispositions → location. One caveat, if “don’t restock” was selected, no disposition record gets created. I covered some workarounds for that in a previous thread.