Get Stored Value Card Transaction Record
Description
取得儲值卡交易紀錄。
Resource
GET /v1/card/transaction_record
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| vip_id | string | 會員編號 |
| card_no | string | 儲值卡號 |
| start_date | string | 交易起日 EXAMPLE "2024-03-11" |
| end_date | string | 交易迄日 EXAMPLE "2024-06-11" |
| transaction_type | string | 交易類型 ALLOWED VALUES:
|
Request Example
GET /v1/card/transaction_record?vip_id=VIP009&card_no=NMMW1567875687&start_date=2024-03-11&end_date=2024-06-11&transaction_type=ALL
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| transaction_record | Transaction Record[] | 儲值卡交易紀錄 |
Response Body Parameters - Transaction Record
| Name | Type | Description |
|---|---|---|
| year | string | 交易年份,格式: YYYY |
| month | string | 交易月份,格式: MM |
| detail | Detail[] | 詳細資料 |
Response Body Parameters - Detail
| Name | Type | Description |
|---|---|---|
| date | string | 交易日期,格式: YYYY-MM-DD HH:MM |
| transaction_type | Transaction Type | 交易類型 |
| order_id | string | 訂單編號 |
| relate_card | string | 相關卡片資訊 (option,交易類型為儲值金轉入/轉出,才會有此欄位) |
| store | Store | 門市資訊 |
| payment | Payment | 付款方式 |
| amount | integer | 交易金額 |
| gift_point | integer | 贈送點數 |
| can_refund | boolean | 是否可以退款 |
Response Body Parameters - Transaction Type
| Name | Type | Description |
|---|---|---|
| id | string | 交易類型編號 ALLOWED VALUES:
|
| name | string | 交易類型名稱 |
Response Body Parameters - Card
| Name | Type | Description |
|---|---|---|
| card_no | string | 儲值卡號 |
| type | string | 卡片類型 ALLOWED VALUES:
|
Response Body Parameters - Store
| Name | Type | Description |
|---|---|---|
| id | string | 門市編號 |
| name | string | 門市名稱 |
Response Body Parameters - Payment
| Name | Type | Description |
|---|---|---|
| id | string | 付款方式編號 |
| name | string | 付款方式名稱 |
Response
HTTP-Status-Code: 200
{
"transaction_record": [
{
"year": "2024",
"month": "06",
"detail": [
{
"date": "2024-06-03 10:57",
"transaction_type": {
"id": "TOP_UP",
"name": "儲值"
},
"order_id": "A001IC2024060300001",
"store": {
"id": "A001",
"name": "第一間店"
},
"payment": {
"id": "Q024",
"name": "信用卡"
},
"amount": 100,
"gift_point": 10,
"can_refund": true
},
{
"date": "2024-06-01 13:58",
"transaction_type": {
"id": "AMOUNT_DEPOSIT",
"name": "儲值金轉入"
},
"relate_card": "實體卡 NMMW1567875687",
"order_id": "A001IC2024060100001",
"store": {
"id": "A001",
"name": "第一間店"
},
"payment": {
"id": "Q024",
"name": "信用卡"
},
"amount": 100,
"gift_point": 10,
"can_refund": false
},
{
"date": "2024-06-01 13:57",
"transaction_type": {
"id": "AMOUNT_WITHDRAWAL",
"name": "儲值金轉出"
},
"relate_card": "實體卡 NMMW1567875688",
"order_id": "A001IC2024060100001",
"store": {
"id": "A001",
"name": "第一間店"
},
"payment": {
"id": "Q024",
"name": "信用卡"
},
"amount": 100,
"gift_point": 10,
"can_refund": false
}
]
},
{
"year": "2024",
"month": "05",
"detail": [
{
"date": "2024-05-22 10:57",
"transaction_type": {
"id": "TOP_UP_REFUND",
"name": "儲值退款"
},
"order_id": "A001IC2024052200001",
"store": {
"id": "A001",
"name": "第一間店"
},
"payment": {
"id": "Q024",
"name": "信用卡"
},
"amount": 300,
"gift_point": 40,
"can_refund": false
}
]
}
]
}
HTTP-Status-Code: 404
{
"code": "WX0099",
"message": "查無儲值卡交易紀錄"
}