For a Shopify order we can do a "Return Items" action as seen in image below.
I am looking for correct API method to achieve this
If you haven't already created a fair amount of code that relies on the REST API, I would start off using the GraphQL API. Here is the documentation detailing how a new refund is created --> https://shopify.dev/docs/admin-api/graphql/reference/orders/refundcreate. Although I'm not sure if this endpoint allows the API consumer to pass along a refund reason. Whereas the REST API does appear to include this --> https://shopify.dev/docs/admin-api/rest/reference/orders/refund#create-2020-10.
Hope this helps a little!
Thanks for your reply.
I am not looking to create a refund but to replicate behavior of "return items" action using API.
Right, but this is essentially the same animal that you are skinning. See here for more info --> https://community.shopify.com/c/Shopify-APIs-SDKs/Return-API/td-p/640771.
I have seen that post, but not sure what to make it.
Is the post suggesting that there is not API method to achieve "Return Items" or I should use "Refund" method ?
I have tried refund method with 0.00 amount. The result is not same as when I use Shopify user interface to do a "Return Items" . May be I am not passing the right parameters.
|From Shopify UI :||From Shopify API :|
This is simply not possible yet. You cannot replicate the "Return Items" functionality using the REST Admin or GraphQL Admin APIs. Shopify mentioned they are working on expanding their API to expose this functionality, but no timeline is given.
Until then, we are forced to use refunds with restock_type: "return".
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022