---
title: "Validate INSR-XXXXX discount code"
method: GET
path: "/v1/codes/{code}"
tags: ["Discounts & Codes"]
---

# Validate INSR-XXXXX discount code

`GET /v1/codes/{code}`

## Request

- Base URL: `https://api.insumermodel.com`
- URL: `https://api.insumermodel.com/v1/codes/{code}`
- Auth: none required

Validates a discount code for merchant backends during ACP/UCP checkout flows. No authentication required. Does not expose wallet address, token breakdown, or analytics. Returns only what the merchant needs to apply the discount.

## Path parameters

- `code` string, required

## Response `200`

Code validation result

- object
  - `ok` true
  - `data` union
    - object: Valid code
      - `valid` true
      - `code` string
      - `merchantId` string
      - `discountPercent` integer
      - `expiresAt` string, date-time
      - `createdAt` string, date-time
      - `walletProven` boolean: True when the code was issued to a caller that proved control of the wallet.
    - object: Invalid code
      - `valid` false
      - `code` string
      - `reason` 'expired' | 'already_used' | 'not_found'
  - `meta` Meta
    - `version` string
    - `timestamp` string, date-time

## Other responses

- `400`: Invalid code format
- `405`: Method not allowed (only GET supported)
- `500`: Unexpected server error. Safe to retry; no credits are charged on a 500. Router endpoints return the standard error envelope; standalone endpoints (the ones whose 200 is a flat object) return a flat {"error": "..."} object.

---

[API](https://skmtc.dev/insumermodel/apis/insumerapi.md) · [All operations](https://skmtc.dev/insumermodel/apis/insumerapi/llms.txt) · [OpenAPI document](https://skmtc.dev/insumermodel/apis/insumerapi/revisions/91f56fe9e3d8?raw)
