Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
From what I read here, the refunds have linked order_adjustments that contain, among other things, the shipping refund amounts.
However, I can't find their corresponding equivalent on the GraphQL API Refund object.
How can I find how much the shipping refund accounts for in an existing refund using the GraphQL API ?
Solved! Go to the solution
This is an accepted solution.
Hey @Elrendio
Seems like it's in the works. I was able to access using the unstable version of the API via refunds.orderAdjustments:
POST /admin/api/unstable/graphql.json
{
order(id: "gid://shopify/Order/...") {
refunds {
orderAdjustments(first:10) {
edges {
node {
id
}
}
}
}
}
}
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hey @Elrendio
Seems like it's in the works. I was able to access using the unstable version of the API via refunds.orderAdjustments:
POST /admin/api/unstable/graphql.json
{
order(id: "gid://shopify/Order/...") {
refunds {
orderAdjustments(first:10) {
edges {
node {
id
}
}
}
}
}
}
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thank you !
I'm going to wait until it's on a stable version to start using it though, I wouldn't want everything to suddenly break 🙂
Hi @SBD_ !
This query is not working anymore, I receive this error:
"Field 'orderAdjustments' doesn't exist on type 'Refund'"
Do you know what's the best way to query 'orderAdjustments'?
I tried putting it into Order but it's not working yet 😛
Hey @Yuxin_x
This field is still only available on the `unstable` version of the API.
/admin/api/unstable/graphql.json
Scott | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog