Identify cart lines by `view_key` in `cartLinesUpdate` and `cartLinesRemove`
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
cartLinesUpdateaccepts aviewKeyon eachCartLineUpdateInput, mutually exclusive withid.cartLinesRemoveaccepts aviewKeyslist, mutually exclusive withlineIds.
How to use
Provide exactly one identifier per line. Existing integrations that use id or lineIds keep working with no changes.
mutation RemoveLineByViewKey($cartId: ID!) {
cartLinesRemove(cartId: $cartId, viewKeys: ["794864053:7c2a9f..."]) {
cart { id }
userErrors { field message }
}
}Fetched June 2, 2026
