Hi everyone,
I’m experiencing an issue with the GraphQL returnCreate mutation when creating a return via the Admin API.
Here is the mutation I’m sending:
{
"query": "mutation ReturnCreate($returnInput: ReturnInput!) {
returnCreate(returnInput: $returnInput) {
return {
id
name
status
returnLineItems(first: 250) {
nodes {
... on ReturnLineItem {
id
fulfillmentLineItem {
id
lineItem {
id
name
sku
}
}
}
customerNote
returnReasonDefinition {
name
}
returnReasonNote
quantity
}
}
}
userErrors {
field
message
}
}
}",
"variables": {
"returnInput": {
"orderId": "gid://shopify/Order/7406351745255",
"requestedAt": "2026-02-26T22:08:01+01:00",
"notifyCustomer": false,
"returnLineItems": [
{
"quantity": 1,
"returnReason": "SIZE_TOO_SMALL",
"returnReasonNote": "Je veux la changer avec un autre article",
"fulfillmentLineItemId": "gid://shopify/FulfillmentLineItem/14687449743591"
}
]
}
}
}
And here is the response I receive:
{
"data": [
{
"field": [
"returnInput",
"returnLineItems",
"0",
"quantity"
],
"message": "Return line item has an invalid quantity."
}
]
}
However, despite this error response, the return request is actually created successfully in the Shopify Admin back office.
So my questions are:
-
Why is the API returning
"Return line item has an invalid quantity"? -
Is this a known issue with the
returnCreatemutation? -
Could this be related to fulfillment quantities, partial fulfillments, or remaining returnable quantities?
-
Is the error possibly triggered by some internal validation but not blocking the creation?
The quantity I’m sending is 1, and the fulfillment line item definitely has a fulfillable quantity ≥ 1.
Has anyone experienced this inconsistent behavior?
Thanks in advance for your help.