Developers are encountering an “invalid id” error when attempting to use the returnCreate GraphQL mutation in Shopify’s API.
Root Cause:
The error stems from using the wrong ID type for the fulfillmentLineItemId field. Users are mistakenly providing:
Order LineItem IDs, or
FulfillmentOrderLineItem IDs
Instead of the required FulfillmentLineItem ID.
Key Distinctions:
FulfillmentOrder: Automatically created container for inventory items associated with a specific fulfillment location/service
Fulfillment: Represents what the fulfillment service/location actually controls and ships
The mutation requires the FulfillmentLineItem object, not the FulfillmentOrderLineItem
Recommended Actions:
Verify you’re referencing the correct line item type (FulfillmentLineItem)
Confirm the ID number corresponds to the correct item
Contact Shopify Partner Support for merchant-specific investigation if issues persist
Status:
One user worked around the issue by using refundCreate mutation instead, though this processes returns differently from a business perspective. The discussion remains open with no confirmed resolution for the original mutation.
Summarized with AI on November 16.
AI used: claude-sonnet-4-5-20250929.
Your return input seems to include an Order LineItem, but the “fulfillmentLineItemId” field requires a FulfillmentLineItem. This is specified in the docs:
The ID of the fulfillment line item to be returned. Specifically, this field expects a FulfillmentLineItem.id.
Hey all - thanks for getting in touch - and for waiting on this response. I can’t say for sure why your calls aren’t working on my end without approval from the merchant to investigate further (or if you were to get in touch with us through our Partner Support team we can authenticate that way), but broadly speaking, you’ll want to make sure you’re using the fulfillment line item object here and not the fulfillment order line item object.
To clarify, a fulfillment order is created automatically for inventory items that are associated with a particular fulfillment location/fulfillment service, and a fulfillment is what the location/service has control over - which is why you’d want to use the fulfillment line item object in this case.
I’d just make sure to confirm that you’re referencing the right type of line item as well as confirm if the ID number for the item is correct. This should resolve the issue, but let me know if you encounter any further errors - happy to keep digging into this.