---
title: "Check discount code validity"
method: PUT
path: "/api/external/check-discount"
tags: ["Redemptions & Discount Codes"]
---

# Check discount code validity

`PUT /api/external/check-discount`

## Request body

- CheckDiscountRequest — Request containing customer ID and discount code to validate
  - `customerId` integer, required — Shopify customer ID (numeric). Identifies which customer is attempting to use the discount code. Used to verify the discount code belongs to this customer. Example: 67890
  - `discountCode` string, required — The discount code to validate. Case-insensitive. This is the code the customer enters at checkout. System will check if: - Code exists in loyalty system - Code belongs to this customer - Code status is UNUSED or ACTIVE - Code has not expired Examples: "LOYALTY15OFF", "VIP20", "WELCOME10"

## Response `200`

Discount code is valid and reward details returned

- CustomerReward
  - `amount` number, double
  - `createAt` string, date-time, required
  - `customerId` integer, required
  - `description` string
  - `discountCode` string, required
  - `discountCodeId` string
  - `expireDate` string, date-time
  - `id` integer
  - `lastExpiryReminderSentDate` string, date-time
  - `orderId` integer
  - `orderName` string
  - `pointRedeemRuleId` integer
  - `pointTransactionId` integer
  - `productData` string
  - `rewardType` 'STORE_CREDIT' | 'DISCOUNT_CODE' | 'POINTS'
  - `shop` string, required
  - `status` 'USED' | 'UNUSED' | 'REFUNDED' | 'EXPIRED' | 'SUBSCRIPTION_ACTIVE' | 'CANCELED', required
  - `usageCount` integer
  - `usedAt` string, date-time
  - `variantId` integer

## Other responses

- `400` — Discount code not valid
- `401` — Unauthorized - Invalid or missing X-API-Key
- `404` — Discount code not found for this customer

---

[API](https://skmtc.dev/appstle/apis/admin-apis.md) · [All operations](https://skmtc.dev/appstle/apis/admin-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/appstle/admin-apis/revisions/27286503779d/schema)
