Skip to main content
object

An error that occurs during the execution of a return mutation.

•ReturnErrorCode

The error code.

•[String!]

The path to the input field that caused the error.

•String!non-null

The error message.


Was this section helpful?

•mutation

Approves a customer's return request. If this mutation is successful, then the Return.status field of the approved return is set to OPEN.

Arguments

•ReturnApproveRequestInput!required

The input fields to approve a return.


Fields

•Return

The approved return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Cancels a return and restores the items back to being fulfilled. Canceling a return is only available before any work has been done on the return (such as an inspection or refund).

Arguments

•ID!required

The ID of the return to cancel.

•BooleanDeprecatedDefault:false

Fields

•Return

The canceled return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Indicates a return is complete, either when a refund has been made and items restocked, or simply when it has been marked as returned in the system.

Arguments

•ID!required

The ID of the return to close.


Fields

•Return

The closed return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

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 returnCreate mutation when your workflow involves approving or declining requested returns outside of the Shopify platform.

The returnCreate mutation performs the following actions:

  • Creates a return in the OPEN 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 RETURN 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

•ReturnInput!required

Specifies the input fields for a return.


Fields

•Return

The created return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Declines a return on an order. When a return is declined, each ReturnLineItem.fulfillmentLineItem can be associated to a new return. Use the ReturnCreate or ReturnRequest mutation to initiate a new return.

Arguments

•ReturnDeclineRequestInput!required

The input fields for declining a customer's return request.


Fields

•Return

The declined return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Removes return lines from a return.

Arguments

•ID!required

The ID of the return for line item removal.

•[ReturnLineItemRemoveFromReturnInput!]!required

The return line items to remove from the return.


Fields

•Return

The modified return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Refunds a return when its status is OPEN or CLOSED and associates it with the related return request.

Arguments

•ReturnRefundInput!required

The input fields to refund a return.


Fields

•Refund

The created refund.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Reopens a closed return.

Arguments

•ID!required

The ID of the return to reopen.


Fields

•Return

The reopened return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

A customer's return request that hasn't been approved or declined. This mutation sets the value of the Return.status field to REQUESTED. To create a return that has the Return.status field set to OPEN, use the returnCreate mutation.

Arguments

•ReturnRequestInput!required

The input fields for requesting a return.


Fields

•Return

The requested return.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Creates a new reverse delivery with associated external shipping information.

Arguments

•ReverseDeliveryLabelInputDefault:null

The return label file information for the reverse delivery.

•BooleanDefault:true

When true the customer is notified with delivery instructions if the ReverseFulfillmentOrder.order.email is present.

Anchor to reverseDeliveryLineItemsreverseDeliveryLineItems
•[ReverseDeliveryLineItemInput!]!required

The reverse delivery line items to be created. If an empty array is provided, then this mutation will create a reverse delivery line item for each reverse fulfillment order line item, with its quantity equal to the reverse fulfillment order line item total quantity.

Anchor to reverseFulfillmentOrderIdreverseFulfillmentOrderId
•ID!required

The ID of the reverse fulfillment order that's associated to the reverse delivery.

•ReverseDeliveryTrackingInputDefault:null

The tracking information for the reverse delivery.


Fields

•ReverseDelivery

The created reverse delivery.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Updates a reverse delivery with associated external shipping information.

Arguments

•ReverseDeliveryLabelInputDefault:null

The return label file information for the reverse delivery.

•BooleanDefault:true

If true and an email address exists on the ReverseFulfillmentOrder.order, then the customer is notified with the updated delivery instructions.

•ID!required

The ID of the reverse delivery to update.

•ReverseDeliveryTrackingInputDefault:null

The tracking information for the reverse delivery.


Fields

•ReverseDelivery

The updated reverse delivery.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.

•mutation

Disposes reverse fulfillment order line items.

Arguments

•[ReverseFulfillmentOrderDisposeInput!]!required

The input parameters required to dispose reverse fulfillment order line items.


Fields

Anchor to reverseFulfillmentOrderLineItemsreverseFulfillmentOrderLineItems
•[ReverseFulfillmentOrderLineItem!]

The disposed reverse fulfillment order line items.

•[ReturnUserError!]!non-null

The list of errors that occurred from executing the mutation.


Was this section helpful?


Was this section helpful?