Return
Requires access scope or access scope.
The Return object represents the intent of a buyer to ship one or more items from an order back to a merchant
or a third-party fulfillment location. A return is associated with an order
and can include multiple return line items.
Each return has a status,
which indicates the state of the return.
Use the Return object to capture the financial, logistical,
and business intent of a return. For example, you can identify eligible items for a return and issue customers
a refund for returned items on behalf of the merchant.
Learn more about providing a return management workflow for merchants. You can also manage exchanges, reverse fulfillment orders, and reverse deliveries on behalf of merchants.
Anchor to FieldsFields
- closedAt (DateTime)
- createdAt (DateTime!)
- decline (ReturnDecline)
- exchangeLineItems (ExchangeLineItemConnection!)
- id (ID!)
- name (String!)
- order (Order!)
- refunds (RefundConnection!)
- requestApprovedAt (DateTime)
- returnLineItems (ReturnLineItemTypeConnection!)
- returnShippingFees ([ReturnShippingFee!]!)
- reverseFulfillmentOrders (ReverseFulfillmentOrderConnection!)
- staffMember (StaffMember)
- status (ReturnStatus!)
- suggestedFinancialOutcome (SuggestedReturnFinancialOutcome)
- totalQuantity (Int!)
- transactions (OrderTransactionConnection!)
- suggestedRefund (SuggestedReturnRefund): deprecated
- Anchor to closedAtclosed•Date
At Time The date and time when the return was closed.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the return was created.
- Anchor to declinedecline•Return
Decline Additional information about the declined return.
- Anchor to exchangeLineItemsexchange•Exchange
Line Items Line Item Connection! non-null The exchange line items attached to the return.
- Anchor to includeRemovedItemsinclude•Boolean
Removed Items Default:false Include exchange line items that have been removed from the order by an order edit, return, etc. Items that have been removed have a zero (LineItem.currentQuantity).
- Anchor to processingStatusprocessing•Return
Status Processing Status Filter Input Filter exchange line items by processing status.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- •ID!non-null
A globally-unique ID.
- Anchor to namename•String!non-null
The name of the return.
- Anchor to orderorder•Order!non-null
The order that the return belongs to.
- Anchor to refundsrefunds•Refund
Connection! non-null The list of refunds associated with the return.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to requestApprovedAtrequest•Date
Approved At Time The date and time when the return was approved.
- Anchor to returnLineItemsreturn•Return
Line Items Line Item Type Connection! non-null The return line items attached to the return.
- Anchor to processingStatusprocessing•Return
Status Processing Status Filter Input Filter return line items by processing status.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to returnShippingFeesreturn•[Return
Shipping Fees Shipping Fee!]! non-null The return shipping fees for the return.
- Anchor to reverseFulfillmentOrdersreverse•Reverse
Fulfillment Orders Fulfillment Order Connection! non-null The list of reverse fulfillment orders for the return.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to staffMemberstaff•Staff
Member Member The staff member that created the return.
- Anchor to statusstatus•Return
Status! non-null The status of the return.
- Anchor to suggestedFinancialOutcomesuggested•Suggested
Financial Outcome Return Financial Outcome A suggested financial outcome for the return.
- Anchor to returnLineItemsreturn•[Suggested
Line Items Outcome Return Line Item Input!]! required The line items from the return to include in the outcome.
- Anchor to exchangeLineItemsexchange•[Suggested
Line Items Outcome Exchange Line Item Input!]! required The exchange line items from the return to include in the outcome.
- Anchor to refundShippingrefund•Refund
Shipping Shipping Input The shipping amount from the associated order to include as a refund.
- Anchor to tipLineIdtip•ID
Line Id ID of the tip line item.
- Anchor to refundDutiesrefund•[Refund
Duties Duty Input!] The duties from the associated order to include as a refund.
- Anchor to refundMethodAllocationrefund•Refund
Method Allocation Method Allocation Default:ORIGINAL_PAYMENT_METHODS Specifies which refund methods to allocate the suggested refund amount to.
Arguments
- Anchor to totalQuantitytotal•Int!
Quantity non-null The sum of all return line item quantities for the return.
- Anchor to transactionstransactions•Order
Transaction Connection! non-null The order transactions created from the return.
- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
Arguments
- Anchor to suggestedRefundsuggested•Suggested
Refund Return Refund Deprecated - Anchor to returnRefundLineItemsreturn•[Return
Refund Line Items Refund Line Item Input!]! required The line items from the return to include in the refund.
- Anchor to refundShippingrefund•Refund
Shipping Shipping Input The shipping amount from the associated order to include in the refund.
- Anchor to refundDutiesrefund•[Refund
Duties Duty Input!] The duties from to associated order to include in the refund.
Arguments
Anchor to QueriesQueries
- return (Return)
- •query
Retrieves a return by its ID. A return represents the intent of a buyer to ship one or more items from an order back to a merchant or a third-party fulfillment location.
Use the
returnquery to retrieve information associated with the following workflows:A return is associated with an order and can include multiple return line items. Each return has a status, which indicates the state of the return.
- •ID!required
The globally-unique ID of the return to retrieve.
Arguments
- •ID!
Anchor to MutationsMutations
- removeFromReturn (RemoveFromReturnPayload)
- returnApproveRequest (ReturnApproveRequestPayload)
- returnCancel (ReturnCancelPayload)
- returnClose (ReturnClosePayload)
- returnCreate (ReturnCreatePayload)
- returnDeclineRequest (ReturnDeclineRequestPayload)
- returnProcess (ReturnProcessPayload)
- returnReopen (ReturnReopenPayload)
- returnRequest (ReturnRequestPayload)
- returnLineItemRemoveFromReturn (ReturnLineItemRemoveFromReturnPayload): deprecated
- •mutation
Removes return and/or exchange lines from a return.
- Anchor to returnIdreturn•ID!
Id required The ID of the return for line item removal.
- Anchor to returnLineItemsreturn•[Return
Line Items Line Item Remove From Return Input!] The return line items to remove from the return.
- Anchor to exchangeLineItemsexchange•[Exchange
Line Items Line Item Remove From Return Input!] The exchange line items to remove from the return.
Arguments
- •mutation
Approves a customer's return request. If this mutation is successful, then the
Return.statusfield of the approved return is set to.- Anchor to inputinput•Return
Approve Request Input! required The input fields to approve a return.
Arguments
- •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).
- •ID!required
The ID of the return to cancel.
- Anchor to notifyCustomernotify•Boolean
Customer DeprecatedDefault:false
Arguments
- •ID!
- •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.
- •ID!required
The ID of the return to close.
Arguments
- •ID!
- •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
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
returnquery to retrieve the return by its ID. Learn more about providing a return management workflow for merchants.- Anchor to returnInputreturn•Return
Input Input! required Specifies the input fields for a return.
Arguments
- Creates a return in the
- •mutation
Declines a return on an order. When a return is declined, each
can be associated to a new return. Use theormutation to initiate a new return.- Anchor to inputinput•Return
Decline Request Input! required The input fields for declining a customer's return request.
Arguments
- •mutation
Processes a return by confirming which items customers return and exchange, handling their disposition, and optionally issuing refunds. This mutation confirms the quantities for
andobjects previously created on theReturn.For returned items, you specify how to handle them through dispositions such as restocking or disposal. The mutation creates
objects for exchange items and records all transactions in the merchant's financial reports. You can optionally issue refunds through financial transfers, apply refund duties, and refund shipping costs.Learn more about processing returns.
- Anchor to inputinput•Return
Process Input! required Specifies the input fields for processing a return.
Arguments
- •mutation
Reopens a closed return.
- •ID!required
The ID of the return to reopen.
Arguments
- •ID!
- •mutation
Creates a return request that requires merchant approval before processing. The return has its status set to
and the merchant must approve or decline it.Use this mutation when customers initiate returns that need review. After creating a requested return, use
to approve it orto decline it.For returns that should be immediately open for processing, use the
mutation instead.Learn more about building return management workflows.
- Anchor to inputinput•Return
Request Input! required The input fields for requesting a return.
Arguments
- •mutationDeprecated
- Anchor to returnIdreturn•ID!
Id required The ID of the return for line item removal.
- Anchor to returnLineItemsreturn•[Return
Line Items Line Item Remove From Return Input!]! required The return line items to remove from the return.
Arguments