訂單明細區間查詢 /Order/DetailQueryBetween

Request 請求內容

根節點
參數 名稱 型態 必要性 說明
QueryType 查詢類別 INT O 0:查詢客戶訂單號碼 1:查詢訂單號碼 預設為0
OCOD4_S 客戶訂單代號-起始 S(40) O
OCOD4_E 客戶訂單代號-結束 S(40) O 輸入空白則代表最後一筆

回傳參數說明


主檔

參數 名稱 型態 說明
OCOD1 訂單單號 S(11) TMS內紀錄的訂單單號
ODATE 訂單日期 S(10) TMS內紀錄的訂單日期
ODAT2 出貨日期 S(10) TMS內訂單如果尚未轉出貨,則此欄位為空白
OCOD3 出貨單號 S(11) TMS內訂單如果尚未轉出貨,則此欄位為空白
OCOD4 客戶訂單號碼 S(40) TMS內紀錄的客戶訂單號碼
OCCOD 訂單客戶代號 S(16) TMS內紀錄的客戶代號
OCNAM 訂單客戶名稱 S(12) TMS內紀錄的訂單客戶名稱
OPNAM 訂單聯絡人 S(40) TMS內紀錄的訂單聯絡人
OTOT1 小計 Decimal TMS內紀錄的未稅金額
OTAXM 稅金 Decimal TMS內紀錄的稅金金額
OTOT2 總計 Decimal TMS內紀錄的未稅金額+稅金金額
OBAK1 訂單備註1 S(200) TMS內紀錄的訂單備註
OBAK2 訂單備註2 S(200) TMS內紀錄的訂單備註
OBAK3 訂單備註3 S(200) TMS內紀錄的訂單備註
OADD1 發票地址 S(50) TMS內紀錄的發票寄送地址
OWAY 送貨方式 S(50) TMS內紀錄的送貨方式
OPAY 付款備註 S(100) TMS內紀錄的付款備註
OTONO 付款方式代號 S(2) TMS內紀錄的付款方式代號
OTONA 付款方式名稱 S(20) TMS內紀錄的付款方式名稱
OTax 訂單稅別 INT TMS內紀錄的訂單稅別 1.應稅 2.零稅 3.免稅 9.混稅
ReceiveName 收件人名稱 S(100)
ReceiveTEL 收件人電話 S(20)
ReceiveMobile 收件人手機 S(20)
ReceiveZIPCode 收件人郵遞區號 S(10)
ReceiveAddr 收件人地址 S(200)
ReceiveCTCOD 發票統編 S(8)
ReceiveComName 發票公司抬頭 S(100)
CarrierType 載具種類代碼 S(6)
CarrierId2 載具號碼 S(64)
NPOBAN 捐贈碼 S(10)
RETOLL 物流代收 INT 0 未啟用代收 1 啟用代收
RETOLL_PRICE 代收金額 DECIMAL
Items 明細 組合

明細

參數 名稱 型態 說明
OSEQ 訂單序號 INT TMS內紀錄的訂單序號
ICODE 產品代號 S(17) TMS內紀錄的產品代號
INAME 產品名稱 S(40) TMS內紀錄的產品名稱
Unit 單位 S(4) TMS內紀錄的產品單位
Qty 數量 DECIMAL TMS內紀錄的產品數量
Price 價格 DECIMAL TMS內紀錄的產品價格
Total 合計 DECIMAL TMS內紀錄的產品合計
DTaxType 稅別 S(1) 當主檔的OTax為9時,此欄位才代表TMS內紀錄的產品稅別
Stock 倉庫代號 S(4) TMS內紀錄的產品倉庫代號
Remark 備註 S(60) TMS內紀錄的產品備註
Request範例
https://website/Order/DetailQueryBetween
            
                //請求Header內容
                api-pno:TMSDEMOWEB
                api-timestamp:1715096310
                api-ClientSign:2F6EF0202E42DD0A4F19DC6D547782B7D6397632B4D03C48A2090F53FEDD03786A5FDEF5145D7F739FBED1719AD90E9DF75180826134B0AAFB2DE99DA1B5E456

                //請求Body內容
                {
                "QueryType":0,
                "OCOD4_S": "TM190305Z01516",
                "OCOD4_E": "TM190305Z01522"
                }
            
        

