Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi guys,
I am trying to remove a item from a return order using the following mutation: returnLineItemRemoveFromReturn
But regardless of the state of the return I keep getting the following error:
"returnLineItemRemoveFromReturn": {
"userErrors": [
{
"field": [
"returnLineItems",
"0",
"quantity"
],
"message": "Return line item has an invalid quantity."
}
],
"return": null
}
},
While using the following payload:
{
"query": "mutation ReturnLineItemRemoveFromReturn($returnId: ID!, $returnLineItems: [ReturnLineItemRemoveFromReturnInput!]!) { returnLineItemRemoveFromReturn(returnId: $returnId, returnLineItems: $returnLineItems) { userErrors { field message } return { id status returnLineItems(first: 10) { edges { node { id quantity } } } } } }",
"variables": {
"returnId": "gid://shopify/Return/5602443575",
"returnLineItems": [
{
"returnLineItemId": "gid://shopify/ReturnLineItem/8040022327",
"quantity": 1
}
]
}
}
And here if you wonder if there is any quantity available on this return:
{
"returnLineItems": {
"nodes": [
{
"customerNote": null,
"fulfillmentLineItem": {
"id": "gid://shopify/FulfillmentLineItem/13801755738423",
"quantity": 1,
"lineItem": {
"id": "gid://shopify/LineItem/15820551881015",
"name": "Revendo Case Everyday iPhone 15 Clear",
"sku": "21646",
"title": "Revendo Case Everyday iPhone 15 Clear",
"quantity": 1,
"originalUnitPrice": "29.00"
}
},
"quantity": 1,
"refundableQuantity": 1,
"refundedQuantity": 0,
"returnReason": "WRONG_ITEM",
"returnReasonNote": "",
"id": "gid://shopify/ReturnLineItem/8040022327"
}
]
}
}
Is this mutation just not working or is there a limitation no one knows about?
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025