POS紅利歷史查詢 /PosBonus/Query

Request 請求內容

根節點
參數 名稱 型態 必要性 說明
CCODE 客戶代號 S(16) M
Date_S 查詢起始日期 S(10) M 可輸入民國年或是西元年 EX: 109.01.01 EX2: 2020/01/01
Date_E 查詢結束日期 S(10) M 可輸入民國年或是西元年 EX: 109.01.01 EX2: 2020/01/01

回傳訊息

根節點
參數 名稱 型態 說明
Status 執行結果 S(1) S: 成功 E: 失敗
CCODE 客戶代號 S(16)
CNAM2 客戶簡稱 S(12)
Date_S 查詢起始日期 S(10) 查詢區間不可大於一個月
Date_E 查詢結束日期 S(10) 查詢區間不可大於一個月
PosBonusPoint 目前總累計紅利點數 Int
BonusHistory 查詢範圍內的紅利歷史記錄 陣列
ErrorCode 錯誤代碼 S(4) 0000: 成功
ErrorMessage 錯誤訊息 S(100)
紅利歷史記錄
參數 名稱 型態 說明
DBName 資料來源資料庫 S(255) 此筆記錄的來源資料庫,與廠商代號相同時此欄位空白
BDate 記錄日期 S(10) 民國年型態的日期 EX: 109.01.01
BName 紅利名稱 S(100)
BType 紅利類型代號 Int 0: 獲得紅利
1: 使用紅利
2: POS退貨收回獲得紅利
3: POS退貨返還使用紅利
BType 紅利類型名稱 S(10)
Point 點數 Int 正數代表增加紅利,負數代表減少紅利
SourceType 來源型態 S(10) POS: TMS獲利王PC版POS結帳。
WebAPI:透過本API寫入的資料。
SourceCode 來源單號 S(40) 於此筆記錄相關的單號,來源為POS時為結帳單號貨退貨單號,來源為WebAPI時為客戶當時送入的資料
Remark 備註 S(100)
Request範例
            
                //請求Header內容
                api-pno:TMSDEMOWEB
                api-timestamp:1509371605
                api-ClientSign:B29087C957C3EDD24F8F83E62CD06EE6D2203A35E16696E53850D908AFFDA8272BDE7BC48864A5A218767A522554967E2B036B529DFFA7B980A049FD456551C2

                //請求Body內容
                {
                "CCODE" : "0001",
                "Date_S" : "2020/09/01",
                "Date_E" : "2020/09/05"
                }

            
        

Response 回覆結果

Response範例
            
                成功
                {
                "Status": "S",
                "CCODE": "0001",
                "CNAM2": "POS門市",
                "Date_S": "2020/09/01",
                "Date_E": "2020/09/30",
                "PosBonusPoint":1819011,
                "BonusHistory":[
                {
                "BDate":"109.09.04",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":40,
                "SourceType":"POS",
                "SourceCode":"10909040002",
                "Remark":""
                },
                {
                "BDate":"109.09.04",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":65,
                "SourceType":"POS",
                "SourceCode":"10909040009",
                "Remark":""
                },
                {
                "BDate":"109.09.04",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":25,
                "SourceType":"POS",
                "SourceCode":"10909040010",
                "Remark":""
                },
                {
                "BDate":"109.09.04",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":75,
                "SourceType":"POS",
                "SourceCode":"10909040011",
                "Remark":""
                },
                {
                "BDate":"109.09.04",
                "BName":"POS銷貨",
                "BTypeCode":1,
                "BTypeName":"使用紅利",
                "Point":-100,
                "SourceType":"POS",
                "SourceCode":"10909040010",
                "Remark":""
                },
                {
                "BDate":"109.09.04",
                "BName":"POS退貨",
                "BTypeCode":3,
                "BTypeName":"返還紅利",
                "Point":100,
                "SourceType":"POS",
                "SourceCode":"10909040003",
                "Remark":""
                },
                {
                "BDate":"109.09.03",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":65,
                "SourceType":"POS",
                "SourceCode":"10909030001",
                "Remark":""
                },
                {
                "BDate":"109.09.03",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":30,
                "SourceType":"POS",
                "SourceCode":"10909030002",
                "Remark":""
                },
                {
                "BDate":"109.09.03",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":25,
                "SourceType":"POS",
                "SourceCode":"10909030003",
                "Remark":""
                },
                {
                "BDate":"109.09.03",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":30,
                "SourceType":"POS",
                "SourceCode":"10909030004",
                "Remark":""
                },
                {
                "BDate":"109.09.02",
                "BName":"POS銷貨",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":5,
                "SourceType":"POS",
                "SourceCode":"10909020001",
                "Remark":""
                },
                {
                "BDate":"109.09.02",
                "BName":"POS銷貨",
                "BTypeCode":1,
                "BTypeName":"使用紅利",
                "Point":-500,
                "SourceType":"POS",
                "SourceCode":"10909020001",
                "Remark":""
                },
                {
                "BDate":"109.09.01",
                "BName":"購物贈點",
                "BTypeCode":0,
                "BTypeName":"獲得紅利",
                "Point":100,
                "SourceType":"WebAPI",
                "SourceCode":"10909010001",
                "Remark":""
                }
                ],
                "ErrorCode": "0000",
                "ErrorMessage": "客戶【0】紅利查詢完成"

                }
            
        
        
        失敗
        {
            "Status": "E",
            "ErrorCode": "9003",
            "ErrorMessage": "Timestamp已過期"
        }
    
        
            
                失敗
                {
                "Status": "E",
                "ErrorCode": "7003",
                "ErrorMessage": "請輸入查詢結束日期"
                }