Requires write_orders access scope or write_marketplace_orders access scope. Also: Requires the write_returns access scope. The user must have acess to return orders.

Creates a return.


Specifies the input fields for a return.


Was this section helpful?

The created return.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation returnCreate($returnInput: ReturnInput!) {
  returnCreate(returnInput: $returnInput) {
    return {
      # Return fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "returnInput": {
    "notifyCustomer": true,
    "orderId": "gid://shopify/<objectName>/10079785100",
    "requestedAt": "2019-09-07T15:50:00Z",
    "returnLineItems": [
      {
        "fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
        "quantity": 1,
        "returnReason": "COLOR",
        "returnReasonNote": "<your-returnReasonNote>"
      }
    ]
  }
}
input ReturnInput {
  notifyCustomer: Boolean
  orderId: ID!
  requestedAt: DateTime
  returnLineItems: [ReturnLineItemInput!]!
}

input ReturnLineItemInput {
  fulfillmentLineItemId: ID!
  quantity: Int!
  returnReason: ReturnReason!
  returnReasonNote: String
}