Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Create Return with Exchange GraphQl Api

Create Return with Exchange GraphQl Api

deepaksamria
Excursionist
15 0 10

Hi Everyone,

 

We are working with the Return APIs of Shopify and got confused about the below. Will anyone help me with this?

 

- This is about creating a return with the exchange. I have seen the Return Object in the release candidate and unstable version of the APIs there we can see the object exchangeLineItems but while creating the return (returnRequest API and returnCreate API) none of the APIs take exchangeLineItems as input. However, I checked the flow in the UI exchange option is available in the Seller Panel. If the exchangeLineItem is not part of creating return APIs, how can we create a return with exchange?  What is the right flow for the same?

 

Regards

Deepak Samria

Replies 5 (5)

learnerSquad
Shopify Partner
6 0 0

Hi Deepak,
I also want to implement the exchange like functionality, 

How did you implement it?

deepaksamria
Excursionist
15 0 10

Hi,

 

I'm still looking for a solution, but I haven't gotten anything as of now.

ShopifyDevSup
Shopify Staff
1453 238 525

Hi @deepaksamria and @learnerSquad,

Good news! Creating returns with exchanges is now available in the unstable version of the Admin API by including the exchangeLineItems in the ReturnInput.

 

Please note however that this is currently only available for the ReturnInput specifically, so would only be usable with the returnCreate mutation at this time. 

 

Additionally, it's important to understand that the unstable api version includes features and modifications that are still under development. Their behaviour is not guaranteed or supported as we may frequently alter them while we continue to work on new features.
 

Typically, new features are seen in the unstable version prior to a stable release. However, there's no assurance that changes in the unstable version will ultimately be released. A feature could be added to the unstable version, only to be removed later. As a result, we suggest using the unstable version for testing before new features are launched. However, we advise against using it for live apps and stores in a production environment.

 

I hope this helps, and I hope you have a great day 🙂

 

 

 

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

Dieter-247APPS
Shopify Partner
104 24 71

When fetching the order by admin APIs how so you which items are being replaced?

Shopify App Entwickler - Shopify Experts - Shopify Partners

https://247apps.dev
stefan-koblenz
Shopify Partner
22 7 14

Hi @ShopifyDevSup and @deepaksamria , this is not really a solution on the issue 😞 It seems that there is the capability to add exchanges to a Return-Request that is made by the shopify-admin-ui:

 

Screenshot 2024-07-15 at 10.58.27.png

 

Screenshot 2024-07-15 at 10.58.53.png

For demonstration we recorded this demo here -> https://youtu.be/peTHzR-GQXo?si=zOskTVz29qsL_WA9&t=212 

 

It seems this endpoint is missing or only available internally within shopify:

 

Screenshot 2024-07-15 at 11.56.19.png