New return APIs to create exchanges, add fees, remove return lines and calculate returns
API
Effective July 01, 2024
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.