---
title: "Archive a coupon"
method: POST
path: "/api/v1/coupons/{id}/archive"
tags: ["Coupons"]
---

# Archive a coupon

`POST /api/v1/coupons/{id}/archive`

Archive a coupon

## Path parameters

- `id` string, required

## Response `200`

- CouponDto
  - `id` string, required — Coupon id
  - `organizationId` string, required — Organization id
  - `name` string, required — Name of the coupon displayed to customers on for instance invoices or receipts.
  - `percentOff` number — Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
  - `amountOff` integer — Fixed amount that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
  - `currency` string — Name of the currency displayed to customers on for instance invoices or receipts.
  - `maxRedemptions` number — Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
  - `redeemBy` string, date-time — Date after which the coupon can no longer be redeemed
  - `isEnable` boolean, required — Taking account of the above properties, whether this coupon can still be applied to a customer.
  - `createdAt` string, date-time — Time at which this coupon was created.
  - `metadata` object — A set of key-value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.
  - `isArchived` boolean, required — Whether the coupon is archived.
  - `archivedAt` string, date-time — Date at which the coupon was archived
  - `promotionCodes` PromotionCodeSlimDto[], required
    - `id` string, required — Promotion code id
    - `organizationId` string, required — Organization id
    - `code` string, required — The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.
    - `couponId` string, required — Coupon id
    - `isActive` boolean, required — Whether the promotion code is currently active. A promotion code is only active if the coupon is also enabled.
    - `expiredAt` string, date-time — Date at which the promotion code can no longer be redeemed. If the coupon has specified a redeems_by, then this value cannot be after the coupon’s redeems_by.
    - `maxRedemptions` number — Maximum number of times this promotion code can be redeemed. If the coupon has specified a max_redemptions, then this value cannot be greater than the coupon’s max_redemptions.
    - `createdAt` string, date-time — Date at which the promotion code was created
    - `metadata` object — A set of key-value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.
  - `status` 'active' | 'expired' | 'disabled' | 'limit_reached', required
  - `timesRedeemed` number — Number of times this coupon has been applied.

## Other responses

- `500`

---

[API](https://skmtc.net/copperx/apis/copperx-api-2.md) · [All operations](https://skmtc.net/copperx/apis/copperx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/copperx/copperx-api-2/revisions/c0bfbc37fb98/schema)
