Coupons
Create coupon
/ v1 / coupons Creates a coupon (discount code). It works at once, or from starts_on.
The answer is the coupon, as in GET /v1/coupons, with its state.
Authorization
-
Authorizationstring header requiredBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Introduction
Body application/json
-
codestring requiredThe code buyers type, like SUMMER20. Unique in the shop (upper and lower case count as the same).
min length
1max length255 -
percentintegerDiscount in percent. Give percent or amount.
min
1max100 -
amountnumber | stringFixed discount. Amount in the account currency, like 49 or 19.99.
above
0pattern^[0-9]{1,9}(\.[0-9]{1,2})?$ -
max_usesintegerHow 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_onstringFirst 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_onstringThe 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_idsarray of integer can be nullOnly 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.
-
idintegerThe ID.
-
codestringThe code buyers type.
-
statusstringWhat the seller set. archived = deleted.
Allowed values:
activearchived -
statestringThe result for buyers: valid = buyers can use the code now.
Allowed values:
validscheduledexpiredused_upreservedarchivedno_products -
percentinteger can be nullDiscount in percent, or null for a fixed amount.
-
amountstring can be nullDecimal string, like "19.90". Fixed discount, or null for a percent discount.
-
currencystringCurrency code, like EUR.
-
usedintegerHow often the code was used.
-
max_usesinteger can be nullnull = no limit.
-
reserved_in_open_checkoutsintegerUses held by open checkouts of the last hour.
-
starts_onstring<date> can be nullLike 2026-01-31. First day the code works.
-
ends_onstring<date> can be nullLike 2026-01-31. The code stops at the start of this day.
-
product_idsarray of integer can be nullnull = all products. [] = no product.
-
productsarray of objectThe products of product_ids (the first 200).
Show 3 fields Hide fields
-
idintegerThe ID.
-
namestring can be nullThe name.
-
statusstringThe status.
Allowed values:
livedraftarchiveddeleted
-
-
created_atstring<date-time> can be nullUTC, like 2026-01-31T14:05:00Z.
-
admin_urlstring<uri>The page in the Tentary app.