> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetoform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discount codes

> Create and manage discount codes, and see how they are used.

A discount code lowers the price on forms that take payment. For fields and response details, see the API reference for [listing codes](https://apidocs.neetoform.com/api/discount-codes/list.md), [a single code](https://apidocs.neetoform.com/api/discount-codes/show.md), [creating](https://apidocs.neetoform.com/api/discount-codes/create.md), [updating](https://apidocs.neetoform.com/api/discount-codes/update.md), [deleting](https://apidocs.neetoform.com/api/discount-codes/delete.md), [forms](https://apidocs.neetoform.com/api/discount-codes/list-forms.md), [redemptions](https://apidocs.neetoform.com/api/discount-codes/redemptions.md) and [the report](https://apidocs.neetoform.com/api/discount-codes/report.md).

## List discount codes

This command lists the discount codes in your workspace, newest first. Use this to find a code's ID and to see its status and how many times it was used.

```bash theme={"system"}
neetoform discount-codes list --json
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--page` | `int` | | `0` | Page number |
| `--page-size` | `int` | | `0` | Items per page (max 100) |

```json Sample output (--json) theme={"system"}
{
  "data": [
    {
      "id": "6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11",
      "code": "SUMMER",
      "value": "10.0",
      "kind": "percentage",
      "currency": null,
      "expires_at": "2026-12-31T00:00:00.000Z",
      "redeems_limit": 100,
      "created_at": "2026-10-01T09:00:00.000Z",
      "updated_at": "2026-10-01T09:00:00.000Z",
      "redeems_count": 12,
      "status": "active"
    }
  ],
  "breadcrumbs": [
    {
      "label": "Show",
      "command": "neetoform discount-codes show <id>"
    }
  ],
  "pagination": {
    "current_page_number": 1,
    "total_pages": 1,
    "total_records": 1,
    "page_size": 30
  }
}
```

## Show a discount code

This command shows one discount code with its status, its redemption count, and the forms it is enabled on.

```bash theme={"system"}
neetoform discount-codes show 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11 --json
```

**Required arguments:**

* `<id>` - The discount code's UUID, from `neetoform discount-codes list`

## Create a discount code

This command creates a discount code. Use this when you want to offer a percentage or a fixed amount off. Pass `--form-ids` to enable the code on forms right away.

```bash theme={"system"}
neetoform discount-codes create \
  --code SUMMER \
  --value 10 \
  --kind percentage \
  --redeems-limit 100 \
  --form-ids c3b0a8d2-5e44-4f4e-8a35-0d2f5a1b7c90
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--code` | `string` | Yes | | Code customers enter, 3 to 30 characters without spaces |
| `--currency` | `string` | | | Currency of a fixed discount, e.g. usd |
| `--expires-at` | `string` | | | Expiry date in ISO 8601, e.g. 2026-12-31 |
| `--form-ids` | `string` | | | Comma-separated form IDs to enable the code on; on update, replaces the current forms |
| `--kind` | `string` | | | Discount kind: percentage (default) or fixed |
| `--redeems-limit` | `int` | | `0` | Maximum number of redemptions, 1 to 100000 |
| `--value` | `string` | Yes | | Discount value; a percentage up to 100 or a fixed amount |

`--kind` is `percentage` (the default) or `fixed`. A fixed code needs `--currency`, and it works only on forms that charge in that currency. To find the form IDs you can use, run `neetoform discount-codes forms list`.

## Update a discount code

This command changes a discount code. Only the fields you pass change.

```bash theme={"system"}
neetoform discount-codes update 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11 \
  --expires-at 2027-03-31 \
  --redeems-limit 200
```

**Required arguments:**

* `<id>` - The discount code's UUID, from `neetoform discount-codes list`

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--code` | `string` | | | Code customers enter, 3 to 30 characters without spaces |
| `--currency` | `string` | | | Currency of a fixed discount, e.g. usd |
| `--expires-at` | `string` | | | Expiry date in ISO 8601, e.g. 2026-12-31 |
| `--form-ids` | `string` | | | Comma-separated form IDs to enable the code on; on update, replaces the current forms |
| `--kind` | `string` | | | Discount kind: percentage (default) or fixed |
| `--redeems-limit` | `int` | | `0` | Maximum number of redemptions, 1 to 100000 |
| `--value` | `string` | | | Discount value; a percentage up to 100 or a fixed amount |

`--form-ids` replaces the whole list of forms. Leave it out to keep the current forms.

## Delete a discount code

This command deletes a discount code and removes it from every form. Past redemptions are kept. The command runs at once and does not ask first.

```bash theme={"system"}
neetoform discount-codes delete 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11
```

**Required arguments:**

* `<id>` - The discount code's UUID, from `neetoform discount-codes list`

```text Sample output theme={"system"}
Discount code deleted.
```

## List forms for discount codes

This command lists the forms that a discount code can be enabled on, with the currency each form charges in. Use this to pick the values for `--form-ids`.

```bash theme={"system"}
neetoform discount-codes forms list --json
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--page` | `int` | | `0` | Page number |
| `--page-size` | `int` | | `0` | Items per page (max 100) |

## List redemptions

This command lists the completed redemptions of one discount code, newest first. Each row shows the original, discount, and paid amounts, and the form and submission.

```bash theme={"system"}
neetoform discount-codes redemptions list 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11 --json
```

**Required arguments:**

* `<discount-code-id>` - The discount code's UUID, from `neetoform discount-codes list`

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--page` | `int` | | `0` | Page number |
| `--page-size` | `int` | | `0` | Items per page (max 100) |

## Show a discount code report

This command shows the totals of the completed redemptions of one discount code, grouped by form. Use this to see how much a code saved your customers. Limit it to a period with `--start-date` and `--end-date`.

```bash theme={"system"}
neetoform discount-codes report 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11 \
  --start-date 2026-10-01 \
  --end-date 2026-10-31 \
  --json
```

**Required arguments:**

* `<discount-code-id>` - The discount code's UUID, from `neetoform discount-codes list`

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--end-date` | `string` | | | Last day to include, ISO date, e.g. 2026-10-31 |
| `--start-date` | `string` | | | First day to include, ISO date, e.g. 2026-10-01 |

```json Sample output (--json) theme={"system"}
{
  "data": {
    "report": {
      "groups": [
        {
          "form_title": "Workshop signup",
          "redeems": [
            {
              "id": "0b7e9f62-3c51-4d8a-a2f4-6c1e9d0b5a33",
              "redeemed_on": "2026-10-12T08:15:00.000Z",
              "original_amount": "100.0",
              "discount_amount": "10.0",
              "paid_amount": "90.0",
              "currency": "usd"
            }
          ],
          "total_original_amount": "100.0",
          "total_discount_amount": "10.0",
          "total_paid_amount": "90.0",
          "currency": "usd",
          "has_mixed_currencies": false
        }
      ],
      "total_count": 1,
      "total_original_amount": "100.0",
      "total_discount_amount": "10.0",
      "total_paid_amount": "90.0",
      "has_mixed_currencies": false
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.