A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
1. Expected Behavior vs. Actual Behavior
We are trying to use the new Exchange API, but are failing to make a returnCreate call from a return request. As we show here in detail https://www.youtube.com/watch?v=peTHzR-GQXo
2. Timeframe - When did this happen?
We tried it many times, last try was Sunday 14th of July at 14:13pm german summertime.
It happens the first time, because the feature was only released with the API version (SummerEditions) 2024.
3. Environment & Scope of the Issue - Which app is making the API call? URL of app in Partner Dashboard or Store Admin is best:
- shopify-graphiql-app
- API-Version: 2024-07
- Call made via Graph API (see here https://youtu.be/peTHzR-GQXo?si=zOskTVz29qsL_WA9&t=212)
What specific part of the official API docs are being followed?
https://shopify.dev/docs/apps/build/orders-fulfillment/returns-apps/build-return-management#step-4-o...
4. Replication and Raw Example
- https://youtu.be/peTHzR-GQXo?si=zOskTVz29qsL_WA9&t=212
In Store [https://admin.shopify.com/store/247apps-02]
By App [https://admin.shopify.com/store/247apps-02/apps/shopify-graphiql-app]
For Order [https://admin.shopify.com/store/247apps-02/orders/5658330005740]
It seems there is a endpoint which is missing or only available internally by Shopify:
which is done by the shopify-admin-ui
But actually not available via the public graph-api
|
Hi Stefan,
Thanks for explaining this very well and including a video too - I've reached out to the product team in this area to assist with troubleshooting this. I will update here when I have more info.
Liam | Developer Advocate @ 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
Hi again Stefan,
After connecting with our product team on this, it looks like the issue you're experiencing is because you're creating a return for an item that's already part of another return (in the requested state). In the second example (through the native admin) you're able to complete the flow successfully because the item to be returned is not in another return. You cannot add exchange items to a requested return via API today - instead you should use the returnCreate mutation.
If this mutation/ flow doesn't work for you, can you explain why you want to add exchange items to a requested return, rather than creating a return given you have a return app that seems to approve/decline the returns?
Liam | Developer Advocate @ 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
Hi @Liam , nice to hear from you, maybe you remember we met in Berlin a couple years ago.
You cannot add exchange items to a requested return via API today - instead you should use the returnCreate mutation.
That's the point. It seems there is a endpoint for that. If you have a return request and you accept this one with a exchange item shopify-admin is doing the following call:
Exactly this call is essential important to accept a return request via the api and add the exchange informations. But this call/mutation is not available for us partners/dev's.
A colleague of you also mentioned there exist this mutation:
mutation returnEditAddExchangeLineItems($input: ReturnEditAddExchangeLineItemsInput!) {
returnEditAddExchangeLineItems(input: $input) {
I guess this is internally used but not a public one.
Glad to hear from you Liam, have a great day!