---
title: 'Fcms Api Gateway v2.0.1'
---
Fcms Api Gateway
===
| Version | Date | Notes |
| :------ |:---------------:|:----- |
| v2.0.1 | 2021-07-22 | Verify API specifications |
IBM Apic Url : https://dspapi-test.fetnet.net/dsp/fcms/v1
## Table of Contents
[TOC]
## 1. 建立消費回饋交易
> Endpoint : Post /txnrecords/members/{fetUnifyId}/expense
*Request:*
<span style="color:blue">* fetUnifyId=10784773020745</span>
```json=
{
"actualPayment": 1000,
"campaignId": "FAA0005-CMPN-20210713220517537",
"channelId": "FAA0005",
"fcoin": 58,
"paymentMethod": "DCB",
"subChannelDetail": {
"employeeNo": "25008",
"ivrCode": "185001"
},
"subChannelMain": {
"src": "ARCOA",
"ver": "1.0"
},
"txnDateTime": "2021/07/26 00:00:00",
"txnSerialNo": "T202107231630001029",
"txnSummary": "消費折抵"
}
```
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"actualPayment": 1000,
"campaignId": "FAA0005-CMPN-20210713220517537",
"channelId": "FAA0005",
"createdDate": "2021/07/25 15:01:18",
"txnDateTime": "2021/07/26 00:00:00",
"fcmsTxnId": "FS20210725150118-0000239",
"fetUnifyId": "10784773020745"
}
}
```
## 2. 建立任務回饋交易
> Endpoint : Post /txnrecords/members/{fetUnifyId}/mission
*Request:*
<span style="color:blue">* fetUnifyId=10784773020745</span>
```json=
{
"campaignId": "FAA1154-CMPN-20200915154506878",
"channelId": "FAA1154",
"fcoin": 1000,
"subChannelDetail": {
"employeeNo": "25008",
"ivrCode": "185001"
},
"subChannelMain": {
"src": "TM",
"ver": "1.0"
},
"txnDateTime": "2021/07/24 00:00:00",
"txnSerialNo": "9f44f930-364c-4d2e-b9ae-fbd6c811f56a",
"txnSummary": "遠傳心生活_APP天天簽到"
}
```
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"campaignId": "FAA1154-CMPN-20200915154506878",
"channelId": "FAA1154",
"createdDate": "2021/07/23 16:52:36",
"txnDateTime": "2021/07/24 00:00:00",
"fcmsTxnId": "FS20210723165236-0000162",
"fetUnifyId": "10784773020745"
}
}
```
## 3. 取消交易
> Endpoint : PATCH /txnrecords/members/{fcmsTxnId}/cancel
> Endpoint : POST /txnrecords/members/{fcmsTxnId}/cancel
*Request:*
<span style="color:blue">* fcmsTxnId=FS20210725150118-0000239</span>
```json=
{
"txnSerialNo": "T202107231630001029",
"txnSummary": "取消交易,TX2021072508326"
}
```
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"fcmsTxnId": "FS20210725150238-0000240-C",
"txnDateTime": "2021/07/25 15:02:38",
"expRedeemCalTime": "2021/07/25 15:02:38",
"cancelRedeemAmount": 58,
"expRedeemAmount": 0,
"detailList": [
{
"type": "SMALLF",
"issueSource": "FAA1154-ACCTCP30D-20200915154506765",
"issueDate": "2021/07/23 16:51:26",
"pendingDays": 0,
"effectiveDate": "2021/07/23 16:51:26",
"duration": "30D",
"expirationDate": "2021/08/22 23:59:59",
"amount": 56
},
{
"type": "SMALLF",
"issueSource": "FAA1154-ACCTCP30D-20200915154506765",
"issueDate": "2021/07/24 00:00:00",
"pendingDays": 0,
"effectiveDate": "2021/07/24 00:00:00",
"duration": "30D",
"expirationDate": "2021/08/23 23:59:59",
"amount": 2
}
]
}
}
```
## 4. 客訴交易
> Endpoint : POST /txnrecords/members/{fcmsTxnId}/refund
*Request:*
<span style="color:blue">* fcmsTxnId=FS20210725124248-0000193</span>
```json=
{
"txnSummary": "客訴交易,TX1234567890"
}
```
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"campaignId": "FAA0005-CMPN-20210713220517537",
"channelId": "FAA0005",
"createdDate": "2021/07/25 12:44:58",
"txnDateTime": "2021/07/25 12:44:58",
"fcmsTxnId": "FS20210725124458-0000194-R",
"fetUnifyId": "10784773020745"
}
}
```
## 5. 查詢交易明細
> Endpoint : GET /txnrecords/members/{fetUnifyId}/txnrecords?channelId={channelId}
*Request:*
<span style="color:blue">* fetUnifyId=731584</span>
channelId=FAA0005
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"allCount": 9,
"mainCount": 3,
"subCount": 6,
"txnrecordList": [
{
"fcmsTxnId": "FS20210725214049-0000250",
"fetUnifyId": "731584",
"channelId": "FAA0005",
"channelDisplayName": null,
"displayName": "消費交易記錄",
"campaignId": "FAA0005-CMPN-20210713220517537",
"campaignName": "消費型即時入帳測試活動",
"createdDate": "2021/07/25 21:40:49",
"txnDateTime": "2021/07/30 00:00:00",
"txnSummary": "消費折抵消費交易記錄",
"actualAmount": 200,
"burn": 17,
"earn": 0,
"entryType": "EXPENSE",
"entryTypeName": "消費回饋",
"entryStatus": "CXL_REVERSED",
"entryStatusName": "已取消",
"txnSerialNo": "TX20210725214000",
"detaiList": [
{
"fcmsTxnId": "FS20210725214049-0000250-1",
"txnSummary": "消費折抵",
"entryType": "REDEEMED",
"entryTypeName": "兌點",
"entryStatus": "CXL_REVERSED",
"entryStatusName": "已取消",
"burn": 17,
"earn": 0,
"balanceAmount": 205,
"pendingAmount": 0,
"displayName": "兌點使用",
"effectiveDate": "2021/07/25 21:37:29",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:37:29",
"txnDateTime": "2021/07/30 00:00:00",
"isCalculationMembership": null
},
{
"fcmsTxnId": "FS20210725214146-0000251-C1",
"txnSummary": "取消交易",
"entryType": "REDEEMED",
"entryTypeName": "兌點-取消",
"entryStatus": "CXL_SUCCEEDED",
"entryStatusName": "取消",
"burn": 17,
"earn": 0,
"balanceAmount": 222,
"pendingAmount": 0,
"displayName": "兌點使用",
"effectiveDate": "2021/07/25 21:37:29",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:37:29",
"txnDateTime": "2021/07/25 21:41:46",
"isCalculationMembership": null
}
]
},
{
"fcmsTxnId": "FS20210725213802-0000246",
"fetUnifyId": "731584",
"channelId": "FAA0005",
"channelDisplayName": null,
"displayName": "消費交易記錄",
"campaignId": "FAA0005-CMPN-20210713220517537",
"campaignName": "消費型即時入帳測試活動",
"createdDate": "2021/07/25 21:38:02",
"txnDateTime": "2021/07/25 21:38:02",
"txnSummary": "消費折抵消費交易記錄",
"actualAmount": 8000,
"burn": 20,
"earn": 100,
"entryType": "EXPENSE",
"entryTypeName": "消費回饋",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"txnSerialNo": "TX20210725213915",
"detaiList": [
{
"fcmsTxnId": "FS20210725213802-0000246-1",
"txnSummary": "消費折抵",
"entryType": "REDEEMED",
"entryTypeName": "兌點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 20,
"earn": 0,
"balanceAmount": 122,
"pendingAmount": 0,
"displayName": "兌點使用",
"effectiveDate": "2021/07/25 21:37:29",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:37:29",
"txnDateTime": "2021/07/25 21:38:02",
"isCalculationMembership": null
},
{
"fcmsTxnId": "FS20210725213802-0000246-3",
"txnSummary": "消費折抵",
"entryType": "REWARDING",
"entryTypeName": "累點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 0,
"earn": 100,
"balanceAmount": 222,
"pendingAmount": 0,
"displayName": "活動回饋方案1",
"effectiveDate": "2021/07/25 21:38:02",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:38:02",
"txnDateTime": "2021/07/25 21:38:02",
"isCalculationMembership": false
}
]
},
{
"fcmsTxnId": "FS20210725213729-0000245",
"fetUnifyId": "731584",
"channelId": "FAA0005",
"channelDisplayName": null,
"displayName": "消費交易記錄",
"campaignId": "FAA0005-CMPN-20210713220517537",
"campaignName": "消費型即時入帳測試活動",
"createdDate": "2021/07/25 21:37:29",
"txnDateTime": "2021/07/25 21:37:29",
"txnSummary": "消費折抵消費交易記錄",
"actualAmount": 1000,
"burn": 58,
"earn": 100,
"entryType": "EXPENSE",
"entryTypeName": "消費回饋",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"txnSerialNo": "TX20210725213715",
"detaiList": [
{
"fcmsTxnId": "FS20210725213729-0000245-1",
"txnSummary": "消費折抵",
"entryType": "REDEEMED",
"entryTypeName": "兌點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 58,
"earn": 0,
"balanceAmount": 42,
"pendingAmount": 0,
"displayName": "兌點使用",
"effectiveDate": "2021/07/25 21:36:36",
"expirationDate": "2021/08/24 23:59:59",
"issueDate": "2021/07/25 21:36:36",
"txnDateTime": "2021/07/25 21:37:29",
"isCalculationMembership": null
},
{
"fcmsTxnId": "FS20210725213729-0000245-3",
"txnSummary": "消費折抵",
"entryType": "REWARDING",
"entryTypeName": "累點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 0,
"earn": 100,
"balanceAmount": 142,
"pendingAmount": 0,
"displayName": "活動回饋方案1",
"effectiveDate": "2021/07/25 21:37:29",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:37:29",
"txnDateTime": "2021/07/25 21:37:29",
"isCalculationMembership": false
}
]
}
]
}
}
```
## 6. 查詢會員等級
> Endpoint : GET /members/{fetUnifyId}
*Request:*
<span style="color:blue">* fetUnifyId=10784773020745</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"rewardingBigF": 0,
"vipGrade": null,
"lastStar": 1,
"star": 1,
"tenure": null,
"rangeStartDateTime": "2021/02/01 00:00:00",
"rangeEndDateTime": "2021/07/31 23:59:59",
"ratingDateTime": "2021/03/10 18:52:29",
"effectiveDateTime": "2020/10/05 16:51:45",
"expiredDateTime": "2021/10/14 23:59:59",
"nextStarNeedFCoin": 100,
"nextStarLackFCoin": 100,
"loginSource": "SUPERAPP",
"loginDateTime": "2020/06/30 14:22:59"
}
}
```
## 7. 查詢錢包餘額
> Endpoint : GET /fcoin/members/{fetUnifyId}/balance
*Request:*
<span style="color:blue">* fetUnifyId=10784773020745</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"totalAvailable": 2062,
"totalPending": 21,
"thisMonthExpireFCoin": 0,
"thisYearExpireFCoin": 2057,
"thirtyDaysExpireFCoin": 2057
}
}
```
## 8. 查詢活動資訊
> Endpoint : GET /campaigns/{campaignId}
*Request:*
<span style="color:blue">* campaignId=FAA0005-CMPN-20210713220517537</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"channelId": "FAA0005",
"channelDisplayName": null,
"campaignId": "FAA0005-CMPN-20210713220517537",
"campaignName": "消費型即時入帳測試活動",
"campaignState": "ENABLED",
"campaignStateName": "已啟用",
"startDateTime": "UNLIMITED",
"endDateTime": "UNLIMITED",
"paymentMethods": "UNLIMITED",
"paymentMethodsName": "無限制",
"hasBasicCoinback": true,
"statements": [
{
"index": null,
"statementId": "FAA0005-CMPN-20210713220517537-1",
"statementName": "滿千送百",
"templateId": "TMPL2101",
"outputStmt": "消費回饋方案,每筆消費記錄金額滿 $1,000.00 贈送遠傳幣 100,現金部份支付方式為 不限支付方式,綁定預算帳戶 預算@FAA0005-ACCTCP1D-20210713220236616。活動起始日期 不限期,結束日期 不限期。"
}
]
}
}
```
## 9. 查詢錢包餘額明細
> Endpoint : GET /fcoin/members/{fetUnifyId}/balance/detail
*Request:*
<span style="color:blue">* fetUnifyId=10784773020745</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": [
{
"type": "SMALLF",
"issueSource": "FAA1154-ACCTCP30D-20200915154506765",
"issueDate": "2021/07/23 16:51:26",
"pendingDays": 0,
"effectiveDate": "2021/07/23 16:51:26",
"duration": "30D",
"expirationDate": "2021/08/22 23:59:59",
"amount": 56
},
{
"type": "SMALLF",
"issueSource": "FAA1154-ACCTCP30D-20200915154506765",
"issueDate": "2021/07/24 00:00:00",
"pendingDays": 0,
"effectiveDate": "2021/07/24 00:00:00",
"duration": "30D",
"expirationDate": "2021/08/23 23:59:59",
"amount": 2000
},
{
"type": "SMALLF",
"issueSource": "FAA1204-ACCTCP30D-20210325142838729",
"issueDate": "2021/07/25 12:53:36",
"pendingDays": 0,
"effectiveDate": "2021/07/25 12:53:36",
"duration": "30D",
"expirationDate": "2021/08/24 23:59:59",
"amount": 1
},
{
"type": "BIGF",
"issueSource": "FET0000-ACCTLC3Y-SYSTEM@SSO",
"issueDate": "2021/01/26 11:00:11",
"pendingDays": 0,
"effectiveDate": "2021/01/26 11:00:11",
"duration": "3Y",
"expirationDate": "2024/01/26 23:59:59",
"amount": 5
}
]
}
```
## 10. 查詢指定交易明細
> Endpoint : GET /txnrecords/{fcmsTxnId}
*Request:*
<span style="color:blue">* fcmsTxnId=FS20210725143318-0000234</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"fcmsTxnId": "FS20210725143318-0000234",
"fetUnifyId": "760270",
"channelId": "FAA1154",
"channelDisplayName": "遠傳心生活",
"displayName": "任務交易記錄",
"campaignId": "FAA1154-CMPN-20200915154506878",
"campaignName": "遠傳心生活_APP天天簽到",
"createdDate": "2021/07/25 14:33:18",
"txnDateTime": "2021/07/25 14:33:18",
"txnSummary": "遠傳心生活_APP天天簽到任務交易記錄",
"actualAmount": null,
"burn": 0,
"earn": 10,
"entryType": "MISSION",
"entryTypeName": "任務回饋",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"txnSerialNo": "9f44f930-364c-4d2e-b9ae-fbd6c811f56a",
"detaiList": [
{
"fcmsTxnId": "FS20210725143318-0000234-2",
"txnSummary": "遠傳心生活_APP天天簽到",
"entryType": "REWARDING",
"entryTypeName": "累點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 0,
"earn": 10,
"balanceAmount": 20,
"pendingAmount": 0,
"displayName": "活動回饋",
"effectiveDate": "2021/07/25 14:33:18",
"expirationDate": "2021/08/24 23:59:59",
"issueDate": "2021/07/25 14:33:18",
"txnDateTime": "2021/07/25 14:33:18",
"isCalculationMembership": false
}
]
}
}
```
## 11. 由通路和SerialNo查詢指定交易明細
> Endpoint : GET /txnrecords/channel/{channelId}?serialNo={serialNo}&fetUnifyId={fetUnifyId}&date={date}
*Request:*
<span style="color:blue">* channelId=FAA0005</span>
fetUnifyId=10784773020745
<span style="color:blue">* serialNo=TX20210725211415</span>
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": {
"allCount": 4,
"mainCount": 1,
"subCount": 3,
"txnrecordList": [
{
"fcmsTxnId": "FS20210725211535-0000243",
"fetUnifyId": "10784773020745",
"channelId": "FAA0005",
"channelDisplayName": null,
"displayName": "消費交易記錄",
"campaignId": "FAA0005-CMPN-20210713220517537",
"campaignName": "消費型即時入帳測試活動",
"createdDate": "2021/07/25 21:15:35",
"txnDateTime": "2021/07/25 21:15:35",
"txnSummary": "消費折抵消費交易記錄",
"actualAmount": 1000,
"burn": 58,
"earn": 103,
"entryType": "EXPENSE",
"entryTypeName": "消費回饋",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"txnSerialNo": "TX20210725211415",
"detaiList": [
{
"fcmsTxnId": "FS20210725211535-0000243-1",
"txnSummary": "消費折抵",
"entryType": "REDEEMED",
"entryTypeName": "兌點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 58,
"earn": 0,
"balanceAmount": 2004,
"pendingAmount": 21,
"displayName": "兌點使用",
"effectiveDate": "2021/07/23 16:51:26",
"expirationDate": "2021/08/22 23:59:59",
"issueDate": "2021/07/23 16:51:26",
"txnDateTime": "2021/07/25 21:15:35",
"isCalculationMembership": null
},
{
"fcmsTxnId": "FS20210725211535-0000243-4",
"txnSummary": "消費折抵",
"entryType": "REWARDING",
"entryTypeName": "累點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 0,
"earn": 100,
"balanceAmount": 2104,
"pendingAmount": 21,
"displayName": "活動回饋方案1",
"effectiveDate": "2021/07/25 21:15:35",
"expirationDate": "2021/07/26 23:59:59",
"issueDate": "2021/07/25 21:15:35",
"txnDateTime": "2021/07/25 21:15:35",
"isCalculationMembership": false
},
{
"fcmsTxnId": "FS20210725211535-0000243-5",
"txnSummary": "消費折抵",
"entryType": "REWARDING",
"entryTypeName": "累點",
"entryStatus": "SUCCEEDED",
"entryStatusName": "交易成功",
"burn": 0,
"earn": 3,
"balanceAmount": 2104,
"pendingAmount": 24,
"displayName": "基本回饋",
"effectiveDate": "2021/08/24 00:00:00",
"expirationDate": "2022/08/23 23:59:59",
"issueDate": "2021/07/25 21:15:35",
"txnDateTime": "2021/07/25 21:15:35",
"isCalculationMembership": true
}
]
}
]
}
}
```
## 12. 查詢進行中活動資訊???
> Endpoint : GET /campaigns/query/running
:::info
亂來不知在幹麻!
:::
## 13. 查詢交易明細–簡易
> Endpoint : GET /txnrecords/members/{fetUnifyId}/txnrecords/simple?channelId={channelId}
*Request:*
<span style="color:blue">* fetUnifyId=760270</span>
channelId=FAA1154
*Response:*
```json=
{
"responseCode": "200",
"responseDesc": "執行成功",
"responseBody": [
{
"title": "遠傳心生活-活動回饋",
"txnDateTime": "2021/07/25 14:33:18",
"status": "已入帳",
"amount": 10,
"expirationDate": "2021/08/24 23:59:59"
},
{
"title": "遠傳心生活-活動回饋",
"txnDateTime": "2021/07/25 14:30:15",
"status": "已入帳",
"amount": 10,
"expirationDate": "2021/08/24 23:59:59"
}
]
}
```