Project

General

Profile

기능(Feature) #485

Updated by Dante Le 9 months ago

*[Tech note]* 
 Create new API to remove coupon cache (delete key COUPON:<COUPON_CODE>) 
 *[SQL]* 
 <pre><code class="sql"> 
 INSERT INTO OMH_SUITE.BS_API_SERVICE_CODE (API_SERVICE_URL, METHOD_NAME, OWNER_COMP_CODE, API_SERVICE_NAME_EN, 
                                            API_SERVICE_NAME_KO, SCHEMA_FILE_NAME_RQ, SCHEMA_FILE_NAME_RS, 
                                            VENDOR_SERVICE_NAME, API_SERVICE_DESC, SAMPLE_REQUEST_MESSAGE, 
                                            SAMPLE_RESPONSE_MESSAGE, OPEN_API_YN, OUTSIDE_INTERFACE_YN, LOG_SAVE_YN, 
                                            IGNORE_SCHEMA_YN, CONTROL_REMARK, USE_YN, FIRST_INSERT_UNO, 
                                            FIRST_INSERT_DATETIME, LAST_UPDATE_UNO, LAST_UPDATE_DATETIME) 
 VALUES ('/booking/hotel/hana/remove-coupon-cache', 'POST', 110000, 'remove coupon cache', 'remove coupon cache', 
         '/booking/hotel/hana/remove_coupon_cache/remove_coupon_cache_schema_rq.json', 
         '/booking/hotel/hana/remove_coupon_cache/remove_coupon_cache_schema_rs.json', '', '', '', '', 'N', 'N', 'N', 
         'N', '', 'Y', 10000, '2025-06-03 18:36:35', 10000, '2025-06-03 18:36:35') 
 </code></pre> 
 *[API info]* 
 - Endpoint: /booking/hotel/hana/remove-coupon-cache 
 - Request: 
 <pre><code class="javascript"> 
 { 
     "condition": { 
         "couponItemCode": "HANA_COUPON_ABCDEF", 
         "affiliateUserNo": "1bb0df1854a1802687c5cbf2752dda7e-45asdasda" 
     }, 
     "stationTypeCode": "STN01", 
     "currency": "KRW", 
     "country": "KR", 
     "language": "KO" 
 } 
 </code></pre> 
 - Response: 
 <pre><code class="javascript"> 
 { 
     "result": { 
         "isDeleted": false 
     }, 
     "serviceCode": "/booking/hotel/hana/remove-coupon-cache", 
     "transactionSetId": "70B1EBD4EA1649DCB72DA4CE635A3C4D", 
     "succeedYn": true, 
     "serviceName": "/booking/hotel/hana/remove-coupon-cache" 
 } 
 </code></pre> 
 *- CUrl:* 
 <pre><code class="c"> 
 curl --location 'http://localhost:8080/booking/hotel/hana/remove-coupon-cache' \ 
 --header 'accept: application/json, text/plain, */*' \ 
 --header 'accept-language: en-US,en;q=0.9,vi;q=0.8' \ 
 --header 'cache-control: no-cache' \ 
 --header 'content-type: application/json' \ 
 --header 'origin: https://www.ohmytrip.com' \ 
 --header 'pragma: no-cache' \ 
 --header 'priority: u=1, i' \ 
 --header 'referer: https://www.ohmytrip.com/' \ 
 --header 'sec-ch-ua: "Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99"' \ 
 --header 'sec-ch-ua-mobile: ?0' \ 
 --header 'sec-ch-ua-platform: "Windows"' \ 
 --header 'sec-fetch-dest: empty' \ 
 --header 'sec-fetch-mode: cors' \ 
 --header 'sec-fetch-site: same-site' \ 
 --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \ 
 --data '{ 
     "condition": { 
         "couponItemCode": "HANA_COUPON_ABCDEF", 
         "affiliateUserNo": "1bb0df1854a1802687c5cbf2752dda7e-45asdasda" 
     }, 
     "stationTypeCode": "STN01", 
     "currency": "KRW", 
     "country": "KR", 
     "language": "KO" 
 }' 
 </code></pre> 



Back

Add picture from clipboard (Maximum size: 50 MB)