> Documentation index: [Saleor](/llms.txt) · [This section](/api-reference/miscellaneous/llms.txt)
> Source: https://docs.saleor.io/api-reference/miscellaneous/objects/voucher-code

# VoucherCode Object

Represents voucher code.

Added in Saleor 3.18

This API is currently in **Feature Preview** and can be subject to changes at later point.

```graphql
type VoucherCode {
  id: ID!
  code: String
  used: Int
  isActive: Boolean
  createdAt: DateTime!
}
```

<a id="fields"></a>

### Fields

<a id="id"></a>

#### [`id`](#id) ● [`ID!`](/api-reference/miscellaneous/scalars/id.md)

The ID of the voucher code.

<a id="code"></a>

#### [`code`](#code) ● [`String`](/api-reference/miscellaneous/scalars/string.md)

Code to use the voucher.

<a id="used"></a>

#### [`used`](#used) ● [`Int`](/api-reference/miscellaneous/scalars/int.md)

Number of times a code has been used.

<a id="is-active"></a>

#### [`isActive`](#is-active) ● [`Boolean`](/api-reference/miscellaneous/scalars/boolean.md)

Whether a code is active or not.

<a id="created-at"></a>

#### [`createdAt`](#created-at) ● [`DateTime!`](/api-reference/miscellaneous/scalars/date-time.md)

Date time of code creation.

<a id="member-of"></a>

### Member Of

[`VoucherCodeCountableEdge`](/api-reference/discounts/objects/voucher-code-countable-edge.md) object  ● [`VoucherCodesCreated`](/api-reference/miscellaneous/objects/voucher-codes-created.md) object  ● [`VoucherCodesDeleted`](/api-reference/miscellaneous/objects/voucher-codes-deleted.md) object
