Looking Up Refunds in GraphQL

Highlighted
Explorer
83 0 19

Is there a way I can query all refunds during a date range via the GraphQL API? I know I can query orders and hope that the updated_at column relates to the refund, but there could be a chance an order was updated after the refund processed and thus I'm not really searching the refund window, but rather any order changes.

 

It seems kind of crazy that there is no way to filter orders by when refunds happened, but also no way to look up refunds separately from orders. Is there a way to tie a TenderTransaction back to the order associated with it? I'm not seeing any related order identifiers on that object type.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 170

Hey @MrPunkin , 

 

The TenderTransaction resource does provide the order_id that the transaction is associated to, but it looks like that is only returned with the REST endpoint for some reason. I'll log an issue to see if we can get that added to GraphQL as well, that seems like an oversight. 

0 Likes
Highlighted
Explorer
83 0 19

Josh,

 

That'd be excellent, thank you. It does seem like an oversight to me as well. I'd love to transition to the GraphQL endpoint for this data but without parity between the two endpoints it's not possible just yet.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 170

Hey again @MrPunkin , 

 

Great news! We're going to push out a change to add the order ID to tender transactions in GraphQL. Provided there aren't any major issues, it should be ready to go by the end of the day - but if you don't see the change by then, things should be ready for Monday. 

0 Likes
Highlighted
Explorer
83 0 19

That's great news, thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 170

Hey again @MrPunkin , 

 

Apologies, looks like my time estimate was off by a day - this code change should be shipping out within the next few hours provided no major issues arise. Keep your eyes peeled!

0 Likes
Highlighted
New Member
3 0 0

Hey josh if orderid is now in tenderTransactions what is it called I don't see it in the documentation or the explorer.  Thank you.  Jason

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1129 82 170

Hey @bookkeepapp

 

It's available as order_id through the REST API, but it doesn't appear to be available via GraphQL yet. I had thought we had added it there too, I'll look into that. 

 

Edit : Correction, the order ID is available in the GraphQL API. It is currently only available on the 'unstable' version though, so you won't see it unless you're specifically calling that version. Keep an eye out for it in a future stable API release though. 

0 Likes
Highlighted
New Member
2 0 0

Hi @Josh 

 

Did the Order Id every get committed to the GarphQL TenderTransactions?

 

I am looking for orderId and order_id on TenderTansactions on any version (including unstable) and I get an error saying the field doesn't exist. 

 

Please can you update as I believe this is the only way to get a concise list of redunds through GarphQL but it is useless without a reference to the order. 

 

Thanks,

 

0 Likes
Highlighted
Explorer
83 0 19

@hisimon : We have been leveraging the TenderTransaction REST API endpoint since this thread started and it's worked just fine for us. I know it should exist in the GraphQL API, but until then we simply get a list of all TenderTransactions that are refunds, grab the order_id field, then use that to grab the rest of our order data for those orders which have refunds via the GraphQL API.

 

I know it doesn't solve the problem of it not being available, but just giving some info on how we have been getting that info in the meantime in case it can help. Best of luck.

0 Likes