> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/graphql-api/api-reference/queries/get-discount-code.md).

# getDiscountCode

### Arguments

| Argument                                               | Description |
| ------------------------------------------------------ | ----------- |
| code ([ID](/graphql-api/api-reference/objects/id.md)!) |             |

### Return fields

#### activated ([Boolean](/graphql-api/api-reference/objects/boolean.md)!)

Whether the discount code is activated or deactivated.

#### autoSelectPlan ([Plan](/graphql-api/api-reference/objects/plan.md))

If set the discout code will auto select this plan

#### code ([String](/graphql-api/api-reference/objects/string.md)!)

The unique code that can be applied to a checkout

#### createdAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time.md)!)

When the discound code was created.

#### expired ([Boolean](/graphql-api/api-reference/objects/boolean.md)!)

Whether the discount code has already expired.

#### id ([ID](/graphql-api/api-reference/objects/id.md)!)

ID to identify the discount code with

#### maxTimesUsed ([Int](/graphql-api/api-reference/objects/int.md))

The max usage of this discount code

#### metadata ([JSON](/graphql-api/api-reference/objects/json.md))

Metadata makes it possible to store additional information on objects.

#### promotion ([Promotion](/graphql-api/api-reference/objects/promotion.md))

Promotion that is attached to the discount code

#### promotionId ([ID](/graphql-api/api-reference/objects/id.md)!)

ID of the promotion that is attached to the discount code

#### redeemable ([Boolean](/graphql-api/api-reference/objects/boolean.md)!)

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

#### updatedAt ([ISO8601DateTime](/graphql-api/api-reference/objects/iso-8601-date-time.md)!)

When the discound code was updated last time.