Response 回覆結果

Response範例
        
        成功
        {
            "Status":"S",
            "ErrorCode":"0000",
            "ErrorMessage":"",
            "Details":[
            {
                "OCOD1":"10803060038",
                "ODATE":"108.03.06",
                "ODAT2":"108.03.07",
                "OCOD3":"10803070011",
                "OCOD4":"TM190305Z01516",
                "OCCOD":"91APP",
                "OCNAM":"91APP-BABY",
                "OPNAM":"",
                "OTOT1":171.0000,
                "OTAXM":9.0000,
                "OTOT2":180.0000,
                "OBAK1":"91mai/物流:宅配/實際金額:148",
                "OBAK2":"姓名:林OO 手機:0912345679 ",
                "OBAK3":"地址:408台中市南屯區文心南六路181號 ",
                "OADD1":"",
                "OWAY":"宅配",
                "OPAY":"",
                "OTONO":"00",
                "OTONA":"月結",
                "OTax":"9",
                "ReceiveName":"91APP-BABY",
                "ReceiveTEL":"",
                "ReceiveMobile":"",
                "ReceiveZIPCode":"",
                "ReceiveAddr":"408台中市南屯區文心南六路181號",
                "ReceiveCTCOD":"",
                "ReceiveComName":"91APP",
                "ReceiveEmail":"",
                "CarrierType":"",
                "CarrierId2":"",
                "NPOBAN":"",
                "RETOLL":0,
                "RETOLL_PRICE":0.0000,
                "Items":[
                            {
                                "OSEQ":1,
                                "ICODE":"LLBOX-W",
                                "INAME":"LitterBox貓砂籃-灰色",
                                "Unit":"個",
                                "Qty":1.000000000,
                                "Price":180.0,
                                "Total":180.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":"白色"
                            }
                        ]
            },
            {
                "OCOD1":"10803070112",
                "ODATE":"108.03.07",
                "ODAT2":"108.03.07",
                "OCOD3":"10803070015",
                "OCOD4":"TM190305Z01518",
                "OCCOD":"004135",
                "OCNAM":"林三九",
                "OPNAM":"林三九",
                "OTOT1":171.0000,
                "OTAXM":9.0000,
                "OTOT2":180.0000,
                "OBAK1":"91mai/物流:宅配/實際金額:148",
                "OBAK2":"姓名:林三九 手機:0912341511 ",
                "OBAK3":"地址:408台中市南屯區文心南六路183號 ",
                "OADD1":"",
                "OWAY":"宅配",
                "OPAY":"",
                "OTONO":"00",
                "OTONA":"月結",
                "OTax":"9",
                "ReceiveName":"林三九",
                "ReceiveTEL":"",
                "ReceiveMobile":"0912341511",
                "ReceiveZIPCode":"",
                "ReceiveAddr":"408台中市南屯區文心南六路183號",
                "ReceiveCTCOD":"",
                "ReceiveComName":"",
                "ReceiveEmail":"",
                "CarrierType":"",
                "CarrierId2":"",
                "NPOBAN":"",
                "RETOLL":0,
                "RETOLL_PRICE":0.0000,
                "Items":[
                            {
                                "OSEQ":1,
                                "ICODE":"LLBOX-W",
                                "INAME":"LitterBox貓砂籃-灰色",
                                "Unit":"個",
                                "Qty":1.000000000,
                                "Price":180.0,
                                "Total":180.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":"白色"
                            }
                        ]
            },
            {
                "OCOD1":"10803080013",
                "ODATE":"108.03.08",
                "ODAT2":"108.04.02",
                "OCOD3":"10804020305",
                "OCOD4":"TM190305Z01522",
                "OCCOD":"004148",
                "OCNAM":"林一四",
                "OPNAM":"林一四",
                "OTOT1":3429.0000,
                "OTAXM":171.0000,
                "OTOT2":3600.0000,
                "OBAK1":"",
                "OBAK2":"",
                "OBAK3":"",
                "OADD1":"",
                "OWAY":"",
                "OPAY":"現金",
                "OTONO":"00",
                "OTONA":"月結",
                "OTax":"9",
                "ReceiveName":"林一四",
                "ReceiveTEL":"",
                "ReceiveMobile":"0911145000",
                "ReceiveZIPCode":"",
                "ReceiveAddr":"408台中市南屯區文心南十路752號",
                "ReceiveCTCOD":"",
                "ReceiveComName":"",
                "ReceiveEmail":"",
                "CarrierType":"",
                "CarrierId2":"",
                "NPOBAN":"",
                "RETOLL":0,
                "RETOLL_PRICE":0.0000,
                "Items":[
                            {
                                "OSEQ":1,
                                "ICODE":"LLPACK-W",
                                "INAME":"鎖便桶*1+鎖便匣*6+貓砂籃白色",
                                "Unit":"組",
                                "Qty":1.000000000,
                                "Price":3600.0,
                                "Total":3600.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":"360°主子貓砂籃白色"
                            },
                            {
                                "OSEQ":2,
                                "ICODE":"LL3",
                                "INAME":"鎖便桶三代",
                                "Unit":"個",
                                "Qty":1.000000000,
                                "Price":0.0,
                                "Total":0.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":""
                            },
                            {
                                ...
                            },
                            ...
                        ]
            },
            "ErrorDetail":[]
        }
    
        
        
        失敗
        {
            "Status": "E",
            "ErrorCode": "9003",
            "ErrorMessage": "Timestamp已過期",
            "ErrorDetail": []
        }
    
        
        
        失敗
        {
            "Status": "E",
            "ErrorCode": "2006",
            "ErrorMessage": "查無客戶資料",
            "ErrorDetail": []
        }
    
        
        
        失敗
        {
            "Status":"E",
            "ErrorCode":"9999",
            "ErrorMessage":"查無訂單資料",
            "Details":[],
            "ErrorDetail":[]
        }
    
        
        
        失敗
        {
            "Status":"S",
            "ErrorCode":"0001",
            "ErrorMessage":"全部查詢完成,有部分查詢出現錯誤",
            "Details":[
            {
                "OCOD1":"10803060038",
                "ODATE":"108.03.06",
                "ODAT2":"108.03.07",
                "OCOD3":"10803070011",
                "OCOD4":"TM190305Z01516",
                "OCCOD":"91APP",
                "OCNAM":"91APP-BABY",
                "OPNAM":"",
                "OTOT1":171.0000,
                "OTAXM":9.0000,
                "OTOT2":180.0000,
                "OBAK1":"91mai/物流:宅配/實際金額:148",
                "OBAK2":"姓名:林OO 手機:0912345679 ",
                "OBAK3":"地址:408台中市南屯區文心南六路181號 ",
                "OADD1":"",
                "OWAY":"宅配",
                "OPAY":"",
                "OTONO":"00",
                "OTONA":"月結",
                "OTax":"9",
                "ReceiveName":"91APP-BABY",
                "ReceiveTEL":"",
                "ReceiveMobile":"",
                "ReceiveZIPCode":"",
                "ReceiveAddr":"408台中市南屯區文心南六路181號",
                "ReceiveCTCOD":"",
                "ReceiveComName":"91APP",
                "ReceiveEmail":"",
                "CarrierType":"",
                "CarrierId2":"",
                "NPOBAN":"",
                "RETOLL":0,
                "RETOLL_PRICE":0.0000,
                "Items":[
                            {
                                "OSEQ":1,
                                "ICODE":"LLBOX-W",
                                "INAME":"LitterBox貓砂籃-灰色",
                                "Unit":"個",
                                "Qty":1.000000000,
                                "Price":180.0,
                                "Total":180.0,
                                "DTaxType":"1",
                                "Stock":"01 ",
                                "Remark":"白色"
                            }
                        ]
            }
            ],
            "ErrorDetail":[
                {
                    "Status":"",
                    "OCOD1":"10803070112",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01518",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                },
                {
                    "Status":"",
                    "OCOD1":"10803080013",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01522",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                },
                {
                    "Status":"",
                    "OCOD1":"10803080014",
                    "OSEQ":0,
                    "OCOD4":"TM190305Z01522",
                    "ErrorCode":"",
                    "ErrorMessage":"查無訂單明細資料"
                }
            ]
        }