General Sign-up
Description
註冊一般用戶。依據站台設定 siteinfo.member_source 自動分流:
- 傳統星益欣門市:執行本地資料庫註冊與開卡流程。
- member_source = 5 (Wixtar 會員):自動將傳入參數轉乘適配為星益欣會員中心註冊規格 (POST /v1/public/members/register) 完成線上註冊,維持回傳 HTTP 204 No Content。若會員已存在則回傳友善提示訊息。
Resource
POST /v1/user
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| type | string (enum) |
帳號類型 ALLOWED VALUES:
|
| id | string | 帳號 |
| password | string | 密碼 (optional) |
| name | string | 名稱 (optional) |
| string | 電子信箱 (optional) |
|
| birthday | string | 生日 (optional) |
| sex | string | 性別 ALLOWED VALUES:
(optional) |
| Invitation_code | string | 邀請碼 (optional) |
| address | string | 地址 (optional) |
| line_id | string | LINE UID (optional) |
| store_id | string | 門市代碼 (optional) |
| vip_group_id | string | 會員群組編號 (optional) |
| external_data | External Data | 外部資訊 (optional) |
| citizen_digital_certificate | string | 自然人憑證 (optional) |
| default_carrier_type | string | 預設載具類別 ALLOWED VALUES:
(optional) |
| memo | string | 備註(optional) |
| verification_token | string | 員工身分驗證憑證 (optional) 由 Verify Registration Employee 取得;帶入時會將核對到的員工資料一併寫入會員資料,註冊成功後憑證即失效 |
| city | string | 居住城市 (optional) |
| district | string | 居住區域 (optional) |
Request Body Parameters - External Data
| Name | Type | Description |
|---|---|---|
| vip_id | string | 會員編號 (optional) |
| uuid | string | UUID (optional) |
| card_no | string | 卡號 (optional) |
Response
Status-Code: 204 No Content
Response Fail Body Parameters
| Name | Type | Description |
|---|---|---|
| code | string | 錯誤代碼 |
| message | string | 錯誤訊息 |
Response Fail Example
Status-Code: 400
{
"code": "UAN0024",
"message": "驗證憑證無效或已過期,請重新核對員工身分"
}
Response Error Code
| Status-Code | code | message |
|---|---|---|
| 400 | UAN0024 | 驗證憑證無效或已過期,請重新核對員工身分 |
Notes
帶 verification_token 時,姓名、公司名稱、成本中心編號/名稱、會員群組、卡號一律取自員工身分核對的結果,request 帶了同名欄位(含 name)也不會被採用——這些欄位決定每日可用額度與費用歸屬,不由用戶端決定。員工資料中姓名為空白時例外,此時採用 request 的 name。