Get Member Data
Description
取得會員資料。
Resource
GET /v2/user
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| id | String | 會員ID |
| name | String | 姓名 |
| zip | String | 郵遞區號 |
| city | string | 居住城市 (optional) |
| district | string | 居住區域 (optional) |
| address | String | 地址 |
| area_code | string | 市話區碼 (optional) |
| telephone | String | 電話 |
| extension_number | string | 分機號碼 (optional) |
| sex | String | 性別 ALLOWED VALUES:
|
| birthday | String | 生日 |
| String | 信箱 | |
| mobile | String | 手機號碼 |
| group_id | String | 會員群組ID |
| group_name | String | 會員群組名稱 |
| card_no | String | 會員卡卡號 |
| phone_carrier | string | 手機載具 |
| points | int | 會員持有點數 |
| Invitation_code | string | 邀請碼 |
| edm_subscription_enabled | boolean | 是否訂閱EDM (optional) |
| seal_quantity | int | 集章數量 (optional) 會員沒有集章數量資訊時,將不會回傳此參數. |
| points_exchanged_amount | int | 點數兌換金額 |
| is_blacklist | boolean | 是否為黑名單 |
| memo | string | 備註 |
| daily_last_points | integer | 當日剩餘可折抵額度 已扣掉當日已使用的部分,並與會員持有點數取較小值。 未設定每日額度規則時,回與 points 相同的數值 |
| excluded_store_ids | array of string | 此會員不可使用點數折抵的門市編號 無限制時為空陣列 [],不會是 null |
| employee_company_name | string | 員工所屬公司名稱 無資料時為空字串 |
| cost_center_id | string | 成本中心編號 無資料時為空字串 |
| cost_center_name | string | 成本中心名稱 無資料時為空字串 |
| employee_no | string | 員工編號 無資料時為空字串 |
Response
{
"id": "021100543",
"name": "Jane",
"zip": null,
"city": "台北市",
"district": "大安區",
"address": "復興南路二段171巷20號1樓",
"area_code": "02",
"telephone": "27006275",
"extension_number": "#20",
"sex": "Female",
"birthday": "2020-01-01T00:00:00",
"email": "[email protected]",
"mobile": "0987654321",
"points": "100",
"group_id": "APP",
"group_name": "品牌APP會員",
"card_no": "",
"phone_carrier": "",
"Invitation_code": "6vq4tt",
"edm_subscription_enabled": false,
"seal_quantity": 0,
"points_exchanged_amount": 10,
"is_blacklist": false,
"memo": "",
"daily_last_points": 90,
"excluded_store_ids": ["000030", "000031"],
"employee_company_name": "大同公司",
"cost_center_id": "10A0110100",
"cost_center_name": "人力資源處 HR",
"employee_no": "10006566"
}
Notes
daily_last_points與points是兩個不同的問題:points是會員持有的總點數,daily_last_points是「今天還能折抵多少」。有設定每日額度規則時兩者不同值。daily_last_points恆不大於points(可作為前端的檢核依據)。- 折抵畫面應讀
daily_last_points,不是points。 excluded_store_ids與既有的disable_stores是不同層級的限制,兩者都需檢查,任一命中即不可折抵。後端在核銷點數時不檢查交易門市,須由前端自行比對並阻擋。