discount
Get a single discount by its ID (Discount.id).
A discount is either a code that shoppers enter at checkout or a named discount that is granted without
a code. Discount.code is null for the latter, and Discount.name is null for the former.
Responds with a not-found error rather than resolving to null when no discount with the given ID
exists.
To list the discounts of a company, use Company.discounts; codes that were produced in bulk are also
reachable through DiscountGroup.discounts. Use Mutation.createDiscount to create a new one.
Authorization is required: you must be allowed to manage the discounts of the company that owns the discount.
Arguments
| Argument | Description | Type |
|---|---|---|
| id | ID! |
Type
This field resolves to Discount, which has the following fields:
| Field | Description | Type |
|---|---|---|
benefit | DiscountBenefit! | |
canBeActivated | Boolean | |
code | String | |
constraints | [ DiscountConstraint! ]! | |
createdAt | The date and time when the discount was created, in ISO 8601 format. | Date |
id | ID! | |
isActive | Boolean! | |
name | String | |
numberOfRedemptions | Int | |
relatedEvents | [ Event ] |