Skip to content

Get History Transaction Record

Description

取得歷史訂單

Resource

Post /v1/data_center/history_transaction_record

Authorization

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

Request Body Parameters

Name Type Description
company_id string 公司編號
shop_id string 門市編號
(option)
start_date string 起始日期
(option)
end_date string 結束日期
(option)
vip_id_list list[string] 會員編號清單
(option)
status_list list[string] 狀態清單
(option)
order_id_list list[string] 訂單編號清單
(option)
client_device_list list[string] 客戶端裝置清單
(option)
order_type string
(enum)
訂單類型,預設為ALL
ALLOWED VALUES:
  • ALL
  • ONLINE
  • OFFLINE

(optional)

Request Example

{
  "vip_id_list": [
    "0000000330",
    "00000APP098653",
    "00000SHOP000056"
  ],
  "company_id": "22721208",
  "start_date": "2000-01-01",
  "end_date": "2021-11-01"
}

Response Example

{
  "record_list": [
    {
      "company_id": "22721208",
      "shop_id": "MTYG99",
      "sale_id": "MTYG9901SA201712250060",
      "c_order_id": null,
      "returned_id": null,
      "status": "2",
      "sale_type": "0",
      "pos_id": "01",
      "input_date": "2017-12-25 12:49:03",
      "sale_date": "2017-12-25 12:49:03",
      "user_id": "20140165",
      "sale_user": "20140165",
      "vip_id": "00000SHOP000056",
      "card_no": "3511015",
      "tot_sales": 3,
      "tot_extra": 0,
      "tot_discharge": 0,
      "type": "0",
      "transfer_status": "1",
      "locked": false,
      "cust_id": null,
      "memo": null,
      "exported": "F",
      "export_id": null,
      "stk_id": "MTYG99",
      "tot_quan": 2,
      "person_count": 0,
      "table_no": "togo10",
      "change": 0,
      "sale_method": 2,
      "cust_code": null,
      "tot_tax": 3,
      "gen_by_inv": false,
      "stuff_meal": false,
      "app_date": "2017-12-25 12:49:03",
      "app_user": "20140165",
      "apps_keyin": "0",
      "cust_type": "1",
      "discount": 100,
      "inv_fmt": "1",
      "inv_taxtype": "0",
      "inv_no": null,
      "inv_uamt": 0,
      "inv_tamt": 0,
      "inv_amt": 0,
      "crt_date": "2017-12-25 12:49:03",
      "crt_user": "20140165",
      "mod_date": null,
      "mod_user": null,
      "earnest": 0,
      "saletmp_id": "MTYG99-201712250068",
      "retsaletmp_id": null,
      "c_order_invo": false,
      "ret_type": "0",
      "invo_no_b": "YM96055307",
      "invo_no_e": "YM96055307",
      "invo_cnt": 1.0,
      "last_update": "2021-06-18 15:45:37",
      "pcarrec_name": null,
      "pcarrec_tel": null,
      "pcarrec_addr": null,
      "vipstore_balance": 0,
      "custkind_id": "",
      "bonuspt_point": 0,
      "reprint_cnt": null,
      "service_charge": 0,
      "void_type": "0",
      "merge_saleid": null,
      "split_cnt": 0,
      "split_type": "0",
      "tot_point": 0,
      "permission_user": null,
      "issend": false,
      "issendcorder": false,
      "issenddaylock": false,
      "integral": 0,
      "ic_no": null,
      "mixtksale": "1",
      "deliv_invoice": false,
      "deliv_invcname": null,
      "sendkitc_time": "2017-12-25 00:00:00",
      "tableinfo": "togo10",
      "booking_id": null,
      "spec_disc": 100,
      "spec_id": null,
      "spec_memo": null,
      "open_date": "2017-12-25 12:47:38",
      "issend2": false,
      "chinainvoice": false,
      "worder_id": "",
      "systexroc": null,
      "group_id": null,
      "ic_refno": null,
      "random_no": "7056",
      "npoban": null,
      "buyer_number": null,
      "vip_online": null,
      "booking_type": null,
      "creditnote": false,
      "tour_id": null,
      "replacement": "0",
      "final_point": 0,
      "travel_sum_id": null,
      "amount": 3,
      "amount1": 0,
      "amount2": 0,
      "detail_count": 2,
      "pay_count": 1,
      "check_flag": "00",
      "buyer_type": null,
      "vip_credittype": "0",
      "msg_memo": null,
      "amt_tax": 0,
      "svrchg_tax": 0,
      "svrchg_tamt2": 0,
      "inv_namt1": 0,
      "inv_tax1": 3,
      "inv_tamt1": 0,
      "inv_namt2": 0,
      "inv_tax2": 0,
      "inv_tamt2": 0,
      "gst": 0,
      "gst_rounding": 0,
      "timezone_id": null,
      "delivery_pname": null,
      "goods_payment": null,
      "ec_id": null,
      "storenote_id": null,
      "fast_arrival_barcode": null,
      "fast_arrival": null,
      "hd_id": null,
      "qr_token": null,
      "qr_type": null,
      "vip_funcfrom": null,
      "sap_kindtype": " ",
      "vipgrp_id": null,
      "sale02": [
        {
          "company_id": "22721208",
          "shop_id": "MTYG99",
          "sale_id": "MTYG9901SA201712250060",
          "sale_sno": 1,
          "pay_id": "1",
          "amount": 3,
          "transfer_status": "0",
          "ic_no": null,
          "old_amount": 0,
          "relate_id": null,
          "last_update": "2017-12-25 12:49:03",
          "ic_begindate": null,
          "ic_enddate": null,
          "issend": false,
          "real_value": 3,
          "inv_sum": false,
          "tk_balno": null,
          "isinv": false,
          "pre_namt": 0,
          "pre_tax": 0
        }
      ],
      "sale01": [
        {
          "company_id": "22721208",
          "shop_id": "MTYG99",
          "sale_id": "MTYG9901SA201712250060",
          "sale_sno": 1,
          "prod_id": "IDMNR01",
          "sale_price": 80,
          "qty": 1,
          "item_disc": -7,
          "prom_id": null,
          "prom_sno": null,
          "price_type": "1",
          "free_emp": null,
          "free_memo": null,
          "comb_sale_sno": null,
          "comb_sno": null,
          "comb_type": "0",
          "taste_memo": "荷包蛋",
          "item_tax": 3.65,
          "pack_sale_sno": null,
          "pack_sno": null,
          "pack_type": "0",
          "bonuspt": false,
          "invo_no": "YM96055307",
          "szfprod_id": "",
          "istag": false,
          "prom_qty_type": "0",
          "prom_qty_id": null,
          "prom_qty_sno": null,
          "mprtkitc_id": "|01|02|",
          "mprttag_id": null,
          "send_tag": false,
          "itemdisc_prod": -7.0,
          "itemdisc_comb": null,
          "itemdisc_taste": 0.0,
          "itemdisc_total": 0,
          "combtotprice": null,
          "combprice": null,
          "permission_user": null,
          "redeem_point": null,
          "tk_bno": null,
          "tk_eno": null,
          "order_user": "20140165",
          "user_commrate": 0,
          "dis_type": "0",
          "dis_number": 90,
          "request_memo": null,
          "kitc_seq": null,
          "seat_no": null,
          "issend": false,
          "rgtype": "0",
          "get_servchg": null,
          "nonservchg": false,
          "user_commtype": "0",
          "expiration_date": null,
          "tw_id": 0,
          "summprt": true,
          "prom_qty_qty": 0,
          "tastememo_rpt": null,
          "pointkind": null,
          "tropoxtrsid": null,
          "taste_price": 10,
          "taste_totprc": 10,
          "tk3c_cardno": null,
          "tk3c_idno": null,
          "is_vipdisc": false,
          "order_time": "2017-12-25 12:48:16",
          "import_shop": null,
          "import_id": null,
          "import_sno": null,
          "std_price": 70,
          "cost_price": 0,
          "by_token": null,
          "taxflag": "T",
          "fresh_qty": 1,
          "fresh_price": 0,
          "fresh_prod": false,
          "proptype": "0",
          "qrcode_content": null,
          "sched_id": null,
          "sched_name": null,
          "prom_name": null,
          "prom_qty_schedid": null,
          "prom_qty_schedname": null,
          "prom_qty_name": null,
          "item_taxrate": 0.05,
          "item_amttax": 3,
          "item_tamt1": 0,
          "item_tamt2": 3,
          "sale011": [
            {
              "company_id": "22721208",
              "shop_id": "MTYG99",
              "sale_id": "MTYG9901SA201712250060",
              "sale_sno": 1,
              "taste_id": 101,
              "taste_sno": 3,
              "name": "荷包蛋",
              "price": 10.0,
              "transfer_status": "0",
              "last_update": "2017-12-25 12:49:03",
              "tsprod_id": "IDSHB01",
              "tsquan": 1.0,
              "order_sno": 1,
              "taste_qty": 1.0
            }
          ]
        },
        {
          "company_id": "22721208",
          "shop_id": "MTYG99",
          "sale_id": "MTYG9901SA201712250060",
          "sale_sno": 2,
          "prod_id": "CP01001",
          "sale_price": -70,
          "qty": 1,
          "item_disc": 0,
          "prom_id": "I2015060400001",
          "prom_sno": null,
          "price_type": "C",
          "free_emp": null,
          "free_memo": null,
          "comb_sale_sno": null,
          "comb_sno": null,
          "comb_type": "0",
          "taste_memo": null,
          "item_tax": -3.5,
          "pack_sale_sno": null,
          "pack_sno": null,
          "pack_type": "0",
          "bonuspt": false,
          "invo_no": "YM96055307",
          "szfprod_id": null,
          "istag": false,
          "prom_qty_type": "0",
          "prom_qty_id": null,
          "prom_qty_sno": null,
          "mprtkitc_id": null,
          "mprttag_id": null,
          "send_tag": false,
          "itemdisc_prod": null,
          "itemdisc_comb": null,
          "itemdisc_taste": null,
          "itemdisc_total": 0,
          "combtotprice": null,
          "combprice": null,
          "permission_user": null,
          "redeem_point": null,
          "tk_bno": null,
          "tk_eno": null,
          "order_user": "20140165",
          "user_commrate": 0,
          "dis_type": "0",
          "dis_number": 100,
          "request_memo": null,
          "kitc_seq": null,
          "seat_no": null,
          "issend": false,
          "rgtype": "0",
          "get_servchg": null,
          "nonservchg": false,
          "user_commtype": "0",
          "expiration_date": null,
          "tw_id": 0,
          "summprt": false,
          "prom_qty_qty": 0,
          "tastememo_rpt": null,
          "pointkind": null,
          "tropoxtrsid": null,
          "taste_price": 0,
          "taste_totprc": 0,
          "tk3c_cardno": null,
          "tk3c_idno": null,
          "is_vipdisc": false,
          "order_time": "2017-12-25 12:48:59",
          "import_shop": null,
          "import_id": null,
          "import_sno": null,
          "std_price": 0,
          "cost_price": 0,
          "by_token": null,
          "taxflag": "T",
          "fresh_qty": 1,
          "fresh_price": 0,
          "fresh_prod": false,
          "proptype": "0",
          "qrcode_content": null,
          "sched_id": null,
          "sched_name": null,
          "prom_name": null,
          "prom_qty_schedid": null,
          "prom_qty_schedname": null,
          "prom_qty_name": null,
          "item_taxrate": 0.05,
          "item_amttax": -3,
          "item_tamt1": 0,
          "item_tamt2": -3,
          "sale011": []
        }
      ]
    }
  ]
}

