---
title: "Create a coupon"
method: POST
path: "/api/v1/coupons"
tags: ["Catalog"]
---

# Create a coupon

`POST /api/v1/coupons`

## Request

- Base URL: `https://merchant.zahlo.eu`
- URL: `https://merchant.zahlo.eu/api/v1/coupons`
- Auth: API key in header `x-api-key`

Create a coupon. Use the response status and request ID to decide whether to retry, reconcile, or ask the customer for action.

## Headers

- `Idempotency-Key` string

## Request body

- CouponCreateRequest
  - `name` string, nullable
  - `percentOff` number, nullable: Set exactly one of percentOff and amountOffMinor.
  - `amountOffMinor` integer, nullable
  - `currency` string, nullable: Required with amountOffMinor.
  - `duration` 'once' | 'repeating' | 'forever', required
  - `durationInMonths` integer, nullable: Required for, and only for, duration repeating.
  - `code` string, nullable: Promotion code customers type; unique per merchant, case-insensitive.
  - `maxRedemptions` integer, nullable
  - `redeemBy` string, date-time, nullable
  - `metadata` object: Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.

## Response `200`

The coupon

- Coupon
  - `id` string, required
  - `object` 'coupon', required
  - `livemode` boolean, required
  - `createdAt` string, date-time, required
  - `name` string, nullable
  - `percentOff` number, nullable: Set exactly one of percentOff and amountOffMinor.
  - `amountOffMinor` integer, nullable
  - `currency` string, nullable: Required with amountOffMinor.
  - `duration` 'once' | 'repeating' | 'forever', required
  - `durationInMonths` integer, nullable: Required for, and only for, duration repeating.
  - `code` string, nullable: Promotion code customers type; unique per merchant, case-insensitive.
  - `maxRedemptions` integer, nullable
  - `redeemBy` string, date-time, nullable
  - `metadata` object, required: Up to 50 key-value pairs; keys up to 40 characters, values strings up to 500 characters.
  - `timesRedeemed` integer, required
  - `active` boolean, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Request conflicts with existing state

---

[API](https://skmtc.dev/zahlo/apis/zahlo-merchant-api.md) - [All operations](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/revisions/8fcbef981e0d?raw)
