Identify cart lines by `view_key` in `cartLinesUpdate` and `cartLinesRemove`
Shopify developer change
MerchantDiff detected this entry in Shopify's official developer changelog on June 02, 2026.
This Shopify update is categorized as API, New, Storefront API, 2026-07.
What changed
You can now identify cart lines by their view_key when calling the cartLinesUpdate and cartLinesRemove mutations, as an alternative to the cart line id. What's new cartLinesUpdate accepts a viewKey on each CartLineUpdateInput, mutually exclusive with id. cartLinesRemove accepts a viewKeys list, mutually exclusive with lineIds. How to use Provide exactly one identifier per line. Existing integrations that use id or lineIds keep working with no changes.
Who is affected
Apps and storefronts using the affected Storefront API surface should review this change.
What action may be needed
Review whether the new capability is relevant to your app. If you plan to use it, test the affected API or workflow before adopting it in production.
Use the official Shopify entry below as the source of truth for technical implementation details, affected APIs, migration instructions and deadlines.
Want the actionable version?
MerchantDiff monitors Shopify API changes, deprecations, deadlines and ecosystem updates, then turns them into developer-focused release intelligence: what changed, who is affected and what action may be needed.
Get MerchantDiff →