Eventjet GraphQL API documentation

removeGiftCardFromCart

Removes a previously applied gift card from a cart.

Pass the canonical code, the one AppliedGiftCard.code resolves to. Nothing was ever charged, so there is nothing to undo with the gift card provider: the gift card is dropped from Cart.appliedGiftCards, the gift cards that stay behind take over what it was covering, and Cart.amountDue goes up accordingly.

Every rejection names its reason in extensions.code:

  • UnknownCart — no cart with that ID exists.
  • GiftCardNotApplied — the cart does not carry a gift card with that code.
  • GiftCardTimeout — the removal did not report back in time. The work carries on, so the gift card may still come off the cart; read the cart again rather than retrying blindly.
  • UnexpectedGiftCardError — the gift card could not be removed for a reason that has no code of its own. Nothing can be said about the cart afterwards; read it again to find out.

To put a gift card on a cart, use applyGiftCardToCart.

Arguments

Deprecated fields are hidden.
ArgumentDescriptionType
input
RemoveGiftCardFromCartInput!

Type

This field resolves to RemoveGiftCardFromCartPayload, which has the following fields:

Deprecated fields are hidden.
FieldDescriptionType
cartCart