Eventjet GraphQL API documentation

removeItemFromCart

Removes an item from a cart by its CartItem.id.

This is the general-purpose removal mutation: it accepts the ID of any cart item for which CartItem.canBeRemoved is true, no matter how that item got into the cart. What it removes depends on the kind of item:

  • A ticket type that is not placed on a seatmap: every item of that ticket type is removed, exactly as if you had called setCartItemQuantity with a quantity of 0.
  • A seat of a seatmap (SeatmapSeat): only the ticket for that seat is removed, with the same seat optimization behavior described on removeSeatFromCart.
  • A general admission area of a seatmap (SeatmapVolume): every ticket of that item's ticket type in that area is removed. Tickets of other ticket types in the same area stay.
  • The credit line of a redeemed discount code: the code is removed from Cart.appliedCodes, the same as calling removeDiscountCodeFromCart.

Any ID that does not name one of those fails with an error and leaves the cart alone. That includes items the customer did not add, such as fees and automatically granted free items, which report CartItem.canBeRemoved as false. An unknown cart ID or a cart that has already expired also fails.

Cart item IDs are not stable over time (see CartItem.id), so always read the ID from a fresh Cart.items or Cart.itemGroups response immediately before removing.

To reduce a quantity instead of clearing it out completely, use setCartItemQuantity or setCartVolumeQuantities. To remove one specific seat without looking up its cart item ID, use removeSeatFromCart.

Arguments

ArgumentDescriptionType
cartIdID!
itemIdID!

Type

This field resolves to RemoveItemFromCartResult!.