Skip to content

Get Ocard Member Data

Description

取得 Ocard 會員資料。

Resource

GET /v1/user/ocard

Authorization

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

Query Parameters

Name Type Description
shop_id string 門市編號
mobile string 手機號碼

Request Example

GET /v1/user/ocard?shop_id=000030&mobile=0903123123

Response Body Parameters

Name Type Description
member Member[] 票券列表
point_card Point Card[] 點數資訊

Response Body Parameters - Member

Name Type Description
head_image string 會員大頭照 URL
id string 會員編號
name string 會員名稱
mobile string 手機號碼
group_id string 會員群組編號
group_name string 會員群組名稱
carrier string 電子發票手機條碼

Response Body Parameters - Point Card

Name Type Description
point string 可用點數
spend string 已用點數
convert string 轉點比例
available_gift_count string 可用禮物數量
title string 點數卡活動名稱
content string 點數卡活動內容
expire Point Expire[] 點數即將過期資訊

Response Body Parameters - Point Expire

Name Type Description
date string 失效日期
point string 失效點數

Response Example 有資料 - Http Code = 200

{
    "member": {
        "head_image": "https://d3egcl3bvwgcig.cloudfront.net/user/51eed9112f1c1d944d3f4a257b9cc187_m.jpg",
        "id": "-JR04E188",
        "name": "Chien YH",
        "mobile": "0903515908",
        "group_id": "01",
        "group_name": "VIP_LV1 測試",
        "carrier": "/XXX1XXX"
    },
    "point_card": {
        "point": "14518",
        "spend": "1579",
        "convert": "100",
        "available_gift_count": "10",
        "title": "電子集點",
        "content": "電子集點",
        "expire": {
            "date": "2026/12/31",
            "point": 14488
        }
    }
}

Response Example 沒有即將過期的點數(point_card.expire) - Http Code = 200

{
    "member": {
        "head_image": "https://d3egcl3bvwgcig.cloudfront.net/user/51eed9112f1c1d944d3f4a257b9cc187_m.jpg",
        "id": "-JR04E188",
        "name": "Chien YH",
        "mobile": "0903515908",
        "group_id": "01",
        "group_name": "VIP_LV1 測試"
    },
    "point_card": {
        "point": "14518",
        "spend": "1579",
        "convert": "100",
        "available_gift_count": "10",
        "title": "電子集點",
        "content": "電子集點"     
    }
}

Response Example 沒資料 - Http Code = 200

{
    "member": {
        "head_image": null,
        "id": null,
        "name": null,
        "mobile": null,
        "group_id": null,
        "group_name": null
    },
    "point_card": null
}