---
title: "Update a discount"
method: PATCH
path: "/v1/commerce/discounts/{discountId}"
tags: ["Commerce"]
---

# Update a discount

`PATCH /v1/commerce/discounts/{discountId}`

Changes a percentage, fixed-amount or free-shipping discount. Buy-X-get-Y and app discounts are read-only here.

## Path parameters

- `discountId` string, required

## Request body

- object
  - `accountId` string, required
  - `title` string
  - `code` string — Required for method code.
  - `percentage` number — For type percentage, e.g. 15 for 15%.
  - `amount` string — For type fixed_amount, a decimal in the store currency.
  - `appliesOnEachItem` boolean — fixed_amount only: take the amount off each item instead of once per order.
  - `minimumSubtotal` string, nullable — Minimum order subtotal, a decimal in the store currency.
  - `minimumQuantity` integer, nullable
  - `usageLimit` integer, nullable — Code discounts only: total uses allowed.
  - `oncePerCustomer` boolean — Code discounts only.
  - `startsAt` string, date-time — Defaults to now.
  - `endsAt` string, date-time, nullable

## Response `200`

Discount updated

- object
  - `discount` CommerceDiscount
    - `id` string
    - `accountId` string
    - `platform` 'shopify'
    - `title` string
    - `method` 'code' | 'automatic'
    - `type` 'percentage' | 'fixed_amount' | 'free_shipping' | 'buy_x_get_y' | 'app'
    - `codes` string[] — The first 10 codes; codeCount has the total.
    - `codeCount` integer, nullable
    - `value` union — Null for free shipping, buy-X-get-Y and app discounts.
      - object
        - `type` 'percentage'
        - `percentage` number
      - object
        - `type` 'fixed_amount'
        - `amount` CommerceMoney — An exact amount of money. The amount is a decimal string so cents are never lost to floating point.
          - `amount` string, required
          - `currency` string, required — ISO 4217 code. Never null: the store currency is filled in when the platform omits it.
        - `appliesOnEachItem` boolean
    - `appliesTo` object, nullable
      - `type` 'all' | 'products' | 'collections'
      - `productIds` string[]
      - `variantIds` string[]
      - `collectionIds` string[]
    - `minimum` object, nullable
      - `type` 'subtotal' | 'quantity'
      - `amount` CommerceMoney — An exact amount of money. The amount is a decimal string so cents are never lost to floating point.
        - `amount` string, required
        - `currency` string, required — ISO 4217 code. Never null: the store currency is filled in when the platform omits it.
      - `quantity` integer
    - `usageLimit` integer, nullable
    - `oncePerCustomer` boolean
    - `usageCount` integer
    - `startsAt` string, date-time
    - `endsAt` string, date-time, nullable
    - `status` 'active' | 'scheduled' | 'expired'
    - `platformStatus` string
    - `summary` string
    - `platformData` object, nullable

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `403` — The store has not granted this permission, or the token was revoked (code insufficient_permissions). Reconnect the store to grant the latest permissions; GET /v1/commerce/store lists what the current grant allows.
- `404` — Account not found (code account_not_found) or the resource was not found (code product_not_found or resource_not_found).
- `429` — Rate limited, either by Zernio or by the platform. Retry later.

## Changes

- **2026-09-30** `16a7b9d5373e` — 1 info
  - removed the `platform` enum value from the `details/budgetScope` response property for the response status `400`
- **2026-09-29** `69bbe3da3a18` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/commerce/discounts/:discountId/patch.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/16a7b9d5373e?raw)
