# Would this code work? (redeems nothing)

`POST /api/v1/promotion-codes/validate`

Needs the `catalog:read` scope, or a full-access key.

## Request body

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "customer_id": {
      "type": "string",
      "format": "uuid",
      "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    "plan_id": {
      "type": "string",
      "format": "uuid",
      "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  },
  "required": [
    "code"
  ]
}
```

## Responses

### 200

Always 200: an invalid code is `valid:false` with a machine-readable `reason`.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "valid": {
          "type": "boolean"
        },
        "code": {
          "type": "string"
        },
        "promotion_code_id": {
          "type": "string",
          "format": "uuid",
          "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        },
        "coupon": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "name": {
              "type": "string"
            },
            "percent_off": {
              "type": [
                "string",
                "null"
              ],
              "example": "20"
            },
            "amount_off_cents": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^\\d+$",
              "description": "Fixed amount off, minor units.",
              "example": "1999"
            },
            "currency": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "USD",
                "AUD",
                "CAD",
                "GBP",
                "EUR",
                "INR",
                "NPR",
                null
              ],
              "example": "USD"
            },
            "duration": {
              "type": "string",
              "enum": [
                "once",
                "repeating",
                "forever"
              ]
            },
            "duration_in_periods": {
              "type": [
                "integer",
                "null"
              ]
            },
            "applies_to_plan_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              }
            }
          },
          "required": [
            "id",
            "name",
            "percent_off",
            "amount_off_cents",
            "currency",
            "duration",
            "duration_in_periods",
            "applies_to_plan_ids"
          ]
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "valid",
        "code"
      ]
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```
