Create Coupon
This API provides the ability to create discount coupons.
To create multiple coupons at once, please use the dashboard.
Coupon images cannot be uploaded via API.
If an image is required, first create a coupon group in the dashboard, upload the image there, and then assign the group when creating the coupon.
This API is available on Personal plans or higher.
POST
/api/coupon/v1/create
{
"cpnNo": "", // If left empty, a 16-character code will be generated automatically by the system.
"nm": "$5 discount coupon",
"discTypeIdx": 458,
"disc": 5,
"discCurrency": "USD",
"strtYmd": "2025-01-01",
"endYmd": "2025-12-31",
"useLimit": 1,
"grpIdx": 271,
"tmplIdx": 0,
"onsiteYn": "Y",
"onsitePwd": "123456",
"memo": "New Member Registration, IP: 211.111.222.33",
"url": "https://bestshop.com",
"userId": "att78z",
"userNm": "Brown Smith",
"userPhnno": "+1 123-4567-8900",
"userEml": "test@gmail.com",
"userEtc1": "Gold rating",
"userEtc2": ""
}
Request Parameters
- cpnNostring
- Coupon number. 8–16 characters, letters and numbers only. Auto-generated if not provided. Special characters not allowed.
Example: V5H8GR5T - nmstringrequired
- Coupon name.
- discTypeIdxintegerrequired
- Discount type. (457: Percentage %, 458: Fixed amount)
- discdoublerequired
- For percentage discounts (457): range 1–100%. For fixed amount discounts (458): enter an amount.
- discCurrencystring
- Currency unit. Required when using fixed amount (discTypeIdx:458).
- strtYmddaterequired
- Coupon valid start date. Example: 2024-10-01
- endYmddaterequired
- Coupon expiration date. Example: 2024-12-31
The expiration date can only be set until December 31 of the following year. - useLimitintegerrequired
- Coupon usage limit. (0: Unlimited, 1–5: Restricted uses)
If set to 2 or more,userId
must be provided. - grpIdxinteger
- Coupon group. Used to manage coupons in groups. Group IDX can be checked in the dashboard.
If both group and coupon settings are applied, group settings take priority. - tmplIdxinteger
- Coupon template. Template IDX can be checked in the dashboard when creating coupons.
- onsiteYnstring
- On-site coupon indicator. Shows a
“Use Coupon”
button on the coupon page.
Required for offline store staff to process coupon usage. - onsitePwdstring
- On-site coupon password. Required when redeeming the coupon.
- memostring
- Internal notes for reference.
- urlstring
- If a URL is entered, a
“Go to Use Coupon”
button will appear on the coupon page.
Clicking the button or image redirects to the specified URL. - colorstring
- Coupon text color. Enter HEX value. Example: #4F4F4F
- backgroundstring
- Coupon background color. Enter HEX value. Example: #FFFFFF
- userIdstring
- Used to manage coupon recipients.
Required if usage limit is set to 2–5. Typically the website login ID or user name. - userNmstring
- Coupon user name. For internal management.
- userPhnnostring
- Coupon user contact number. For internal management.
- userEmlstring
- Coupon user email. For internal management.
- userEtc1string
- Additional internal management field.
- userEtc2string
- Additional internal management field.
{
"code": 0,
"message": "",
"result": "ZJLF0399WQBEQZJM"
}
Response Parameters
- codeinteger
- Response code: 0 = Success, other values = Error
- messagestring
- Response message. If the response code is not 0, an error message is returned.
- resultstring
- Response value. The generated coupon number is returned.
Example: ZJLF0399WQBEQZJM