# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.firmhouse.com/graphql-api/api-reference/queries/get-discount-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
