---
search:
  tags:
    - Coupons
    - GET
seo:
  description: >-
    Public. Resolves a coupon code the register calls at checkout. It… Reference
    for the GET /api/v1/coupons/validate/{code} endpoint in the PharmaFlow API.
sidebar:
  label: Validate a coupon code
  badge: GET
title: Validate a coupon code
type: openapi-operation
---
Public. Resolves a coupon code the register calls at checkout. It reports is_valid with reason_invalid: unknown codes 404, else 200 and is_valid false.

`GET /api/v1/coupons/validate/{code}`

**Responses**

- `200` — The coupon and whether it may be applied
- `404` — Coupon not found

Response example, 200:

```json
{
  "id": "string",
  "code": "string",
  "type": "string",
  "discount_type": "string",
  "discount_value": 0,
  "description": "string",
  "is_valid": true,
  "reason_invalid": "string"
}
```
