当前位置: API文档

sales.TradeQuery.getLog2(订单日志查询)

¥标准

1.接口说明

1.1 接口描:按照订单编号查询订单日志
1.2 适用版本:客户端V1.6.1.1及以上版本
1.3 增量获取:
1.4 时间跨度:

1.5注意事项:支持批量查询,建议单次查询不超过100

2.调用场景

2.1 举例说明:财务系统、SAP、数据分析等系统的对接

3.请求参数说明



   3.1 请求地址

环境HTTP地址
测试环境http://47.92.239.46/openapi
正式环境http://wdt.wangdian.cn/openapi

  3.2 公共请求参数

名称字段类型长度
必须描述
卖家账号sidString
卖家账号, 由旺店通分配
接口账号keyString
由旺店通分配appkey, 在发送的数据中对应 key 字段,获取方式点击这里
saltString
由旺店通分配appsecret,是由两部分构成, 冒号前面的部分是secret, 冒号后面的部分是salt. 例如一个appsecret是testsecret:testsalt, 那么secret为testsecret, salt为testsalt.
接口名称methodString
调用的接口名称
版本号vString
1.0
秒级时间戳timestampInt
秒级时间戳, 当前时间戳减去 2012-01-01 00:00:00(1325347200), 时间与服务器时间差120s内即合法。
签名signString
签名

    3.3 业务请求参数

名称字段类型长度
必须描述
查询参数

params

Map<String, Object>
Y

查询参数

params

名称字段类型长度
必须描述
订单编号trade_no

String


y订单编号,多个订单编号之间用英文逗号隔开

4.响应参数

   4.1 公共响应参数

名称字段类型长度
必须描述
状态码

status

Int
y

状态码,0表示调用成功

错误信息

message

String


y

无错误信息不返回

响应正文信息

data

Map<String, Object>


y
响应正文信息

data

名称字段类型长度
必须描述
返回结果resultList<Map<String, Object>>
y返回结果


result

名称字段类型长度
必须描述
订单编号trade_noString
y订单编号
日志信息detail_listList<Map<String,Object>>
y日志信息




detail_list

名称字段类型长度
必须描述
创建时间
createdString
y创建时间,yyyy-MM-dd HH:mm:ss格式
员工昵称
shortnameString
y
员工昵称
操作类型typeInt
y

操作类型

1: 下单或建单

2: 付款

3: 递交

6: 拦截出库

12: 修改仓库

16: 修改标记

20: 填写物流单号

21: 订单拆分

30: 驳回到客审

44: 进入财审

45: 订单审核

46: 财务审核

50: 历史订单导入

69: 修改包装

80: 客户打款

90: 修改打印状态

91: 打单

100: 验货

101: 打包

102: 称重

105: 发货

106: 包裹分拣

120: 取消拦截

123: 归档

124: 反归档

132: 撤销发货/拣货放回

133: 拣货

134: 登记检视员

135: 物流同步

140: 翱向发货单翱向建单时间

141:翱向发货单实际落库时间

142: 翱向发货单递交

143: 翱向补赠赠品

155: 热敏获取物流单号

160: 清除订单拦截

165: 销售出库签入

166: 销售出库签出

300: 推送/取消外部wms入/出库单

305: 回收物流单号

310: 打印小票日志

330: 档口锁定

340: 订单回告

345: 不记录绩效

350: 删除出库单货区

360: 重选出库单货区

365: 订单撤销出库发货

366: 解析主单客服备注到子单

1000: 无具体意义

1001: 更换货品

1002: 添加货品

1003: 删除货品

1004: 修改货品金额

1005: 修改收件人信息

1006: 修改物流

1007: 修改仓库

1008: 修改打印备注

1009: 修改客服备注

1010: 冻结订单

1011: 解冻订单

1012: 清除异常

1013: 退款/子订单退款

1014: 订单审核失败

1015: 未付款递交

1016: 下载原始单

1020: 递交后处理

1021: 重试物流

1022: 订单修改和新增标记

1023:订单包装

 1024:订单拆分

 1025:转异常

 1026:合并订单

 1027:重算/更新赠品

1031: 分单

1032: 取消分单

1041: 放行

1042: 退回

1051: 历史订单导入转完成

1060: 极速直发

1061: 生成出库单

1062: 原始单发货变更触发发货

1063: 原始单变更触发发货失败

1064:出库单状态变化

1065:货位分配失败

1066:订单归档失败

1067:自流转订单内仓发货

 1072:打上转人工处理标记

