PreVerifyCoupon
Function
PreVerify Coupon
Endpoint
- /v1/member-coupon/pre-verify
HTTP Method
- POST
Request Headers
- Authorization: Bearer {token}
- X-App-Key: {appKey}
Request Payload
- with memberId (Check the consistency between redemptionCode and memberId)
{
"redemptionCode":"Code of the redemption",
"memberId": "memberId",
"storeCode": "KTSP010000001",
"transactionAmount": "100.00"
}
- without memberId
{
"redemptionCode":"Code of the redemption",
"storeCode": "KTSP010000001",
"transactionAmount": "100.00"
}
Request Parameters
| Field | Required | Type | Remark | Sample |
|---|---|---|---|---|
| redemptionCode | Yes | string | redemptionCode | |
| storeCode | Yes | string | storeCode | KTSP010000001 |
| transactionAmount | No | string | transaction amount | 100.00 |
| memberId | No | string | memberId |
Response Payload
{
"status": 1,
"errorCode": 0,
"message": "success",
"isPreVerified": true,
"redemptionCode": "Code of the redemption",
"memberId": "memberId",
"couponId": "couponId",
"couponNameEn": "Coupon Name(EN)",
"couponNameSc": "Coupon Name(SC)",
"couponNameTc": "Coupon Name(TC)",
"couponType": "Cash",
"minimumSpendAmount": "1000.00",
"discountAmount": "100.00",
"unitCost": "0.00",
"freeParkingMins": 0,
"usageEffectiveTime": "2024-01-01T00:00:00+08:00",
"usageExpirationTime": "2024-01-01T23:59:59+08:00"
}
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 | ||
| isPreVerified | No | boolean | Pre-Verify result | ture |
| redemptionCode | No | string | Code of the redemption | |
| memberId | No | string | memberId | |
| couponId | No | string | couponId | |
| couponNameEn | No | string | Coupon Name(EN) | Coupon Name(EN) |
| couponNameSc | No | string | Coupon Name(SC) | Coupon Name(SC) |
| couponNameTc | No | string | Coupon Name(TC) | Coupon Name(TC) |
| couponType | No | string | Coupon Type: Cash(FixedValue)、 Exchange、 FreeParking、 KTSPPoints | Cash |
| 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 fix 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 |
| usageEffectiveTime | No | string | Effective Time | |
| usageExpirationTime | No | string | Expiration Time |
Response Headers
Error Codes
| Code | Description |
|---|---|
| 1 | Internal Error |
| 3 | Missing Parameter |
| 4 | Invalid Input: [field name] |
| 4100 | Member not found |
| 10411 | Redemption not found |
| 10412 | Invalid Coupon |
| 10413 | Invalid Store |
| 10414 | quotaExceeded |
| 10415 | minimumSpendAmount not match |
| 10416 | Coupon already used |
| 10417 | Coupon only available to KDP member |