Ocard Login
Description
Ocard用戶登入。
Resource
POST /v1/user/ocard/login
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| store_id | string | 門市代碼 |
| phone_number | string | 用戶註冊號碼 |
Response
{
"user": {
"cell": "+886903515908",
"name": "Chien YH",
"birth": "1911-01-01",
"sex": "1",
"head_image": null,
"token": "qBdgWl",
"id": "-JR04E188",
"image_card": "https://d3egcl3bvwgcig.cloudfront.net/brand/20fe4ddbd6072f576f1195ebcef768fb_m.jpg",
"accept_brand_time": "2025-12-15 14:27:43",
"vip_check": "1",
"brand_check": "1",
"accept_vip_time": "2025-12-15 14:27:43",
"vip_name": "VIP_LV1 測試",
"visited_count": "7"
},
"vip": {
"id": "9Vkg4N",
"level": "1",
"name": "VIP_LV1 測試",
"goods": "1234",
"condition": "1234",
"pos_code": "01",
"vip_check": "1",
"brand_check": "1"
},
"point_card": {
"point": "16088",
"spend": "1320",
"convert": "100",
"available_gift_count": "9",
"title": "電子集點",
"content": "電子集點",
"decimal_point": "0",
"is_one_point": "1",
"expire": {
"date": "2026/12/31",
"point": 16088
}
},
"point_gift": [{
"available_store": ",9920,",
"title": "test",
"content": "test",
"redeem_type": "2",
"obossRedeem": "1",
"require_point": "2",
"image": "https://d3egcl3bvwgcig.cloudfront.net/point/dac0c71f3ad2e7f928dfc3ac77278e35_m.jpg",
"pos_code": "discount_03",
"show": "1",
"order_enable": "0",
"pg_tag": null,
"available_channel": "0",
"offer": null,
"offer_value": null,
"offer_limit": null,
"token": "52YJgp",
"id": "2PR65XJ6E",
"redeem": 1,
"repeat_limit": 0
}
],
"point_pros": [],
"coupon_list": [{
"serial": "c1ba9948-f911-4b90-b567-b7edaab118bc",
"start_time": "2025-12-16 16:27:46",
"end_time": "2035-12-14 23:59:59",
"create_time": "2025-12-16 16:27:46",
"used_time": null,
"expired": "0",
"used": "0",
"title": "滿量促銷 (紅茶鮮奶第二杯 6 折)",
"content": "滿量促銷 (紅茶鮮奶第二杯 6 折)",
"comment": "滿量促銷 (紅茶鮮奶第二杯 6 折)",
"image": "https://d3egcl3bvwgcig.cloudfront.net/coupon/9c5b8ef3b34997d65a71f01b57980fad.png",
"pos_code": "0PM202512160002",
"offer": null,
"offer_value": null,
"cond_value": null,
"cond": null,
"require_spend": null,
"properties": "{\"repeat_limit\": 0, \"exclude_cond_item\": null, \"oboss_redeem_enable\": 1}",
"cost": 0,
"multi_enable": false,
"barcode": {
"type": "Code128",
"code": "1NWLGQK3G"
},
"redeemable": true,
"id": "1NWLGQK3G"
}
]
}
Response Body Parameters
Root
| Name | Type | Description |
|---|---|---|
| user | User | 使用者基本資料 |
| vip | VIP | VIP 會員等級資訊 |
| point_card | PointCard | 集點卡資訊 |
| point_gift | PointGift | 可兌換的禮物列表 (集點贈品) |
| point_pros | PointPros | 點數相關屬性或活動 (目前為空) |
| coupon_list | CouponList | 優惠券列表 |
User
| Name | Type | Description |
|---|---|---|
| cell | string | 使用者手機號碼 (包含國碼) |
| name | string | 使用者姓名 |
| birth | string | 生日 (YYYY-MM-DD) |
| sex | string | 性別 (1: 男, 2: 女, 0: 未知) |
| head_image | string | 大頭貼 URL (可為 null) |
| token | string | 使用者 Token (Ocard 內部使用) |
| id | string | 使用者 ID |
| image_card | string | 會員卡圖片 URL |
| accept_brand_time | string | 加入品牌會員時間 |
| vip_check | string | VIP 驗證狀態 (1: 已驗證) |
| brand_check | string | 品牌驗證狀態 (1: 已驗證) |
| accept_vip_time | string | 成為 VIP 時間 |
| vip_name | string | VIP 等級名稱 |
| visited_count | string | 造訪次數 |
VIP
| Name | Type | Description |
|---|---|---|
| id | string | VIP 等級 ID |
| level | string | VIP 等級代碼 |
| name | string | VIP 等級名稱 |
| goods | string | VIP 相關商品代碼或識別碼 |
| condition | string | VIP 升級或維持條件描述 |
| pos_code | string | 用於 POS 系統的 VIP 代碼 |
| vip_check | string | VIP 狀態檢查 |
| brand_check | string | 品牌狀態檢查 |
Point PointCard
| Name | Type | Description |
|---|---|---|
| point | string | 目前持有總點數 |
| spend | string | 累積消費金額 |
| convert | string | 點數兌換比例或基準 |
| available_gift_count | string | 可兌換的禮物數量 |
| title | string | 集點卡標題 |
| content | string | 集點卡說明內容 |
| decimal_point | string | 小數點顯示位數 |
| is_one_point | string | 是否為一點一點累積 (1: 是) |
| expire | Expire | 到期資訊 |
Expire
| Name | Type | Description |
|---|---|---|
| date | string | 點數到期日 (YYYY/MM/DD) |
| point | int | 即將到期的點數數量 |
Point Gift
| Name | Type | Description |
|---|---|---|
| id | string | 禮物 ID |
| title | string | 禮物標題 |
| content | string | 禮物說明 |
| require_point | string | 兌換所需點數 |
| image | string | 禮物圖片 URL |
| available_store | string | 可兌換的門市 ID 列表 (逗號分隔) |
| redeem_type | string | 兌換類型代碼 |
| obossRedeem | string | Oboss 兌換啟用狀態 |
| pos_code | string | POS 系統對應代碼 |
| show | string | 是否顯示 (1: 顯示) |
| order_enable | string | 是否可於訂單中使用 (0: 否) |
| token | string | 禮物 Token |
| redeem | int | 兌換狀態 |
| repeat_limit | int | 重複兌換限制 |
Coupon List
| Name | Type | Description |
|---|---|---|
| id | string | 優惠券 ID |
| serial | string | 優惠券序號 (UUID) |
| title | string | 優惠券標題 |
| content | string | 優惠券內容 |
| comment | string | 備註說明 |
| image | string | 優惠券圖片 URL |
| start_time | string | 有效開始時間 |
| end_time | string | 有效結束時間 |
| create_time | string | 建立時間 |
| expired | string | 是否過期 (0: 未過期) |
| used | string | 是否已使用 (0: 未使用) |
| pos_code | string | POS 系統對應優惠碼 |
| properties | string | JSON 字串格式的額外屬性 (如重複限制、排除條件等) |
| barcode | object | 條碼資訊 (type: 條碼類型, code: 條碼內容) |
| redeemable | boolean | 是否可兌換 |