1105:发货后物流变更

1099: 未付款转移

1100: 委外推单

1101: 获取面单

5.请求示例

json
[
    {
        "trade_no":"JY202604200114,JY202604200113"
    }
]
PHP
<?php  
header("Content-Type: text/html; charset=UTF-8");  
date_default_timezone_set("Asia/Shanghai");  

$client = new WdtErpClient("url", "wdtapi3", "appkey", "secret")
  
$params = new stdClass();  
$parMap->trade_no = "JY202604200114,JY202604200113";

$data = $client->call("sales.TradeQuery.getLog2", $params);
?>
JAVA
C#
CURL
curl --location 'http://47.92.239.46/openapi?key=wdtapi3-test9&method=sales.TradeQuery.getLog&salt=136787110023126585465b366becff09&sid=wdtapi3&timestamp=450888768&v=1.0&sign=4a4973ab93d3033a355e35d037ee23a4' \
--header 'Content-Type: application/json' \
--data '[
    {
        "trade_no":"JY202604200114,JY202604200113"
    }
]'

6.响应示例

   6.1 正常响应示例 

JSON
{
    "data": {
        "result": [
            {
                "trade_no": "JY202604200113",
                "log_list": [
                    {
                        "shortname": "daj1",
                        "type": 3,
                        "created": "2026-04-20 17:34:00"
                    },
                    {
                        "shortname": "daj1",
                        "type": 2,
                        "created": "2026-04-20 08:33:43"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1,
                        "created": "2026-04-20 08:33:43"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 15:00:54"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 13:00:58"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 11:00:59"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 09:00:56"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 07:00:43"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 05:00:48"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 03:00:49"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 01:00:51"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 21:00:48"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 19:00:50"
                    },
                    {
                        "shortname": "韩佳",
                        "type": 1000,
                        "created": "2026-04-22 18:33:51"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 17:00:50"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 15:00:51"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 13:00:24"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 11:00:34"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 09:00:40"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 07:00:27"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 05:00:40"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 03:00:26"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 01:00:28"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 22:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 20:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 18:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 16:48:14"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 09:36:10"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1006,
                        "created": "2026-04-21 09:35:24"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1007,
                        "created": "2026-04-21 09:34:59"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 09:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 07:00:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 05:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 03:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 01:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 21:36:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 19:36:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 17:36:10"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1020,
                        "created": "2026-04-20 17:34:01"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1000,
                        "created": "2026-04-20 17:34:01"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1000,
                        "created": "2026-04-20 17:34:01"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1016,
                        "created": "2026-04-20 17:33:43"
                    }
                ]
            },
            {
                "trade_no": "JY202604200114",
                "log_list": [
                    {
                        "shortname": "daj1",
                        "type": 3,
                        "created": "2026-04-20 17:34:03"
                    },
                    {
                        "shortname": "daj1",
                        "type": 2,
                        "created": "2026-04-20 08:33:43"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1,
                        "created": "2026-04-20 08:33:43"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 15:00:54"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 13:00:58"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 11:00:59"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 09:00:56"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 07:00:43"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 05:00:48"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 03:00:49"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-23 01:00:51"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 21:00:48"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 19:00:50"
                    },
                    {
                        "shortname": "韩佳",
                        "type": 1000,
                        "created": "2026-04-22 18:33:52"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 17:00:50"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 15:00:51"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 13:00:24"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 11:00:33"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 09:00:40"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 07:00:27"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 05:00:40"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 03:00:26"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-22 01:00:27"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 22:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 20:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 18:48:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 16:48:14"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 09:36:10"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1006,
                        "created": "2026-04-21 09:35:23"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1007,
                        "created": "2026-04-21 09:34:57"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 09:00:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 07:00:11"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 05:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 03:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-21 01:00:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 21:36:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 19:36:10"
                    },
                    {
                        "shortname": "系统",
                        "type": 1014,
                        "created": "2026-04-20 17:36:10"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1020,
                        "created": "2026-04-20 17:34:05"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1000,
                        "created": "2026-04-20 17:34:05"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1000,
                        "created": "2026-04-20 17:34:05"
                    },
                    {
                        "shortname": "daj1",
                        "type": 1016,
                        "created": "2026-04-20 17:33:43"
                    }
                ]
            }
        ]
    },
    "status": 0
}

   6.2 异常响应示例

JSON

{
    "message": "订单不存在或无店铺权限",
    "status": 100
}








常用工具