Eventjet GraphQL API documentation

discountGroup

Get a discount group by its ID (DiscountGroup.id).

A group bundles the codes that one Mutation.generateDiscountCodes call produced. Page through them with DiscountGroup.discounts, count them with DiscountGroup.numberOfDiscounts, or get a link to the full list from DiscountGroup.downloadUrl.

While a freshly requested batch is still being written, DiscountGroup.isGenerating is true and DiscountGroup.numberOfDiscounts keeps growing. Poll this field until DiscountGroup.isGenerating turns false.

DiscountGroup.benefit and DiscountGroup.constraints resolve to null as soon as the codes in the group differ from one another, for example after Mutation.changeDiscountConstraints was used on a single code. Mutation.modifyDiscountGroupConstraints makes the constraints uniform again.

Responds with an error rather than resolving to null when no group with the given ID exists.

Authorization is required: you must be allowed to manage the discounts of the company that owns the group. To list all groups of a company, use Company.discountGroups.

Arguments

ArgumentDescriptionType
idID!

Type

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

FieldDescriptionType
benefitThe common benefit of all discounts in the group.DiscountBenefit
constraintsThe common constraints of all discounts in the group.[ DiscountConstraint! ]
createdAtThe date and time when the discount group was created.Date
discountsDiscountsConnection!
downloadUrlString!
idID!
isGeneratingWhether codes are being generated for this group.Boolean!
nameString!
numberOfDiscountsInt!
relatedEvents[ Event ]