Rabattcodes
Update coupon
/ v1 / coupons / {coupon_id} Changes the fields that you send.
statusarchivedswitches the code off. The Tentary app calls this "delete".activeswitches it on again.nullremovesstarts_on,ends_onormax_uses.
The fields have the same names and formats as in GET /v1/coupons.
Autorisierung
-
Authorizationstring Header erforderlichBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Einführung
Pfad-Parameter
-
coupon_idinteger erforderlichThe id from list_coupons.
min.
1Beispiel:702
Body application/json
-
statusstringarchived = switched off. active = on again.
Mögliche Werte:
activearchived -
codestringThe code buyers type, like SUMMER20. Unique in the shop (upper and lower case count as the same).
min. Länge
1max. Länge255 -
percentinteger kann null seinDiscount in percent. Give percent or amount.
min.
1max.100 -
amountnumber | string kann null seinFixed discount. Amount in the account currency, like 49 or 19.99.
größer als
0Muster^[0-9]{1,9}(\.[0-9]{1,2})?$ -
max_usesinteger kann null seinHow 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_onstring kann null seinFirst day the code works, like 2026-11-27. On create, left out = at once. On update, left out = no change, null removes the date.
Muster
^[0-9]{4}-[0-9]{2}-[0-9]{2}$ -
ends_onstring kann null seinThe 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.
Muster
^[0-9]{4}-[0-9]{2}-[0-9]{2}$ -
product_idsarray of integer kann null seinOnly 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. Einträge
200
Antwort
Felder der Antwort mit Status 200. Fehler haben immer dasselbe Format, siehe Fehler.
-
idintegerThe ID.
-
codestringThe code buyers type.
-
statusstringWhat the seller set. archived = deleted.
Mögliche Werte:
activearchived -
statestringThe result for buyers: valid = buyers can use the code now.
Mögliche Werte:
validscheduledexpiredused_upreservedarchivedno_products -
percentinteger kann null seinDiscount in percent, or null for a fixed amount.
-
amountstring kann null seinDecimal string, like "19.90". Fixed discount, or null for a percent discount.
-
currencystringCurrency code, like EUR.
-
usedintegerHow often the code was used.
-
max_usesinteger kann null seinnull = no limit.
-
reserved_in_open_checkoutsintegerUses held by open checkouts of the last hour.
-
starts_onstring<date> kann null seinLike 2026-01-31. First day the code works.
-
ends_onstring<date> kann null seinLike 2026-01-31. The code stops at the start of this day.
-
product_idsarray of integer kann null seinnull = all products. [] = no product.
-
productsarray of objectThe products of product_ids (the first 200).
3 Felder anzeigen Felder ausblenden
-
idintegerThe ID.
-
namestring kann null seinThe name.
-
statusstringThe status.
Mögliche Werte:
livedraftarchiveddeleted
-
-
created_atstring<date-time> kann null seinUTC, like 2026-01-31T14:05:00Z.
-
admin_urlstring<uri>The page in the Tentary app.