# 2023 1st Round Test # Subject 1. 會員增加居留證欄位 2. 會員保存居留證欄位 3. 保單增加居留證欄位 4. 保單保存居留證欄位 5. KYC增加65歲action log >[居留證產生器](https://hugo.digitalgo.synology.me/2022/04/%E8%BA%AB%E5%88%86%E8%AD%89%E5%AD%97%E8%99%9F%E6%96%B0%E5%BC%8F%E5%B1%85%E7%95%99%E8%AD%89%E8%99%9F%E8%88%8A%E5%BC%8F%E5%B1%85%E7%95%99%E8%AD%89%E8%99%9F%E5%8F%8A%E7%B5%B1%E4%B8%80%E7%B7%A8%E8%99%9F%E7%94%A2%E7%94%9F%E5%99%A8%E6%9A%A8%E9%A9%97%E8%AD%89%E5%99%A8/) # Test Result ## CreateUser ### Situation 1-1: 本國人新用戶(身分證) #### Request ``` json { "idCardNumber": "A165957058", "name": "本國人新用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": null } ``` #### Response ``` json { "id": "zkullfowQ8eGlyHpPrK_GA" } ``` #### Field Data ``` json null ``` ### Situation 1-2: 本國人新用戶(身分證), no residency #### Request ``` json { "idCardNumber": "B137084952", "name": "本國人新用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000" } ``` #### Response ``` json { "id": "ERtenYyqQIO59WrijVwiDw" } ``` #### Field Data ``` json null ``` ### Situation 2: 本國人既有用戶(身分證) #### Request ``` json { "idCardNumber": "C125235208", "name": "本國人舊用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": null } ``` #### Response ``` json { "id": "RA_HMM-6TDy8EoivOtf0Tw" } ``` #### Field Data ``` json null ``` ### Situation 3-1: 外國人新用戶(舊版居留證) #### Request ``` json { "idCardNumber": "DC41233707", "name": "外國人新用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "T123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "N5J8RZIuSHCQ2fjbiIFfSQ" } ``` #### Field Data ``` json { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "T123456789", "insurePurpose": "旅遊" } ``` ### Situation 3-2: 外國人新用戶(舊版居留證) - 欄位更新 #### Request ``` json { "idCardNumber": "DC41233707", "name": "外國人新用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "AAA123546", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "N5J8RZIuSHCQ2fjbiIFfSQ" } ``` #### Field Data ``` json { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "AAA123546", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } ``` ### Situation 4: 外國人既有用戶(舊版居留證) - 欄位更新 #### 原本資料 ``` json { "idCardNumber": "EC05709327", "name": "外國人舊用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "serialNumber": "T123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### 更新資料 ``` json { "idCardNumber": "EC05709327", "name": "外國人舊用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "serialNumber": "S123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "N5J8RZIuSHCQ2fjbiIFfSQ" } ``` #### Field Data ``` json { "id": "6FkvPzvrQxOI_x23rsW00A", "idCardNumber": "EC05709327", "name": "外國人舊用戶", "birthday": "2000-01-01T00:00:00+08:00", "emailBelong": "self", "email": "ian.chiang@luckybo.com", "mobileBelong": "self", "mobile": "0910169932", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "serialNumber": "S123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" }, "policies": null } ``` ### Situation 5-1: 外國人新用戶(新版居留證) #### Request ``` json { "idCardNumber": "F842077663", "name": "外國人新用戶貳", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "T123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "KOwpMdIgR2OjOyWpBi8UEA" } ``` #### Field Data ``` json { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "T123456789", "insurePurpose": "旅遊" } ``` ### Situation 5-2: 外國人新用戶(新版居留證) - 更新資料 ``` json { "idCardNumber": "F842077663", "name": "外國人新用戶貳", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "A111111111", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` ``` json { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "A111111111", "insurePurpose": "旅遊" } ``` #### Situation 6: 外國人既有用戶(新版居留證) - 更新資料 #### 原資料 ``` json { "idCardNumber": "G855254773", "name": "外國人舊用戶貳", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "G123456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### 新資料 ``` json { "idCardNumber": "G855254773", "name": "外國人舊用戶貳", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "G987654321", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "pVAQuml_Rs6kGwJiEVI7SQ", "idCardNumber": "G855254773", "name": "外國人舊用戶貳", "birthday": "2000-01-01T00:00:00+08:00", "emailBelong": "self", "email": "ian.chiang@luckybo.com", "mobileBelong": "self", "mobile": "0910169932", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "G987654321", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" }, "policies": null } ``` #### Field Data ``` json { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "G987654321", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } ``` ### Situation 7: 外國人永居用戶(舊版永居居留證) #### Request ``` json { "idCardNumber": "HB94737923", "name": "外國人永久舊版用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "serialNumber": "A111111111", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "UkPBr0leTRCgUHXQacQTqQ" } ``` #### Field Data ``` json { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "A111111111", "insurePurpose": "旅遊" } ``` ### Situation 8: 外國人永居用戶(新版永居居留證) #### Request ``` json { "idCardNumber": "J987176908", "name": "外國人永久新版用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "serialNumber": "SSS456789", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "zD1ao37yRfewYA2o1rEb4w" } ``` #### Field Data ``` json { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "SSS456789", "insurePurpose": "旅遊" } ``` ### Situation 9: 阻擋外國人用戶(非永居未填到期日) #### Request ``` json { "idCardNumber": "K910327569", "name": "阻擋外國人用戶", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "serialNumber": "BB123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "errMsg": "`Residency` validate fail", "stCode": 6, "status": "info validator" } ``` ### Situation 10: 外國人用戶 - 忽略到期日 #### Request ``` json { "idCardNumber": "L948358814", "name": "外國人用戶忽略", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "BB123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "KdOuS58rRFO_OLoE0CPPzA" } ``` #### Field data ``` json { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "BB123456", "insurePurpose": "旅遊" } ``` ### Situation 11: 本國人用戶 - 忽略居留證相關欄位 #### Request ``` json { "idCardNumber": "M279550229", "name": "本國人用戶忽略", "birthday": "2000-01-01T00:00:00+08:00", "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "CC123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` #### Response ``` json { "id": "-Ak9dZQ4TKq7rhS-ex9NAQ" } ``` #### Field data ``` json null ``` ## Create Policy ### Situation 1: 本國人用戶(身分證) - 不寫入 #### Request ``` json { "member": { "id": "{{userID}}", "idCardNumber": "{{idCardNumber}}", "nationality": "台灣(Taiwan)", "nationalityType": 9, "name": "伊恩堡", "birthday": "2000-01-01T16:00:00.000Z", "email": "corvenik@gmail.com", "mobile": "0910169932", "promoCode": "", "source": [ "薪資" ], "addressCity": "台北市", "addressDist": "中山區", "addressZip": "104", "addressLine": "南京東路三段130號8樓", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2021-12-31T00:00:00+08:00", "serialNumber": "test123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } }, "policy": { "productId": "car", "period": "1d", "startAt": "2023-01-17T04:45:00.000Z", "plans": [ { "planId": "rent" } ] } } ``` #### field data ``` json null ``` ### Situation 2: 外國人用戶(居留證) - 寫入 ``` json { "member": { "id": "{{userID}}", "idCardNumber": "{{idCardNumber}}", "nationality": "台灣(Taiwan)", "nationalityType": 9, "name": "伊恩堡", "birthday": "2000-01-01T16:00:00.000Z", "email": "corvenik@gmail.com", "mobile": "0910169932", "promoCode": "", "source": [ "薪資" ], "addressCity": "台北市", "addressDist": "中山區", "addressZip": "104", "addressLine": "南京東路三段130號8樓", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "test123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } }, "policy": { "productId": "car", "period": "1d", "startAt": "2023-01-17T04:45:00.000Z", "plans": [ { "planId": "rent" } ] } } ``` #### field data ``` json { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "test123456", "insurePurpose": "旅遊" } ``` ## KYC ### Request ``` json { "trigger": "memberID", "action": "KYC65AgreeNotice", "actionResult": "agree", "target": "" } ``` ### Response ``` json { "status": "success", "stCode": 0, "errMsg": "" } ``` ## Update User Info ### 本國人 > 不管有沒有居留證資料都不會寫入 #### 無居留證資料 ##### Reqeust ``` json { "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": null } ``` ##### Response > status code 200 ##### field data ``` json null ``` #### 有居留證資料 ##### Reqeust ``` json { "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": false, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": "2023-12-31T00:00:00+08:00", "serialNumber": "CC123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` ##### Response > status code 200 ##### field data ``` json null ``` ### 外國人 > 有居留證資料的狀況會寫入 #### 無居留證資料 ##### Reqeust ``` json { "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": null } ``` ##### Response > status code 200 ##### field data ``` json null ``` #### 有居留證資料 ##### Reqeust ``` json { "email": "ian.chiang@luckybo.com", "emailBelong": "self", "mobile": "0910169932", "mobileBelong": "self", "addressCity": "台北市", "addressDist": "大安區", "addressZip": "106", "addressLine": "敦化南路二段11號", "jobCode": "000", "residency": { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "serialNumber": "CC123456", "stayPeriod": "一個月", "stayPurpose": "工作", "insurePurpose": "旅遊" } } ``` ##### Response > status code 200 ##### field data ``` json { "isForever": true, "issueDate": "2021-12-31T00:00:00+08:00", "expireDate": null, "stayPeriod": "一個月", "stayPurpose": "工作", "serialNumber": "CC123456", "insurePurpose": "旅遊" } ```