發票查詢 /Invoice/QueryList
Request 請求內容
根節點
參數 | 名稱 | 型態 | 必要性 | 說明 |
Invonos | 客戶發票號碼陣列 | 組合 | M | 字串陣列,例:["AB00000001","AB00000002","AB00000003","AB00000010"] |
客戶發票號碼陣列(Invonos)
參數 | 名稱 | 型態 | 必要性 | 說明 |
發票號碼 | S(10) | M |
回傳參數說明
參數 | 名稱 | 型態 | 說明 |
Invono | 發票號碼 | S(10) | TMS內紀錄的發票號碼 |
Invoday | 發票日期 | S(10) | TMS內紀錄的發票開立日期 EX:108.01.01 |
Ymon | 發票期別 | S(5) | TMS紀錄的發票期別,格式為三位數的民國年 + 兩位數的單數月 EX:10801 |
Model1 | 發票格式 | S(1) | 發票類別,1:手工開立 2:收銀機 3:電子計算機 |
Model2 | 發票聯數 | S(1) | 1:二聯式 2:三聯式 |
Scheck | 電子發票標記 | Int | 0: 非電子發票 1:電子發票 |
Scheck2 | 手動上傳電子發票標記 | Int | 0: 非手動上傳電子發票 1:手動上傳電子發票 |
SellerCTCOD | 賣方統編 | S(10) | 此張發票開立者的統編 |
Ccode | 客戶代號 | S(16) | 此張發票紀錄的客戶代號 |
Cnam2 | 客戶簡稱 | S(12) | 此張發票紀錄的買方簡稱 |
Cnam1 | 客戶抬頭 | S(100) | 此張發票紀錄的買方抬頭 |
CTCOD | 買方統編 | S(10) | 此張發票紀錄的買方統編 |
Cadd2 | 發票地址2 | S(150) | 此張發票記錄的買方地址 |
Sumall | 未稅總計 | Decimal | 應稅銷售額+免稅銷售額+零稅銷售額 |
TaxType | 發票稅別 | Int | 此張發票稅別 1:應稅發票 2:零稅發票 3:免稅發票 9:混稅發票 |
InvoiceTaxRate | 發票稅率 | Decimal | 此張發票記錄的稅率 |
TaxMoney | 發票稅金 | Decimal | 此張發票記錄的稅金 |
SalesAmount | 應稅銷售額 | Int | 此張發票記錄的應稅銷售額 |
ZeroTaxSalesAmount | 零稅銷售額 | Int | 此張發票記錄的零稅銷售額 |
FreeTaxSalesAmount | 免稅銷售額 | Int | 此張發票記錄的免稅銷售額 |
Total | 發票金額總計 | Decimal | 此張發票記錄消費金額 |
PrintTimes | 發票列印次數 | Int | 此張發票列印的次數 |
InvoiceStatus | 發票狀態 | S(1) | 系統內記錄發票目前的狀態 1:未開立發票 2:已開立發票 3:已作廢發票 4:保留號碼 |
Back | 發票作廢備註 | S(50) | |
NPOBAN | 捐贈碼 | S(10) | |
CarrierType | 載具種類代碼 | S(6) | |
CarrierID1 | 載具明碼 | S(64) | |
CarrierId2 | 載具隱碼 | S(64) | |
CardNO4 | 信用卡後四碼 | S(4) | 如使用信用卡刷卡,則會記錄後四碼 |
EMessageType | 電子發票類別 | S(5) | A0401: B2B電子發票 C0401:B2C電子發票 |
MSPaperCode | 主檔來源單據號碼 | S(40) | EX: 客戶訂單號碼 |
PrizeFile | 中獎清冊類別 | S(1) | 電子發票中獎清冊類別 A:未歸戶中獎清冊 Z:已歸戶中獎清冊 Y:實體發票 |
PrizeType | 中獎類別 | S(1) |
A:特別獎 B:雲端發票專屬兩千元獎 C:雲端發票專屬百萬元獎 D:雲端發票專屬五百元獎 0:特獎 1:頭獎 2:二獎 3:三獎 4:四獎 5:五獎 6:六獎 |
Randomnumber | 隨機碼 | S(4) | 電子發票類別為C0401時才有此資料 |
InvoiceItems | 發票明細 | 陣列 | 此發票消費明細 |
發票明細陣列(InvoiceItems)
參數 | 名稱 | 型態 | 說明 |
Invono | 發票號碼 | S(10) | 明細所屬發票號碼 |
Iseq | 發票明細項次 | Int | |
SaleOrderNO | 銷貨單號碼 | S(11) | 明細來源銷貨單號 |
SaleDate | 銷貨日期 | S(10) | EX:108.01.01 |
Hcons | 產品類型 | S(1) | 空白:一般商品 *:組合品母件 #:組合品子件 |
ICODE | 產品代號 | S(17) | |
INAME | 產品名稱 | S(40) | |
Qty | 數量 | Decimal | 購買數量 |
Unit | 購買單位 | S(4) | |
Price | 單價 | Decimal | 產品為組合品子件時此欄位為零 |
Total | 小計 | Decimal | 產品為組合品子件時此欄位為零 |
TaxType | 產品稅別 | S(1) | 1:應稅產品 2:零稅產品 3:免稅產品 |
TaxMoney | 稅金 | Decimal | 產品為組合品子件時此欄位為零 |
InvoiceTaxRate | 產品稅率 | Decimal | |
DSPaperCode | 產品來源單據號碼 | S(40) | EX: 客戶訂單號碼 |
DBAK1 | 備註 | S(100) | 購買時的備註 |
Request範例
https://website/Invoice/QueryList
//請求Header內容
api-pno:TMSDEMOWEB
api-timestamp:1537373062
api-ClientSign:9D9F4BC6B40442C9F26FF083A8CEFF24363AD735CC85D372AC4854C2EE84E7828B7FD3306CC0A018D53107AD6506B2209377315332673EEA3855313E77B83822
//請求Body內容
{
Invonos:[
"VV31001261",
"VV31001262",
"VV31001263",
"VV31001264",
]
}
Response 回覆結果
Response範例
成功
{
"Status":"S",
"ErrorCode":"0000",
"ErrorMessage":"",
"Details":[
{
"Invono":"VV31001261",
"InvoDay":"108.12.13",
"Ymon":"10811",
"Model1":"2",
"Model2":"2",
"Scheck":0,
"Scheck2":1,
"SellerCTCOD":"16960829",
"Ccode":"0",
"Cnam2":"TMS獲利王",
"Cnam1":"",
"CTCOD":"",
"Cadd2":"",
"Sumall":30,
"TaxType":"1",
"InvoiceTaxRate":0.05,
"TaxMoney":2,
"SalesAmount":30,
"ZeroTaxSalesAmount":0,
"FreeTaxSalesAmount":0,
"Total":32,
"PrintTimes":1,
"InvoiceStatus":"2",
"Back":"",
"NPOBAN":"",
"CarrierType":"",
"CarrierID1":"",
"CarrierID2":"",
"CardNO4":"",
"EMessageType":"C0401",
"MSPaperCode":"",
"PrizeFile":"",
"PrizeType":"",
"InvoiceItems":[
{
"Invono":"VV31001261",
"ISeq":"1",
"SaleOrderNO":"10812130076",
"SaleDate":"108.12.13",
"Hcons":"",
"ICODE":"00000040",
"INAME":"此產品為標準測試產品,請勿修改",
"Qty":2,
"Unit":"公斤",
"Price":16,
"Total":32,
"TaxType":"1",
"TaxMoney":2,
"InvoiceTaxRate":0.05,
"DSPaperCode":"10812130076",
"DBAK1":"111111"
}
]
},
{
"Invono":"VV31001262",
"InvoDay":"108.12.16",
"Ymon":"10811",
"Model1":"2",
"Model2":"2",
"Scheck":0,
"Scheck2":1,
"SellerCTCOD":"16960829",
"Ccode":"0",
"Cnam2":"TMS獲利王",
"Cnam1":"",
"CTCOD":"",
"Cadd2":"",
"Sumall":15,
"TaxType":"1",
"InvoiceTaxRate":0.05,
"TaxMoney":1,
"SalesAmount":15,
"ZeroTaxSalesAmount":0,
"FreeTaxSalesAmount":0,
"Total":16,
"PrintTimes":1,
"InvoiceStatus":"2",
"Back":"",
"NPOBAN":"",
"CarrierType":"",
"CarrierID1":"",
"CarrierID2":"",
"CardNO4":"",
"EMessageType":"C0401",
"MSPaperCode":"",
"PrizeFile":"",
"PrizeType":"",
"InvoiceItems":[
{
"Invono":"VV31001262",
"ISeq":"1",
"SaleOrderNO":"10812160001",
"SaleDate":"108.12.16",
"Hcons":"",
"ICODE":"00000040",
"INAME":"此產品為標準測試產品,請勿修改",
"Qty":1,
"Unit":"公斤",
"Price":16,
"Total":16,
"TaxType":"1",
"TaxMoney":1,
"InvoiceTaxRate":0.05,
"DSPaperCode":"10812160001",
"DBAK1":"111111"
}
]
},
⋮
],
"ErrorDetail":{
}
}
失敗
{
"Status": "E",
"ErrorCode": "9003",
"ErrorMessage": "Timestamp已過期",
"ErrorDetail": []
}
失敗
{
"Status":"S",
"ErrorCode":"0001",
"ErrorMessage":"全部查詢完成,有部分查詢出現錯誤",
"Details":[
{
"Invono":"VV31001261",
"InvoDay":"108.12.13",
"Ymon":"10811",
"Model1":"2",
"Model2":"2",
"Scheck":0,
"Scheck2":1,
"SellerCTCOD":"16960829",
"Ccode":"0",
"Cnam2":"TMS獲利王",
"Cnam1":"",
"CTCOD":"",
"Cadd2":"",
"Sumall":30,
"TaxType":"1",
"InvoiceTaxRate":0.05,
"TaxMoney":2,
"SalesAmount":30,
"ZeroTaxSalesAmount":0,
"FreeTaxSalesAmount":0,
"Total":32,
"PrintTimes":1,
"InvoiceStatus":"2",
"Back":"",
"NPOBAN":"",
"CarrierType":"",
"CarrierID1":"",
"CarrierID2":"",
"EMessageType":"C0401",
"MSPaperCode":"",
"PrizeFile":"",
"PrizeType":""
}
],
"ErrorDetail":[
{
"Status":"",
"Invono":"VU10000000",
"ErrorCode":"",
"ErrorMessage":"查無發票資料"
}
]
}