FORMAT: 1A HOST: https://api.chailease.com/api/ # 東聯移工APP ## 狀態代碼 --- | 代碼 | 說明 | |---|---| |200| `OK` - 成功 (部分創建資源API請求成功時回應狀態代碼為201)| |201| `Created` - 成功,且資源已被創建| |204| `No Content` - 成功,沒有資源可被回應| |400| `Bad Request` - 失敗,缺少必須的參數或請求無法被 Server 解析| |401| `Unauthorized` - 失敗,對於操作的資源缺乏權限或授權失敗| |403| `Forbidden` - 失敗,禁止操作| |404| `Not Found` - 失敗,資源不存在| |405| `Method Not Allowed` - 失敗,請求動作不被許可| |500|`Internal Server Error`- 伺服器端發生未知或無法處理的錯誤(資料庫異常、程式異常)| ## 基礎請求表頭 --- | Request header | 說明 | |---|---| |Content-Type| `Content-Type` - application/json| |X-From-Channel| `請SD 定義通路代碼` - 通路代碼(web、app)| |X-Client-TraceId| `b3165466-df5b-c3d7-0e94-79d94e8c692f` - 客戶端產生UUID「Universally Unique IDentifier」(通用唯一識別碼),每次Request 需不一樣| |X-Client-Date| `2021-06-08T03:12:19.998Z` - 請求訊息的日期和時間(使用ISO 8601格式)| |X-Device-TraceId| `2480a8d8-4c3d-4a09-8c10-bc16a9ba34c1` - 裝置端的UUID,用來辨識出自哪個移動裝置的請求,只有從APP端發送請求時須帶入| ## 基礎回傳表頭(Response) --- | Response header | 說明 | |---|---| |X-From-Channel| `請SD 定義通路代碼` - 通路代碼(web、app)| |X-Server-TraceId| `b3165466-df5b-c3d7-0e94-79d94e8c692f` - 伺服器端產生UUID「Universally Unique IDentifier」(通用唯一識別碼)| |X-Server-Date| `2021-06-08T03:12:19.998Z` - 請求訊息的日期和時間(使用ISO 8601格式)| ## 白名單 [/whitelist] ### 取得單一筆白名單 [GET /whitelist/{UUID}] + Parameters + UUID - 用戶去識別唯一碼 + Response 200 (application/json) { "result":{ "returnCode":"0", "returnMsg":"Success", "data":[ { "UUID":"11111", "Type":"INF", "ArcNo":"dddd", "Country":"PH" } ] } } ### 建立一筆或多筆白名單 [POST] + Attributes + Array + uuid(string, required) - 用戶去識別唯一碼 + arcNo(string,optional) - Arc No + mobile(string,optional) - 聯絡電話 + country(string,required) - 國籍 + status: NONE (enum,required) - 移工狀態 + NONE - 正常 + LOST - 失聯 + INF- 查無資料 + FS - 查獲收容 + CLT - 取消失聯通報 + BE - 回原雇主,撤銷協尋 + CFS - 取消查獲收容 + Request (application/json) [ { "uuid": "string", "arcNo": "string", "mobile": "string", "status": "string" }, { "uuid": "string", "arcNo": "string", "mobile": "string", "status": "string" } ] + Response 20 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"Success" } } ### 修改一筆多筆白名單 [PUT /whitelist] + Attributes + Array + uuid(string,required) - 用戶去識別唯一碼 + arcNo(string,optional) - Arc No + mobile(string,optional) - 聯絡電話 + country(string,required) - 國籍 ID : 印尼, VN : 越南, TH : 泰國, PH : 菲律賓 + status(string,required) - 移工狀態 NONE : 正常, LOST : 失聯, INF: 查無資料, FS : 查獲收容, CLT : 取消失聯通報, BE : 回原雇主,撤銷協尋, CFS : 取消查獲收容 + Request (application/json) [ {"uuid":"11111","arcno":"dddd","mobile":"0911222333","status":"none"}, {"uuid":"22222","arcno":"dddd","mobile":null,"status":"inf"} ] + Response 200 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"Success" } } ### 刪除一筆白名單 [DELETE /whitelist/{UUID}] + Parameters + UUID(string, required) - 用戶去識別唯一碼 + Response 200 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"Success" } } ## 案件查詢/申貸紀錄 [/loanRecord] ### 取得移工案件查詢/申貸紀錄 [GET /loanRecord/{UUID}] + Parameters + UUID - 用戶去識別唯一碼 + Response 200 (application/json) { "result":{ "returnCode":"0", "returnMsg":"有申請記錄", "data":{ "statu":"1-未送件,3- 審核成功, 4-簽約成功-待照會, 5-照會成功-待撥款, 6-撥款成功-開始繳費, 7-帳單逾期, 8-已結案(繳清),2X- 失敗 or 退回(定義成KeyID 對照相關翻譯), ", "period":[ { "num":"1", "amount":"10000", "is_pay":"Y", "deadline":"2022/05/19", "barcode":"[付款條碼圖片網址] OR [條碼1,條碼2,條碼3]" }, { "num":"1", "amount":"10000", "is_pay":"Y", "deadline":"2022/05/19", "barcode":"[付款條碼圖片網址] OR [條碼1,條碼2,條碼3]" } ] } } } ### 建立一筆申貸紀錄(送件) [POST] + Attributes + UUID (string, required) - 用戶去識別唯一碼 + A01 (string, optional) - 活體辨識 + A02 (string, required) - 照片與本人照辨識 + A03 (string, required) - 居留證編號 (統一證號) + A04 (string, required) - ARC流水號 (背面流水號) + A05 (string, required) - 居留證發證日期 (核發日期) + A06 (string, required) - 居留證有效期  (居留期限) + A07 (string, required) - 出生日期 + A08 (string, required) - 性別 F : 女性, M : 男性 + A09 (string, required) - 國別 ID:印尼, VN:越南, TH:泰國, PH:菲律賓 + A10 (string, optional) - 是否有固定工作地點(白天重複規律出現地點) + A11 (string, required) - 居留證上地址 + A12 (string, optional) - 匯款地理位置合理性 + A13 (string, optional) - 是否驗證手機號 + A14 (string, optional) - 是否通過東聯AML + A15 (string, optional) - 是否通過東聯KYC + A16 (string, optional) - 是否有過東聯停權紀錄 + A17 (string, optional) - 受款人人數 + A18 (string, optional) - 勞動部通報失聯 + A19 (string, optional) - 手機語言是否為(東南亞語系) + A20 (string, optional) - 使用東聯服務時間 + A21 (string, optional) - 累計匯款金額 + A22 (string, optional) - 累計匯款交易筆數 + B01 (string, optional) - 是否FB註冊 + B02 (string, optional) - 最近登入時間 + B03 (string, optional) - 會員等級-每月匯款次數 + B04 (string, optional) - 會員等級-比數 + B05 (string, optional) - 會員等級-平均金額 + B06 (string, optional) - 手續費率敏感度[低] + B07 (string, optional) - 是否安裝其他APP + B08 (string, optional) - 移動軌跡_是否有固定移動軌跡 + B09 (string, optional) - 物以類聚指標 聯絡人1 + B10 (string, optional) - 物以類聚指標 聯絡人2 + B11 (string, optional) - 物以類聚指標 聯絡人3 + B12 (string, optional) - 連續匯款月份數 + C01 (string, optional) - 東聯負面表列黑名單 + C02 (string, optional) - 勞動部通報失聯 + C03 (string, optional) - 移動軌跡是否偏離正常軌跡(日常桃園足跡出現在南部) + D01 (string, optional) - 電信商 + D02 (string, optional) - 是否同門號登入多帳號 + D03 (string, optional) - 手機型號(iOS\Anfroiod) + D04 (string, optional) - 常用網路形式(Wifi\4G) + D05 (string, optional) - 聯絡人重疊度1 + D06 (string, optional) - 聯絡人重疊度2 + D07 (string, optional) - 聯絡人重疊度3 + E01 (string, optional) - 是否有購物紀錄 + E02 (string, optional) - 購物金額 + E03 (string, optional) - 購物頻次 + IME (string, required) - IME1/IME2 + coName (string, required) - 公司名稱(居留證上公司資料) + loanAmount (string, required) - 申貸金額 + period (string, required) - 期數 + inertiaDate(string, required) - 移工慣性匯款日 (yyyyMMdd) + deviceModel(string, required) - 移工手機機型 (品牌,機型) + Request (application/json) { "UUID":"11111", "A02":"dddd", "A03":"", "A04":"", "A05":"", "A06":"", "A07":"", "A08":"", "A09":"", "IME":"123456789", "CONAME":"中租迪和" } + Response 200 (application/json) - 用SerNo來取得其對應的上傳相關檔案 + Body { "result": { "returnCode":"0", "returnMsg":"", "data":[{"SERNO":"123"}] } } ### 修改一筆或多筆申貸記錄 [PUT /loanRecord] + Attributes + uuid(string, required) - 用戶去識別唯一碼 + arcNo(string,optional) - Arc No + mobile(string,optional) - 行動電話 + status(string,required) - 移工狀態 NONE : 正常, LOST : 失聯, INF: 查無資料, FS : 查獲收容, CLT : 取消失聯通報, BE : 回原雇主,撤銷協尋, CFS : 取消查獲收容 + arcDate(string,optional) - ARC有效期限(yyyyMMDD HH:mm) + Request (application/json) [ {"uuid":"11111","status":"1","arcno":"dddd","mobile":"0911222333", "arc_date":"2022-03-03 12:00"}, {"uuid":"11111","status":"1","arcno":"dddd","mobile":"0911222333", "arc_date":"2022-03-03 12:00"} ] + Response 200 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"案件編號已刪除" } } ### 刪除一筆案件[DELETE /loanRecord/{SERNO}] + Parameters + SERNO(string, required) - 案件編號 + Response 200 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"案件編號已刪除" } } ## 檔案上傳 [/fileUplad] ### 檔案上傳 [POST] + Attributes + serNo(string, required) - 申貸送件流水編號 + file(string, required) - 檔案 + fileName:合約書.pdf (string, required) - 檔案原始名稱 + fileType: (enum,required) - 檔案類型 + 0 - 其它未分類 + 1 - 居留證正面照 + 2 - 居留證反面 + 3 - 存摺封面照 + 4 - 手持存摺照 + 5 - IMEI照片 + 6 - 護照(保留) + 7 - 手機買賣契約及分期付款買賣契 + 8 - 仲信資融股份有限公司服務使用 + 9 - 東聯互動(股)服務使用合約書 + Request (multipart/form-data; boundary={boundary value}) + Response 200 (application/json) + Body { "result": { "returnCode":"0", "returnMsg":"已刪除", "data":{"serNo":"11111","fileNo":["123456789","45789666"]} } } ### 取得上傳檔案 [GET /fileUplad/{FileNo}] + Parameters + FileNo(string, required) - 檔案編號 + Response 200 ## 案件已傳送通知 [/loadSaved] ### 案件完成/合約完成通知 [Post] + Attributes + SerNo(string, required) - 申貸送件流水編號 + LoanType (string, required) - 1.案件完成通知 2.合約完成通知 + Response 200 + Body { "result": { "returnCode":"0", "returnMsg":"完成" } } ## 取得手機品牌、期數、金額、總價資料 [/phoneLoanList] ### 取得手機品牌、期數、金額、總價資料 [GET] + Response 200 + Body { "result":{ "returncode":"0", "returnmsg":"完成", "data":[ { "mobile_brand":"asus", "mobile_model":"rog phone 3", "mobile_loan_amt":"20000", "use_ym":"202204", "mobile_min_loan_amt":"20000", "sort":"4" }, { "mobile_brand":"asus", "mobile_model":"rog phone 5", "mobile_loan_amt":"20000", "use_ym":"202204", "mobile_min_loan_amt":"20000", "sort":"5" }, { "mobile_brand":"asus", "mobile_model":"rog phone 5 ultimate", "mobile_loan_amt":"20000", "use_ym":"202204", "mobile_min_loan_amt":"20000", "sort":"2" } ] } }