---
title: "Get one discount code"
method: GET
path: "/gateway/discount-codes/{id}"
tags: ["Discount Codes"]
---

# Get one discount code

`GET /gateway/discount-codes/{id}`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/discount-codes/{id}`
- Auth: API key in header `x-api-key`

The only route that reports what a code takes off and how many subscribers used it.

## Path parameters

- `id` string, uuid, required

## Response `200`

The discount code.

- DiscountCodeDetail: Fully camelCase on the wire.
  - `id` string, uuid, required
  - `code` string, required: As you typed it. Buyers may type it in any case.
  - `kind` 'discount' | 'tracking', required: `discount` changes the price. `tracking` changes nothing and only records who used it.
  - `planLinkId` string, uuid, nullable, required: The one plan this code works on; null means every subscription plan you own.
  - `planName` string, nullable, required
  - `archivedAt` string, date-time, nullable, required
  - `createdAt` string, date-time, required
  - `active` boolean, required: Usable as far as this list can tell: not archived, and fully created. Whether the code has since been used up is answered by the single-code route.
  - `termsLabel` string, required: What the code takes off, ready to print: "20% off", "€5.00 off", or "No discount — tracking only".
  - `timesRedeemed` integer, required: How many subscribers redeemed this code.
  - `maxRedemptions` integer, nullable, required: The cap you set, or null for none.

## Other responses

- `401`: Missing or invalid `x-api-key`.
- `404`: Resource not found (or not visible to your key; the two are not distinguished).

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
