> For the complete documentation index, see [llms.txt](https://104ha-docs.gitbook.io/104-ha-openapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://104ha-docs.gitbook.io/104-ha-openapi/clients/104-lli-chuan-shu-fu-wu/kuai-su-shang-shou.md).

# 快速上手

104 提供沙盒測試環境，您可先使用沙盒測試環境取得測試資料進行串測，串接無虞後，再開通正式環境

## API 權限申請流程

### Step1：申請 API Key 權限 (ACCESS\_TOKEN)

1. 若您已是 104 eRecruitor 招募管理系統的客戶，請向您的客服人員申請權限，客服人員於 5 個工作天內會寄發檔案，內容含有 client\_id、client\_secret，可供 Step2 使用
2. 若您還不是 104 eRecruitor 招募管理系統的客戶，也尚未使用過任何 104 履歷傳輸的服務，請先聯絡 <ha.ts@104.com.tw>，由專人為您服務

### Step2：申請 API Key 權限 (ACCESS\_TOKEN)

1. 信件附檔解壓縮密碼為公司統編，統編少於8碼請在前面補 0 (例如：00123456)
2. 104 信函中，您會獲取 【ID】 及 【Secret】。
3. 取得 ACCESS\_TOKEN，您需要呼叫 API，request body 有 grant\_type、   scope、client\_id、   client\_secret
   * grant\_type 請輸入 client\_credentials
   * scope 請輸入 ehrweb\_resume
   * client\_id 及 client\_secret 即為 104 信函中的【ID】 及 【Secret】
   * 透過 <https://apis.104api.com.tw/oauth2/token> 取得 access token     \
     (沙盒環境測試請用 <https://apis.104api-dev.com.tw/oauth2/token>)
4. API文件
   * <https://developers.104.com.tw/swagger-ui/?urls.primaryName=0>

※ 請 HR 將上述「2」與「3」資訊，交付貴公司IT人員，以利後續API串接進行。

## 履歷API使用說明

### Step1：在 header 加入您的 ACCESS\_TOKEN 及 104-Additional-Info

ACCESS\_TOKEN 為您在前述流程中所取得的資訊，104-Additional-Info 則需要輸入 guiNum={貴公司統編}

### Step2：取得履歷數量和ID清單

透過 <https://apis.104api.com.tw/ehrweb\\_resume/1.0/resumes/queryList>  下參數取得履歷數量與id清單，此id清單即為取履歷內容API query 與 queryBatch 參數 idno(idnos)的值

\*註：沙盒環境測試請用 <https://apis.104api-dev.com.tw/ehrweb\\_resume/1.0/resumes/queryList>

### Step3：取得履歷內容

透過 <https://apis.104api.com.tw/ehrweb\\_resume/1.0/resumes/query> 或 <https://apis.104api.com.tw/ehrweb\\_resume/1.0/resumes/queryBatch> 下參數取得履歷內容

Step1 所取得的id清單即為本步驟參數 idno(idnos)的值

\*註：沙盒環境測試請用 <https://apis.104api-dev.com.tw/ehrweb\\_resume/1.0/resumes/query> 或 <https://apis.104api-dev.com.tw/ehrweb\\_resume/1.0/resumes/queryBatch>

### Step4：取大頭照

透過 <https://apis.104api.com.tw/ehrweb\\_resume/1.0> /files/headshot 下參數取得大頭照

\*註：沙盒環境測試請用 <https://apis.104api-dev.com.tw/ehrweb\\_resume/1.0> /files/headshot

### Step5：取附件

透過 <https://apis.104api.com.tw/ehrweb\\_resume/1.0> /files/attachment 下參數取得附件

\*註：沙盒環境測試請用 <https://apis.104api-dev.com.tw/ehrweb\\_resume/1.0> /files/attachment

## 實作與串接建議

1. 資料即時性（排程建議）：為維持招募流程順暢，建議貴公司系統設定 「每小時」 自動呼叫一次本 API 。例如：於 10:05 呼叫 API，參數設定 startTime=09 與 endTime=10，以取得前一小時內的所有履歷更新。（僅供參考，依貴公司實際使用方式設置即可）
2. 避免系統頻繁重試 (Rate Limit)：請避免 1 秒發超過 3 次呼叫，會觸發 API 的安全限流機制。請加入『重試機制 (Retry Mechanism)』 或 『延遲 (Delay/Sleep)』，避免呼叫速度過快。
