--- title: 'PDApproveDetail' disqus: hackmd --- Version | Handler |Desc | Date ---- | --- | --- | --- 1.0.0 |Jum | Create | 2025-5-19 Description: Call API get detail of insurance ## **PDApproveDetail** | 環境 | 網址 | | ----------------------- | --------------------------------- | | SIT | https://api-sit.cathay-ins.com.vn:9527/guarantee/api/Comprehensive/PDApproveDetail| | UAT | https://api-uat.cathay-ins.com.vn:9527/guarantee/api/Comprehensive/PDApproveDetail| | CORE |/cxinsvn/servlet/HttpDispatcher/ATWA_1000/getCompAccidentApproveDetailForAP | ## Header規格設計 1. 前端呼叫API Gateway Hearder參數:(同既有規範) | 項目 | 說明 | | ----------------------- | --------------------------------- | | Method | POST | | Required Request Header | Content-Type : application/json; charset=UTF-8 | | Required Request Header | x-api-version=1 | | Bearer Token | Call login api for receiving "access_token". This token is Bearer Token format. For details, please refer to the [login api](/lfbsyk40QCuaISPSf0x30g) | 2. 中台呼叫核心 Hearder參數 參數名 | 型態 | 必須 | 說明 ---- | --- | --- | --- CLIENT_TARGET | String | Y | 登入帳號,帶前端傳入的參數loginId TOKEN | String | Y | 前面登入時會拿到的TOKEN字串 LG_CODE | String | Y | 語系代碼,越文:vi-VN,英文:en-US,中文:zh-TW,若此參數未傳入,會預設回傳越文 ## Request ### API Gateway FIELD | TYPE | REQUIRED | NOTED ---- | --- | --- | --- language | String | Y | LANGUAGE FOR MESSAGE loginId | String | Y | LOGIN ID token | String | Y | TOKEN agntEmpno | String |Y| agent employ number polNo | String | N | policy number cntrNo | String | N | contact number ### Request 範例 1. 前端Request API Gateway 範例 ```json= { "language":"zh-TW", "loginId": "0100014373", "token": "NlXEt66fejIrQvIGampcPnLVdmIYVo0wdZf8T5H5xkM5lpVpvuhDn9qSaAQDSkbkOdUjxvXufQpyH0WZWvQThw==", "prodPolCode":"AC01007", "agntEmpno":"0100014373", "cntrNo":"210601168725" } ``` ```json= { "language":"zh-TW", "loginId": "0100014373", "token": "NlXEt66fejIrQvIGampcPnLVdmIYVo0wdZf8T5H5xkM5lpVpvuhDn9qSaAQDSkbkOdUjxvXufQpyH0WZWvQThw==", "agntEmpno":"0100014373", "polNo":"CI21P4004909" } ``` 2. 中台呼叫核心API範例 ```json= { "AGNT_EMPNO":"0100014373", "CNTR_NO":"210601168725" } ``` ```json= { "AGNT_EMPNO":"0100014373", "POL_NO": "CI19P4060026" } ``` ## Response ### Response Fields Field Name | Data Type | Length | Description -----------|----------|-------|------------ status | Integer | 3 | Success:200 / Cathay core error:999 / System error:500 / Timeout:504 success | Boolean | - | true/false message | String | - | "Success/Error message" total | Integer | - | Total number of records data | Object | - | List of records (null if no data) ### Data Fields 1. `relationship` is formed by `INSR_RELATION + INSR_RELATION_MEMO` and displayed in Vietnamese according to the table below: | INSR_RELATION Code | relationship Display | Notes | |-------------------|--------------------|------| | 1 | Tôi | Code 1, Self | | 2 | vợ chồng | Code 2, Spouse | | 3 | con cái | Code 3, Child | | 4 | cha mẹ | Code 4, Parent | | 6 | anh chị em ruột | Use INSR_RELATION_MEMO, Sibling | | 6 | người nuôi dưỡng | Use INSR_RELATION_MEMO, Guardian | Field Name | Core Parameter | Data Type | Required | Description ----------------|----------------|----------|---------|------------ approveDetail | APPROVE_DETAIL | Object | Y | Policy information cntrNo | CNTR_NO | String | Y | Contract number procNo | PROC_NO | String | Y | Application number prodCode | PROD_CODE | String | Y | Product type code (Motorcycle:C / Car:C / Travel:A / Accident:A) polNo | POL_NO | String | Y | Policy number polRenewNo | null | String | Y | Previous policy number procCode | PROC_CODE | String | Y | Processing status prodPolCode | PROD_POL_CODE | String | Y | Product policy type code agntEmpno | AGNT_EMPNO | String | Y | Agent employee number customerName | CUSTOMER_NAME | String | Y | Policyholder name certificateType | CERTIFICATE_TYPE | String | Y | Policyholder certificate type certificateNumber | CERTIFICATE_NUMBER | String | Y | Policyholder ID number gender | GENDER | String | Y | Gender (1: Male, 2: Female) nationalId | NATIONAL_ID | String | Y | Nationality birthday | INSR_BIRTHDAY | String | Y | Birth date (YYYY-MM-DD) mobilePhone | MOBILE_PHONE | String | Y | Mobile phone addr | ADDR | String | Y | Address polDt | POL_DT | String | Y | Old policy start (YYYY-MM-DD HH:MM:SS) polDueDt | POL_DUE_DT | String | Y | Old policy end (YYYY-MM-DD HH:MM:SS) prem | PREM | String | Y | Received premium taxes | TAXES | Decimal | Y | Taxes rate | RATE | Decimal | Y | Tax rate hbdMemo | HND_MEMO | String | Y | Underwriting rejection reason printType | PRINT_TYPE | String | Y | Policy format (1=Digital, 2=Paper) crtEmpno | CRT_EMPNO | String | Y | Input staff employee number crtName | CRT_NAME | String | Y | Input staff name crtDt | CRT_DT | Date | Y | Input date (YYYY-MM-DD) typePol | TYPE_POL | String | Y | Policy submission type saleWay | SALE_WAY | String | Y | Submission channel polDate | POL_DATE | String | Y | Digital policy sent date (YYYY-MM-DD) polEmail | POL_EMAIL | String | Y | Digital policy email **payTime** | PAY_TIME | DateTime | Y | Payment time **payKind** | PAY_KIND | String | Y | Payment method (1=CS Cathay Life,2=Bank transfer,3=MoMo,4=Mobile Web) **payOption** | PAY_OPTION | String | Y | Payment option (0:Agent, 1:Client) **insrList** | INSR_LIST | List | Y | Accident insurance insured list (multiple) workCont | work_cont | String | Y | Self-entered occupation description discPrem | DISC_PREM | Decimal | Y | Discounted premium realPrem | REAL_PREM | Decimal | Y | Actual received premium fronPrem | FRON_PREM | Decimal | Y | Foreign currency premium fronDiscPrem | FRON_DISC_PREM | Decimal | Y | Foreign currency discounted premium fronRealPrem | FRON_REAL_PREM | Decimal | Y | Foreign currency actual premium amt | AMT | Decimal | Y | Coverage amount fronAmt | FRON_AMT | Decimal | Y | Foreign currency coverage effeStatDate | EFFE_STAT_DATE | Date | Y | Effective start date effeEndDate | EFFE_END_DATE | Date | Y | Effective end date **premList** | PREM_LIST | List | Y | Insured list premium records (inside insrList, matched by CNTR_NO and INSR_NO) #### insrList Field Name | Core Parameter | Data Type | Required | Description ----------------|----------------|----------|---------|------------ cntrNo | CNTR_NO | String | Y | Contract number insrNo | INSR_NO | String | Y | Insured customer ID serNo | SER_NO | Integer | Y | List sequence number insrName | INSR_NAME | String | Y | Insured name insrCertType | INSR_CERT_TYPE | String | Y | Certificate type insrCertNumber | INSR_CERT_NUMBER | String | Y | Certificate number insrAge | INSR_AGE | Decimal | Y | Age sex | INSR_GENDER | String | Y | Gender insrBirthday | INSR_BIRTHDAY | String | Y | Birth date (YYYY-MM-DD) insrProj | INSR_PROJ | String | Y | Insurance project insrRelation | INSR_RELATION | String | Y | Relationship code insrRelationMemo | INSR_RELATION_MEMO | String | Y | Relationship memo relationship | INSR_RELATION+INSR_RELATION_MEMO | String | Y | Display in Vietnamese jobCat | JOB_CAT | String | Y | Occupation code assignBeneficiary | ASSIGN_BENEFICIARY | Integer | N | Beneficiary type numberBeneficiary | NUMBER_BENEFICIARY | Integer | N | Number of beneficiaries **beneficiaries** | BENEFICIARIES | OA | N | Beneficiary list pack | prod_pack | String | Y | PACK OF PREMIUM medHisTreatment | in_treatment | String | Y | Medical treatment medHisHandiCapped | be_handicapped | String | Y | Handicap record medHisBadSymp | bad_symptoms | String | Y | Bad symptoms insrScope | insurance_scope | String | Y | Insurance coverage #### beneficiaries Field Name | Core Parameter | Data Type | Required | Description ------------------------|----------------|----------|---------|------------ beneficiaryRelationship | BENEFICIARY_RELATIONSHIP | String | N | Relationship beneficiaryCertType | BENEFICIARY_CERT_TYPE | String | N | Certificate type beneficiaryCertNumber | BENEFICIARY_CERT_NUMBER | String | N | Certificate number beneficiaryName | BENEFICIARY_NAME | String | N | Name beneficiaryBirthday | BENEFICIARY_BIRTHDAY | Date | N | Birth date (YYYY-MM-DD) sex | SEX | String | N | Gender beneficiaryPhone | BENEFICIARY_PHONE | String | N | Phone beneficiaryAddress | BENEFICIARY_ADDRESS | String | N | Address ratio | RATIO | Decimal | N | Ratio #### premList Field Name | Core Parameter | Data Type | Required | Description -----------|----------------|----------|---------|------------ prodId | PROD_ID | String | Y | Product code prodNm | PROD_NM | String | Y | Product name amt | AMT | String | Y | Coverage fronAmt | FRON_AMT | String | Y | Foreign currency coverage prem | PREM | String | Y | Standard premium fronPrem | FRON_PREM | String | Y | Foreign currency standard premium realPrem | REAL_PREM | String | Y | Actual premium discPrem | DISC_PREM | String | Y | Discounted premium effDate | EFF_DATE | Date | Y | Rider effective date (main policy empty) expDate | EXP_DATE | Date | Y | Rider expiry date (main policy empty) ### Response 範例 ```json= { "status": 200, "message": "成功", "success": true, "total": 1, "data": { "approveDetail": { "paytDeae": null, "beneficiary": null, "medHisBadSymp": "N", "medHisTreatment": "N", "medHisHandiCapped": "N", "totPrem": 270000, "polRenewNo": null, "add1Amt": null, "add1PolDt": null, "add1PolDueDt": null, "add2Amt": null, "add2PolDt": null, "add2PolDueDt": null, "payStatus": null, "cntrNo": "240270067816", "procNo": "PD24A0000048", "prodCode": "A", "polNo": "CI24PD000772", "procCode": "5", "prodPolCode": "AC01018", "agntEmpno": "0100007225", "agntName": "Từ Vĩnh Quang", "customerName": "HỘ CHIẾU", "certificateType": "1", "certificateNumber": "190033888", "gender": "2", "nationalId": "VIETN", "birthday": "1993-03-01 00:00:00.0", "mobilePhone": "0785683605", "addr": "quận Hải Châu, Thành Phố Đà Nẵng", "polDt": "2024-02-29 20:30:00.0", "polDueDt": "2025-02-28 20:30:00.0", "prem": "270000", "taxes": 0, "rate": 0, "printType": "1", "crtEmpno": "0100007225", "crtDt": "2024-02-29 16:39:55.265", "typePol": "M", "saleWay": "2", "polDate": "2024-02-29 16:39:57.987", "polEmail": "nguyenducchaungoc@gmail.com", "polPrntDate": "2024-02-29 16:39:57.987", "crtName": "Từ Vĩnh Quang (徐義侊)", "hbdMemo": "", "payTime": null, "payKind": null, "payOption": "0", "aplyNo": null, "pack": "PDA", "insuranceScope": "VN", "realPrem": 270000 }, "insrList": [ { "prem": null, "relationship": "con cái", "cntrNo": "240270067816", "insrNo": "0032454219", "serNo": "0", "insrName": "HỘ CHIẾU", "insrCertType": "3", "insrCertNumber": "A190033888", "insrAge": 21, "sex": "2", "insrBirthday": "2002-03-01", "insrProj": null, "insrRelation": "3", "insrRelationMemo": null, "jobCat": "190101", "discPrem": 0, "realPrem": 270000, "fronPrem": null, "fronDiscPrem": null, "fronRealPrem": null, "amt": "115000000", "fronAmt": null, "effeStatDate": "2024-02-29", "effeEndDate": "2025-02-28", "workCont": "Người quản lý", "isBuyEPack": null, "assignBeneficiary": 0, "numberBeneficiary": 0, "lossRate": null, "beneficiaries": [ { "beneficiaryRelationship": "4", "beneficiaryCertType": "3", "beneficiaryCertNumber": "h343433444", "beneficiaryName": "BEN I INSR I", "beneficiaryBirthday": "2025-02-28", "sex": "1", "beneficiaryPhone": "", "beneficiaryAddress": "samz address1", "ratio": 50.0 } ], "premList": [ { "cntrNo": "240270067816", "insrNo": "0032454219", "prodId": "PIA", "prodNm": "Tử vong/ thương tật toàn bộ vĩnh viễn", "amt": "100000000", "fronAmt": null, "prem": "90000", "fronPrem": null, "realPrem": "90000", "discPrem": "0", "effDate": "2024-02-29", "expDate": "2025-02-28" }, { "cntrNo": "240270067816", "insrNo": "0032454219", "prodId": "PIB", "prodNm": "Chi phí điều trị do tai nạn", "amt": "15000000", "fronAmt": null, "prem": "180000", "fronPrem": null, "realPrem": "180000", "discPrem": "0", "effDate": "2024-02-29", "expDate": "2025-02-28" } ] } ] } } ``` ``` ###### tags: `agentportal` `Documentation`