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
| Argument | Description | Type |
|---|---|---|
| id | ID! |
Type
This field resolves to DiscountGroup, which has the following fields:
| Field | Description | Type |
|---|---|---|
benefit | The common benefit of all discounts in the group. | DiscountBenefit |
constraints | The common constraints of all discounts in the group. | [ DiscountConstraint! ] |
createdAt | The date and time when the discount group was created. | Date |
discounts | DiscountsConnection! | |
downloadUrl | String! | |
id | ID! | |
isGenerating | Whether codes are being generated for this group. | Boolean! |
name | String! | |
numberOfDiscounts | Int! | |
relatedEvents | [ Event ] |