Developer changelog

Subscribe to the changelog to stay up to date on recent changes to Shopify’s APIs and other developer products, as well as preview upcoming features and beta releases.

Get updates by RSS

New return APIs to create exchanges, add fees, remove return lines and calculate returns

API

As of 2024-07 in the GraphQL Admin API, you can use new return APIs to interact with exchange primitives.

The returnCreate mutation can now take exchange line items with optional discounts, return shipping fees and restocking fees to be applied to return lines. A return with exchange line items will also create a new FulfillmentOrder for the new items to be sent to the customer. Note that canceling a return does affect the fulfillment of exchange items. Read more on how exchanges are processed here.

The returnLineItemRemoveFromReturn mutation is now available to remove return lines from a return. With returns creating sales, removing a return line from a return will also reversely impact return sales.

The returnCalculate query is now available to calculate financials before return creation, including inputs for return lines, exchange lines, fees and discounts. Learn more about how to use this query in our dev docs.