Skip to content

Verify Registration Employee

Description

以公司名稱與員工編號核對員工身分。

核對成功時回傳該員工的基本資料,供前端在註冊表單自動帶入,同時回傳一組短效驗證憑證(verification_token)。呼叫 General Sign-up 時帶入此憑證,後端才會將員工資料寫入會員資料;未帶憑證則視為一般註冊。

憑證為一次性使用:註冊成功後即失效,逾期(expires_in 秒)亦自動失效。

僅在公司啟用「註冊須選擇所屬公司」功能時可用;未啟用的公司一律回傳 404,不揭露此功能是否存在。

Resource

GET /v1/user/registration/employee

/v1/user 與 /v1/member 為相同端點,兩者皆可使用。

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。

Request Parameters

Name Type Description
company_name string 公司名稱,須為 Get Registration Companies 回傳清單中的其中一項
employee_no string 員工編號

Response Success Body Parameters

Name Type Description
employee_no string 員工編號
name string 員工姓名
employee_company_name string 所屬公司名稱
cost_center_id string 成本中心代號
cost_center_name string 成本中心名稱
group_id string 應歸屬的會員群組編號
group_name string 應歸屬的會員群組名稱;群組尚未建立時為空字串
verification_token string 短效驗證憑證,供 General Sign-up 使用
expires_in int 憑證有效秒數

Response Success Example

Status-Code: 200

{
  "employee_no": "A012345",
  "name": "陳〇萍",
  "employee_company_name": "大同公司",
  "cost_center_id": "10A0110100",
  "cost_center_name": "人力資源處 HR",
  "group_id": "V01",
  "group_name": "大同",
  "verification_token": "3f2a7c9e5b184d6081ac4f7e2d9b6a13",
  "expires_in": 600
}

Response Fail Body Parameters

Name Type Description
code string 錯誤代碼
message string 錯誤訊息

Response Fail Example

Status-Code: 404

{
  "code": "UAM0002",
  "message": "查無員工資料"
}

Response Error Code

Status-Code code message
400 UAM0001 缺少必填欄位 {欄位名稱}
404 UAM0002 查無員工資料
400 UAM0003 參數格式錯誤
500 UAM9998 核對成功但憑證發放失敗,請稍後再試