# 會員獎品兌換紀錄列表 Custos-EnterpriseAPP-API-020 V1.0 2023-11-07 Custos 企業會員 APP 使用者瀏覽獎品兌換紀錄。 [toc] ## 作業啟動 1. 以傳入之使用者 token 取得使用者流水編號 #emp_data_id 2. 記錄 SystemLog:#emp_data_id|獎品兌換紀錄列表|作業啟動 ## API 作業啟動 1. 以 #emp_data_id 查詢 corp_fm_rewards_exchange_records 取得獎品兌換紀錄 2. 以 corp_fm_rewards_exchange_records.item_id 查詢 corp_fm_item,取得 #item_name、#item_image、#item_dscr ## 作業結束 記錄 SystemLog:#emp_data_id|獎品兌換紀錄列表|作業結束 ## 例外處理 若執行中有發生異常,將攔截到的 exception 訊息記錄 ErrorLog:[YYYYMMDDHHMMSS] EnterpriseAPP-API-020 發生異常:【#攔截到的 exception 訊息】 ## 規格及範例 |API No|EnterpriseAPP-API-020| |-|-| |API Name|getRewardsList| |URL|${url}/APP/getData/getRewardsList| |Purpose|會員獎品兌換紀錄列表| |Description|透過 API 取得會員獎品兌換紀錄列表| |Protocol|JSON over HTTP POST| |Content-Type|application/json| **Request** |參數|型態|必填|長度|說明| |-|-|:-:|:-:|-| |token|String|Y||使用者驗證字串| **Response** |參數|型態|必回|說明| |-|-|:-:|-| |result|String|Y|API 執行結果,Y:成功,N:失敗| |message|String|N|API 執行失敗的訊息說明| |data|Object|N|物件陣列,傳回資料內容;result = N 時,為空陣列([])| **Request Sample** ```json var input = { "token": "..." } ``` **Response Sample** ```json { "result": "Y", //API 結果,result = Y 時才會有資料 "message": "...", //API 訊息,Ex:"執行失敗, 原因:XXXXXXXXX" "data": [ { "item_id": 1, //獎品流水號【corp_fm_item.item_id】 "item_name": "Shopping Bag", //獎品名稱【corp_fm_item.item_name】 "item_image": "64wrrcasfr.jpg", //獎品照片【corp_fm_item.item_image】 "item_dscr": "...", //獎品說明【corp_fm_item.item_name】 "delivery_status": "To Ship", //運送狀態【corp_fm_rewards_exchange_records.delivery_status】 "estimated_delivery_date": "2023-12-05", //預計寄件日期【corp_fm_rewards_exchange_records.estimated_delivery_date】 "recipient_name": "王小明", //收件人【corp_fm_rewards_exchange_records.recipient_name】 "address": "台北市xxxxx", //收件地址【corp_fm_rewards_exchange_records.address】 "email": "abc@gmail.com", //收件人 email【corp_fm_rewards_exchange_records.email】 "preferred_delivery_date": "2023-12-08", //收件人期望寄件日期【corp_fm_rewards_exchange_records.preferred_delivery_date】 "preferred_delivery_time": "16:00-18:00", //收件人期望寄件時間【corp_fm_rewards_exchange_records.preferred_delivery_time】 "remarks": "..." //寄件備註【corp_fm_rewards_exchange_records.remarks】 }, {…} ] } ```