API Method to trigger Return Items

New Member
5 0 0

 

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

return.png

return1.png

0 Likes
Shopify Partner
871 76 187

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! 

0 Likes
New Member
5 0 0

Hi Greg,

Thanks for your reply.

I am not looking to create a refund but to replicate behavior of "return items" action using API.

0 Likes
Shopify Partner
871 76 187

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

0 Likes
New Member
5 0 0

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 :
return_UI.pngreturn_API.png

 

0 Likes
New Member
5 0 0

I have opened ticket with Shopify, went on to chat. No solution on how to replicate "Return Items" action using API.

0 Likes