Response Body Parameters

Name Type Description
record_list record 交易紀錄清單

Response Body Parameters - record

Name Type Description
company_id string 公司編號
shop_id string 門店編號
sale_id string 銷售單據編號
c_order_id string 訂單編號
returned_id string 被退貨訂單編號
status string 單據狀態
sale_type string 單據類型
pos_id string 機號
input_date string 歸帳日期
sale_date string 銷售日期
user_id string 收銀員編號
sale_user string 點單員
vip_id string 收銀員編號
card_no string 貴賓卡號
tot_sales float 總銷售金額(淨)
tot_extra float 總溢收金額
tot_discharge float 尾數折讓
type string 退貨標誌
transfer_status string 傳輸標誌
locked bool 是否已結案
cust_id string 廠商編號
memo string 備註
exported string 引出標誌
export_id string 導出單據編號
stk_id string 倉庫編號
tot_quan int 總銷售數量
person_count int 來客數
table_no string 桌號
change float 找零
sale_method int 銷售方式
cust_code string 客戶統編
tot_tax float 應稅金額
gen_by_inv bool 由盤點生成
stuff_meal bool 員工餐
app_date string 核准日期
app_user string 核准人
apps_keyin string 單據建立區分
cust_type string 客戶類型
discount int 折扣率
inv_fmt string 發票聯式
inv_taxtype string 發票稅別
inv_no string 發票號碼
inv_uamt float 發票未稅金額
inv_tamt float 發票稅額
inv_amt float 發票開立金額
crt_date string 建檔日期
crt_user string 建檔人員
mod_date string 異動日期
mod_user string 異動人員
earnest float 預付款
saletmp_id string 銷售暫存單號
retsaletmp_id string 被退貨銷貨暫存單號
c_order_invo bool 訂單已開發票
ret_type bool 被退貨類型
invo_no_b string 發票號碼起
invo_no_e string 發票號碼訖
invo_cnt string 發票張數
last_update string 傳輸異動日
pcarrec_name string 外送訂購人姓名
pcarrec_tel string 外送訂購電話
pcarrec_addr string 外送訂購地址
vipstore_balance float 貴賓預繳結存金額
custkind_id string 客層編號
bonuspt_point int 消費換算點數
reprint_cnt int 收據重印次數
service_charge float 服務費
void_type string 作廢狀態
merge_saleid string 合併銷單
split_cnt int 拆單份數
split_type string 拆單類型
Tot_point int 總兌換點數
permission_user string 授權人員
Issend bool 拋轉ERP
issendcorder bool 元祖拋轉使用
issenddaylock bool 元祖拋轉使用
integral int IC卡積點
ic_no string IC卡號
mixtksale string 交易類型
deliv_invoice bool 客戶是否要發票
deliv_invcname string 發票客戶名稱
sendkitc_time string 預約送餐時間
tableinfo string 多桌列表
booking_id string 訂位編號
spec_disc int 特殊折扣率
spec_id string 特殊折扣備註編號
spec_memo string 特殊折扣備註
open_date string 開單日期
Issend2 bool 拋轉ERP(鼎新)
chinainvoice bool 開發票(天母客制)
worder_id string APP訂單單號
systexroc string 精誠IC卡交易編號
group_id string 退換貨原銷售編號
ic_refno string IC卡扣款單號ID
random_no string 隨機碼
npoban string 捐贈碼
buyer_number string 買方載具號碼
vip_online bool 集中式連線交易
booking_type string 訂位類型
creditNote bool 開立折讓單
tour_id string 導遊編號
replacement string 換貨類型
final_point int 剩餘點數
travel_sum_id string 旅行社結算單號
amount float 應稅(含稅)金額
amount1 float 免稅金額
amount2 float 不計稅金額
detail_count int 明細筆數
pay_count int 付款筆數
check_flag string 判斷FLAG
buyer_type string 買方載具類別
vip_credittype string VIP賖帳(奇美食品)
msg_memo string 異常訊息
amt_tax float 銷售稅額
svrchg_tax float 服務費稅額
svrchg_tamt2 float 服務費已開發票稅額
inv_namt1 float 發票免稅額
inv_tax1 float 發票應稅額
inv_tamt1 float 發票稅額
inv_namt2 float 已開發票免稅額
inv_tax2 float 已開發票應稅額
inv_tamt2 float 已開發票稅額
gst float GST稅額
gst_rounding float 自動尾數折讓金額
timezone_id string 指定時段
delivery_pname string 宅配品名
goods_payment float 代收貨款
ec_id string 電商訂單編號
storenote_id string 溫層
fast_arrival_barcode string 速達7碼條碼資料
fast_arrival string 速達資料
hd_id string 宅配單號
qr_token string QR CODE的token
qr_type string QR CODE的type
vip_funcfrom string 貴賓功能鍵來源
uupon_member string UUPON會員編號
uupon_totalpoint int UUPON交易前點數
uupon_bonusptpoint int UUPON累積點數
uupon_redeempoint int UUPON點數折抵用掉的點數
sap_kindtype string SAP交易類型
sale01 list[sale01] 銷售資料明細檔
sale02 list[sale02] 銷售資料付款方式檔

