English EN
API Reference
API Reference

Coupons

Update coupon

PATCH / v1 / coupons / {coupon_id}

Changes the fields that you send.

  • status archived switches the code off. The Tentary app calls this "delete". active switches it on again.
  • null removes starts_on, ends_on or max_uses.

The fields have the same names and formats as in GET /v1/coupons.

Changes at once MCP tool update_coupon

Authorization

  • Authorization string header required

    Bearer tnt_… · A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Introduction

Path parameters

  • coupon_id integer required

    The id from list_coupons.

    min 1 Example: 702

Body application/json

  • status string

    archived = switched off. active = on again.

    Allowed values: activearchived

  • code string

    The code buyers type, like SUMMER20. Unique in the shop (upper and lower case count as the same).

    min length 1 max length 255

  • percent integer can be null

    Discount in percent. Give percent or amount.

    min 1 max 100

  • amount number | string can be null

    Fixed discount. Amount in the account currency, like 49 or 19.99.

    above 0 pattern ^[0-9]{1,9}(\.[0-9]{1,2})?$

  • max_uses integer can be null

    How often the code can be used in total. 0 = no limit. On create, left out = no limit. On update, left out = no change, null removes the limit.

    min 0

  • starts_on string can be null

    First day the code works, like 2026-11-27. On create, left out = at once. On update, left out = no change, null removes the date.

    pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

  • ends_on string can be null

    The code stops at the start of this day (00:00). On create, left out = no end. On update, left out = no change, null removes the date.

    pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

  • product_ids array of integer can be null

    Only these products (ids from list_products). null = all products. On create, left out = all products. On update, left out = no change. [] = no product (the code works nowhere).

    max items 200

Response

Fields of the answer with status 200. Errors always have the same format, see Errors.

  • id integer

    The ID.

  • code string

    The code buyers type.

  • status string

    What the seller set. archived = deleted.

    Allowed values: activearchived

  • state string

    The result for buyers: valid = buyers can use the code now.

    Allowed values: validscheduledexpiredused_upreservedarchivedno_products

  • percent integer can be null

    Discount in percent, or null for a fixed amount.

  • amount string can be null

    Decimal string, like "19.90". Fixed discount, or null for a percent discount.

  • currency string

    Currency code, like EUR.

  • used integer

    How often the code was used.

  • max_uses integer can be null

    null = no limit.

  • reserved_in_open_checkouts integer

    Uses held by open checkouts of the last hour.

  • starts_on string<date> can be null

    Like 2026-01-31. First day the code works.

  • ends_on string<date> can be null

    Like 2026-01-31. The code stops at the start of this day.

  • product_ids array of integer can be null

    null = all products. [] = no product.

  • products array of object

    The products of product_ids (the first 200).

    Show 3 fields Hide fields
    • id integer

      The ID.

    • name string can be null

      The name.

    • status string

      The status.

      Allowed values: livedraftarchiveddeleted

  • created_at string<date-time> can be null

    UTC, like 2026-01-31T14:05:00Z.

  • admin_url string<uri>

    The page in the Tentary app.

Start typing to search.