return Create
Requires access scope or
access scope. Also: Requires the
access scope. The user must have access to return orders.
Creates a return from an existing order that has at least one fulfilled line item that hasn't yet been refunded. If you create a return on an archived order, then the order is automatically unarchived.
Use the mutation when your workflow involves
approving or
declining requested returns
outside of the Shopify platform.
The mutation performs the following actions:
- Creates a return in the
state, and assumes that the return request from the customer has already been approved
- Creates a reverse fulfillment order, and enables you to create a reverse delivery for the reverse fulfillment order
- Creates a sales agreement with a
reason, which links to all sales created for the return or exchange
- Generates sales records that reverse the sales records for the items being returned
- Generates sales records for any exchange line items
After you've created a return, use the
return
query to retrieve the
return by its ID. Learn more about providing a
return management workflow
for merchants.
Arguments
- Anchor to returnInputreturn•Return
Input Input!required Specifies the input fields for a return.
- Anchor to returnreturn•Return
The created return.
- Anchor to userErrorsuser•[Return
Errors User Error!]!non-null The list of errors that occurred from executing the mutation.