Response Body Parameters - sale01

Name Type Description
company_id string 公司編號
sale_id string 店號
sale_sno string 銷售單據編號
prod_id string 明細編號
sale_price string 商品編號
qty float 售價
item_disc string 數量
prom_id float 單項折價(負)
prom_sno string 特賣編號
price_type string 特賣明細編號
free_emp string 單價類型
free_memo string 招待員編號
comb_sale_sno string 招待備註
comb_sno string 套餐主項銷售明細編號
comb_type string 套餐子項編號
taste_memo string 套餐類型
item_tax string 口味內容
pack_sale_sno float
pack_sno string 套裝系列銷售明細編號
pack_type string 套裝系列編號
bonuspt string 套裝系列類型
istringo_no bool 是否積點
szfprod_id string 發票號碼
istag string 尺寸主商品編號
prom_qty_type bool 是否印標籤
prom_qty_id string 滿量特賣品類型
prom_qty_sno string 滿量特賣編號
mprtkitc_id string 滿量特賣序號
mprttag_id string 廚房印表機編號
Send_tag string 標籤印表機編號
itemdisc_prod bool 列印標籤
itemdisc_comb float 折讓金額
itemdisc_taste float 套餐攤提折讓金額
itemdisc_total float 加值折讓金額
combtotprice float 總折讓攤提金額
combprice float 套餐子項商品總售價
permission_user float 套餐主項商品售價
redeem_point string 授權人編號
tk_bno string 兌換點數
tk_eno string 票券券號起號
order_user string 票券券號訖號
user_commrate string 點單人員
dis_type int 提成比率
dis_number string 折扣類型
request_memo float 折扣率
kitc_seq string 特殊要求
seat_no int 順序
issend int 位號
rgtype bool 拋轉ERP
nonservchg string 紅配綠type
user_commtype bool 不收服務費
expiration_date string 佣金類型
tw_id string 有效期限
summprt int 餐具編號
prom_qty_qty bool 列印廚房總單
tastememo_rpt string 成立的滿量折扣(抵)數量
pointkind string 收據列印加值備註
tropoxTRSID string 兌點種類
taste_price string 豐藝電子回應ID
taste_totprc float 加值加價金額
tk3c_cardno float 加值加價總金額
tk3c_idno string 燦坤會員卡號
is_vipdisc string 燦坤會員身份證末4碼
order_time bool 結帳時會員折扣
import_shop string 點餐時間
import_id string 換貨原分店
import_sno string 換貨原單號
std_price int 換貨原序號
cost_price float 套餐子項原售價
by_token float 商品標準成本價
taxflag bool 套餐(系列)列印父項
fresh_qty bool 稅別
fresh_price string 生鮮銷售量
fresh_prod float 生鮮價格碼
proptype bool 生鮮商品
qrcode_content string 商品屬性
sched_id string 安永商品QRCode
sched_name string 檔期編號
prom_name string 檔期名稱
prom_qty_schedid string 特賣名稱
prom_qty_schedname string 滿量特賣檔期編號
prom_qty_name string 滿量特賣檔期名稱
item_taxrate string 滿量特賣名稱
item_amttax float 商品稅率
item_tamt1 float 銷售稅額
item_tamt2 float 發票稅額
sale011 list[sale011] 銷售資料口味檔

Response Body Parameters - sale02

Name Type Description
company_id string 公司編號
shop_id string 店號
sale_id string 銷售單據編號
sale_sno string 明細序號
pay_id string 付款方式
amount float 銷售金額
transfer_status string 傳輸標誌
ic_no string IC卡號
old_amount float IC卡:刷卡前金額
relate_id string 支付條碼
last_update string 傳輸異動日
ic_begindate string IC卡啟始日期
ic_enddate string IC卡終止日期
issend bool 拋轉ERP
real_value float 原幣別金額
istring_sum bool 發票彙開
tk_balno string 餘額券券號
isistring bool 付款方式已開發票
pre_namt float 客訂已開沖帳免稅金額
pre_tax float 客訂已開沖帳應稅金額
redeem_point int 兌換(抵用)點數

Response Body Parameters - sale011

Name Type Description
company_id string 公司編號
shop_id string 店號
sale_id string 銷售單號
sale_sno string 明細編號
taste_id string 加值編號
taste_sno string 加值序號
name string 加值名稱
price float 單價
transfer_status string 傳輸標誌
last_update string 傳輸異動日
tsprod_id string 加值商品編號
tsquan string 加值庫存數量
order_sno string 順序
taste_qty string 加值數量