Project

General

Profile

기능(Feature) #484

Updated by Dante Le 9 months ago

Validate coupon and return coupon information 
 Consider applying cache to avoid multiple users using the same coupon at the same time 

 *[Tech note]* [Tech note] 
 - Create new api to validate and return coupon info 
 - Valid Coupon: 
    + Check expired time 
    + Min booking's amount 
    + 1 time/day (except booking cancel) 
 *[API info]* 
 - Endpoint: /booking/hotel/hana/get-coupon 
 - Request: 
 <pre><code class="javascript"> 
 { 
     "condition": { 
         "couponItemCode": "HANA_COUPON_ABCDEF", 
         "affiliateUserNo": "1bb0df1854a1802687c5cbf2752dda7e-45asdasd", 
         "bookingAmount": 2122144 
     }, 
     "stationTypeCode": "STN01", 
     "currency": "KRW", 
     "country": "KR", 
     "language": "KO" 
 } 
 </code></pre> 
 - Response: 
 <pre><code class="javascript"> 
 { 
     "result": { 
         "couponAmount": null, 
         "isValid": false, 
         "invalidCode": "COUPON_I01" 
     }, 
     "serviceCode": "/booking/hotel/hana/get-coupon", 
     "transactionSetId": "BC2B57D9894C460C830F8E9677FEC599", 
     "succeedYn": true, 
     "serviceName": "/booking/hotel/hana/get-coupon" 
 } 
 </code></pre> 

Back

Add picture from clipboard (Maximum size: 50 MB)