Skip to main content
POST
/
promotion-code
/
{id}
Create Promotion Code
curl --request POST \
  --url https://uat-api.clinkbill.com/api/promotion-code/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "code": "SUMMER2026",
  "firstOrderOnly": true,
  "maxRedemptionLimit": 100,
  "validPeriodStart": 1780660800000,
  "validPeriodEnd": 1783252800000
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "couponId": "<string>",
    "promotionCodeId": "<string>",
    "code": "<string>",
    "status": "active",
    "firstOrderOnly": true,
    "redemptionCount": 123,
    "maxRedemptionLimit": 123,
    "validPeriodEnd": 1754819711382,
    "createTime": 1754819711382,
    "mirroring": true
  }
}

Authorizations

X-API-KEY
string
header
required

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

X-Timestamp
string
header
required

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

Path Parameters

id
string
required

Unique identifier of the coupon

Body

application/json

Parameters required to create a promotion code

code
string

Customer-facing promotion code. If omitted, a code can be generated by the platform.

Pattern: ^[a-zA-Z0-9]{1,32}$
Example:

"SUMMER2026"

firstOrderOnly
boolean

Whether this promotion code is limited to first orders only

restrictedCustomerIds
string[]

Customer IDs allowed to redeem this promotion code. Empty means unrestricted.

minimumSpend
object

Minimum spend by currency. Key is an ISO currency code.

Example:
{ "USD": 10, "EUR": 9 }
perCustomerRedemptionLimit
integer<int32>

Redemption limit per customer

maxRedemptionLimit
integer<int32>

Maximum total redemptions for this promotion code

validPeriodStart
integer<int64>

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

Example:

1780660800000

validPeriodEnd
integer<int64>

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

Example:

1780660800000

Response

Promotion code 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