# getDiscountCode

### Arguments

| Argument                                                                           | Description |
| ---------------------------------------------------------------------------------- | ----------- |
| code ([ID](https://developer.firmhouse.com/graphql-api/api-reference/objects/id)!) |             |

### Return fields

#### activated ([Boolean](https://developer.firmhouse.com/graphql-api/api-reference/objects/boolean)!)

Whether the discount code is activated or deactivated.

#### autoSelectPlan ([Plan](https://developer.firmhouse.com/graphql-api/api-reference/objects/plan))

If set the discout code will auto select this plan

#### code ([String](https://developer.firmhouse.com/graphql-api/api-reference/objects/string)!)

The unique code that can be applied to a checkout

#### createdAt ([ISO8601DateTime](https://developer.firmhouse.com/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the discound code was created.

#### expired ([Boolean](https://developer.firmhouse.com/graphql-api/api-reference/objects/boolean)!)

Whether the discount code has already expired.

#### id ([ID](https://developer.firmhouse.com/graphql-api/api-reference/objects/id)!)

ID to identify the discount code with

#### maxTimesUsed ([Int](https://developer.firmhouse.com/graphql-api/api-reference/objects/int))

The max usage of this discount code

#### metadata ([JSON](https://developer.firmhouse.com/graphql-api/api-reference/objects/json))

Metadata makes it possible to store additional information on objects.

#### promotion ([Promotion](https://developer.firmhouse.com/graphql-api/api-reference/objects/promotion))

Promotion that is attached to the discount code

#### promotionId ([ID](https://developer.firmhouse.com/graphql-api/api-reference/objects/id)!)

ID of the promotion that is attached to the discount code

#### redeemable ([Boolean](https://developer.firmhouse.com/graphql-api/api-reference/objects/boolean)!)

Whether the discount code can be redeemed. Returns true only if related Discount is activated and Discount code has not expired.

#### updatedAt ([ISO8601DateTime](https://developer.firmhouse.com/graphql-api/api-reference/objects/iso-8601-date-time)!)

When the discound code was updated last time.
