---
title: "Update coupon"
method: PUT
path: "/stores/{storeId}/coupons/{couponId}"
tags: ["Coupon"]
---

# Update coupon

`PUT /stores/{storeId}/coupons/{couponId}`

Requires the `stores.coupons.update` permission.

## Path parameters

- `storeId` string, uuid, required
- `couponId` string, uuid, required

## Request body

- CouponDto — The data-transfer object for a coupon, used for creating or updating a coupon and returned by the API.
  - `code` string, required — The case-insensitive code the customer will enter to redeem the coupon.
  - `maximumUses` integer, required — The maximum number of times the coupon may be used. Set to –1 for unlimited uses.
  - `percentageDecrease` number, double, nullable — The percentage to subtract from the order total when the coupon is applied.
  - `amountDecrease` number, double, nullable — A fixed amount to subtract from the order total when the coupon is applied.
  - `isEnabled` boolean, required — Whether the coupon is active and may be used at checkout.
  - `variantIds` string[], nullable — The list of variant IDs this coupon applies to; null or empty for all variants.

## Response `200`

The object was successfully updated.

- CouponResponse — Represents a default generic response for API endpoints.
  - `success` boolean, required — Indicates whether the operation or response was successful.
  - `message` string, nullable — A descriptive message providing additional context or information about the response.
  - `code` string, nullable — The error code (if there was an error) to use when referencing the error
  - `data` Coupon — A coupon code can be used to reduce the cost of an order with a store for a specified percentage
    - `id` string, uuid, required — The unique identifier of the entity
    - `dateCreated` string, date-time, required — The date the entity was created in the database
    - `code` string, required — The case-insensitive code the customer will enter to redeem the coupon (this should be lowercased)
    - `uses` integer, required — The amount of times the coupon code has been used
    - `maximumUses` integer, required — The maximum amount of usages the coupon code has, -1 = infinite
    - `percentageDecrease` number, double, nullable — The percentage that should be subtracted from the total order cost when used
    - `amountDecrease` number, double, nullable — The static amount to be subtracted from the total order cost when used
    - `isEnabled` boolean, required — Whether the coupon code is enabled and can be used in checkout
    - `variantIds` string[], nullable — The list of variant IDs that the coupon is enabled for, null if it is global
    - `expirationDate` string, date-time, nullable — The date and time when the coupon will expire and can no longer be used
    - `storeId` string, uuid, required — The ID of the store the coupon belongs to

## Other responses

- `400` — The provided form information is not valid, check that the provided data is valid. You can use the 'invalidFields' field to get the list of invalid fields or just use the 'message' field.
- `401` — You are not authorized, check your API key and try again.
- `403` — You are not authorized to access this endpoint, you may be missing an API key scope or be requesting a privileged endpoint.
- `404` — One of the objects referenced by the ID given in the URL or form was not found, check the ID and try again.

---

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