Skip to main content
PUT
Update coupon

Авторизації

Authorization
string
header
обов'язково

API token from the Zenedu dashboard

Параметри шляху

bot
integer
обов'язково

Bot ID

coupon
integer
обов'язково

Coupon ID

Тіло

application/json
code
string
обов'язково

Coupon code

Maximum string length: 250
discount_type
enum<string>
обов'язково
Доступні опції:
percent,
amount
discount_amount
number
обов'язково

Percent for percent type, amount in offer currency for amount type

Необхідний діапазон: x >= 0.01
duration_type
enum<string>
обов'язково

How long the discount applies to a subscription

Доступні опції:
once,
forever,
repeating
offer_ids
integer[]
обов'язково

Offers the coupon applies to

Minimum array length: 1
active
boolean

Whether the coupon is active

duration_amount
integer | null

Number of billing periods; required when duration_type is repeating

Необхідний діапазон: x >= 1
expired_at
string<date-time> | null

Expiration date (UTC)

usage_limit
integer | null

Maximum number of uses

Необхідний діапазон: x >= 1

Відповідь

Coupon updated

data
object