Skip to main content

giftCardAssignUser Mutation

Restrict a gift card so only the given customer can use it.

Added in Saleor 3.23.

Requires the MANAGE_GIFT_CARDpermission.

Triggers the following webhook events:

  • GIFT_CARD_UPDATED (async): A gift card was updated.
giftCardAssignUser(
id: ID!
userId: ID!
): GiftCardAssignUser
Details
type GiftCardAssignUser {
giftCard: GiftCard
giftCardErrors: [GiftCardError!]! @deprecated
errors: [GiftCardError!]!
}

Arguments

id ● ID!

ID of the gift card.

userId ● ID!

ID of the customer to restrict the card to.

Type

GiftCardAssignUser

Restrict a gift card so only the given customer can use it.

Added in Saleor 3.23.

Requires the MANAGE_GIFT_CARDpermission.

Triggers the following webhook events:

  • GIFT_CARD_UPDATED (async): A gift card was updated.