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": {
    "exchangeLineItems": [
      {
        "appliedDiscount": {
          "description": "<your-description>",
          "value": {
            "amount": {
              "amount": "29.99",
              "currencyCode": "AED"
            },
            "percentage": 1.1
          }
        },
        "giftCardCodes": [
          "<your-giftCardCodes>"
        ],
        "quantity": 1,
        "variantId": "gid://shopify/<objectName>/10079785100"
      }
    ],
    "notifyCustomer": true,
    "orderId": "gid://shopify/<objectName>/10079785100",
    "requestedAt": "2019-09-07T15:50:00Z",
    "returnLineItems": [
      {
        "fulfillmentLineItemId": "gid://shopify/<objectName>/10079785100",
        "quantity": 1,
        "restockingFee": {
          "percentage": 1.1
        },
        "returnReason": "COLOR",
        "returnReasonNote": "<your-returnReasonNote>"
      }
    ],
    "returnShippingFee": {
      "amount": {
        "amount": "29.99",
        "currencyCode": "AED"
      }
    }
  }
}
input ReturnInput {
  exchangeLineItems: [ExchangeLineItemInput!]
  notifyCustomer: Boolean
  orderId: ID!
  requestedAt: DateTime
  returnLineItems: [ReturnLineItemInput!]!
  returnShippingFee: ReturnShippingFeeInput
}

input ExchangeLineItemInput {
  appliedDiscount: ExchangeLineItemAppliedDiscountInput
  giftCardCodes: [String!]
  quantity: Int!
  variantId: ID
}

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

input ReturnShippingFeeInput {
  amount: MoneyInput!
}