Skip to main content
POST

Authorizations

X-API-KEY
string
header
required

Your secret API key obtained from the Clink dashboard (Developers section)

Headers

X-Timestamp
string
required

Current timestamp in milliseconds since Unix epoch (required for request signing)

Example:

"1783513683000"

Body

application/json

Parameters required to create a coupon

couponName
string
required

Coupon name

Maximum string length: 40
discountType
enum<string>
required

Discount type

Available options:
percentage,
fixed_amount
applyType
enum<string>
required

Coupon applicability type

Available options:
none,
product,
price
durationType
enum<string>
required

Discount duration type

Available options:
once,
repeating,
forever
percentage
number

Percentage discount. Used when discountType is percentage.

Required range: 0 <= x <= 100
fixedAmounts
object

Fixed discount amount by currency. Used when discountType is fixed_amount.

Example:
applicableProducts
string[]

Product IDs this coupon applies to

applicablePrices
object

Price IDs this coupon applies to, grouped by product ID

durationMonths
integer<int32>

Number of billing periods for repeating coupons

maxRedemptionCount
integer<int32>

Maximum total redemptions for this coupon

validPeriodStart
integer<int64>

Coupon validity start time as a 13-digit Unix timestamp in milliseconds

Example:

1780660800000

validPeriodEnd
integer<int64>

Coupon validity end time as a 13-digit Unix timestamp in milliseconds

Example:

1780660800000

promotionCodes
object[]

Promotion codes to create together with the coupon

Maximum array length: 20

Response

Coupon created successfully

Body of the response message

code
integer<int32>

Response status code, 200 when success

Example:

200

msg
string

Brief description of what happened, 'success' when happy case

Example:

"success"

data
object