CouponInfo
Function
Get Coupon Information
Endpoint
- /v1/coupon/info
HTTP Method
- POST
Request Headers
- Authorization: Bearer {token}
- X-App-Key: {appKey}
Request Payload
with couponId
{
"couponId": "couponId"
}
with campaignId
{
"couponId": "couponId",
"campaignId": "campaignId"
}
Request Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| couponId | Yes | string | couponId | couponId |
| campaignId | No | string | campaignId | campaignId |
Response Payload
{
"status": 1,
"errorCode": 0,
"message": "success",
"couponId":"xxxxx",
"couponNameEn":"Coupon Name(EN)",
"couponNameSc":"Coupon Name(SC)",
"couponNameTc":"Coupon Name(TC)",
"couponType": "Cash",
"couponStatus": "Active",
"descriptionEn": "Description (EN)",
"descriptionSc": "Description (SC)",
"descriptionTc": "Description (TC)",
"tncEn": "Terms and Conditions (EN)",
"tncSc": "Terms and Conditions (SC)",
"tncTc": "Terms and Conditions (TC)",
"remarkEn": "remark (EN)",
"remarkSc": "remark (SC)",
"remarkTc": "remark (TC)",
"iconUrl": "https://xxx",
"imageUrlList": [
"https://xxx"
],
"stock": 10,
"minimumSpendAmount":"1000.00",
"discountAmount":"100.00",
"unitCost": "0.00",
"freeParkingMins": 0,
"issuePoints": 0,
"usageExpirationType": "FixedTime",
"usageEffectiveTime": "2024-01-01T00:00:00+08:00",
"usageExpirationTime": "2024-12-31T23:59:59+08:00",
"usageExpirationPeriod": 0,
"usageStoreList": [
"KTSP010000001"
],
"campaign": {
"campaignStock": 0
}
}
Response Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| status | Yes | string | status code of the api call | |
| message | Yes | string | detail message of the api call | |
| errorCode | No | string | ||
| couponId | Yes | string | Coupon Id | |
| couponNameEn | No | string | Coupon Name(EN) | |
| couponNameSc | No | string | Coupon Name(SC) | |
| couponNameTc | No | string | Coupon Name(TC) | |
| couponType | No | string | Coupon Type: Cash(FixedValue)、 Exchange、 FreeParking、 KTSPPoints | Cash |
| couponStatus | No | string | Coupon Status: Active 、 Inactive | Active |
| descriptionEn | No | string | Description (EN) | |
| descriptionSc | No | string | Description (SC) | |
| descriptionTc | No | string | Description (TC) | |
| tncEn | No | string | Terms and Conditions (EN) | |
| tncSc | No | string | Terms and Conditions (SC) | |
| tncTc | No | string | Terms and Conditions (TC) | |
| remarkEn | No | string | Remark (EN) | |
| remarkSc | No | string | Remark (SC) | |
| remarkTc | No | string | Remark (TC) | |
| iconUrl | No | string | Icon Url | |
| imageUrlList | No | array | Image Url List | |
| stock | No | number | Stock Value | 10 |
| minimumSpendAmount | No | string | The minimum spend required for using this coupon | 100.00 |
| discountAmount | No | string | The discount amount set for this particular coupon. Only when it is a fixed amount coupon( couponType=Cash), api will return a value. | 100.00 |
| unitCost | No | string | unitCost | 0.00 |
| freeParkingMins | No | number | Free Parking Mins, Only when it is a FreeParking coupon( couponType=FreeParking), api will return a value. | 0 |
| issuePoints | No | number | Points To Issue, (couponType=KTSPPoints) | 0 |
| usageExpirationType | No | string | usageExpirationType: FixedTime 、 TodayOnly 、 Days | |
| usageEffectiveTime | No | string | Effective Time, usageExpirationType= FixedTime | |
| usageExpirationTime | No | string | Expiration Time, usageExpirationType= FixedTime | |
| usageExpirationPeriod | No | number | usageExpirationType= Days, means the number of days | |
| usageStoreList | No | array | usage Store List | |
| campaign | No | object | campaign , Return if campaignId is provided in the request | |
| . campaignStock | No | number | Campaign Stock Value | 0 |
Response Headers
Error Codes
| Code | Description |
|---|---|
| 1 | Internal Error |
| 3 | Missing Parameter |
| 10401 | Coupon not found |