接口介绍
根据商户或者收银员id来查询订单订单列表。
参数简介
公共参数
参数名 |
参数类型 |
参数介绍 |
是否必填 |
command |
String(32) |
接口名,固定为:open.api.trade.list |
是 |
app |
String(32) |
接入商标识 |
是 |
operator_id |
String(32) |
收银员的id,用于标识收款账户 |
是 |
version |
String(16) |
调用的接口版本,固定为:2.0 |
是 |
sign_type |
String(32) |
签名类型 MD5、RSA,默认MD5 |
否 |
request_id |
String(64) |
请求报文ID,唯一定位一次报文请求,由发起方生成,应答方原样返回,uuid生成,全局唯一 |
是 |
request_time |
String(32) |
请求发起时间,格式:yyyyMMddHHmmss,请求发起时间,应答方原样返回 |
是 |
sign |
String(32) |
签名,详见MD5签名、RSA256签名 |
是 |
参数简介
参数名 |
参数类型 |
参数介绍 |
是否必填 |
biz_level |
String(32) |
层级类型必填, MERCHANT/OPERATOR, 默认为商户层级 |
否 |
page |
int |
当前页码,默认第1页 |
否 |
size |
int |
单页大小,默认200 |
否 |
start_date |
String(16) |
开始时间,格式:yyyyMMddHHmmss |
是 |
end_date |
String(16) |
开始时间,格式:yyyyMMddHHmmss |
是 |
返回值说明
公共返回值
参数名 |
所属结构 |
返回值类型 |
返回值说明 |
特殊备注 |
success |
result |
boolean |
标识这次请求是否成功 |
|
error_code |
result |
String |
错误码 |
|
error_msg |
result |
String |
错误码的详细说明 |
|
request_id |
data |
String(64) |
请求报文ID |
|
request_time |
data |
String(32) |
请求发起时间,格式:yyyyMMddHHmmss |
|
response_time |
data |
String(32) |
请求返回时间,格式:yyyyMMddHHmmss |
|
sign |
sign |
String |
签名值 |
具体参照: 接口验签规则 |
数据返回值
参数名 |
所属结构 |
返回值类型 |
返回值说明 |
特殊备注 |
page_number |
data |
int |
当前页码 |
|
page_size |
data |
int |
每页条数 |
|
total_page |
data |
int |
总页数 |
|
total_count |
data |
int |
总条数 |
|
local_order_no |
data.pageData |
String(64) |
本地订单号 |
|
cb_order_no |
data.pageData |
String(64) |
采宝的订单号,最长64位 |
|
out_order_no |
data.pageData |
String(64) |
支付宝、微信等的订单号id,最长64位 |
|
order_status |
data.pageData |
String(64) |
订单状态 |
该状态用于判断收银是否成功,具体取值请参照:名词解释 |
total_amount |
data.pageData |
long |
订单金额(分为单位) |
|
receive_amount |
data.pageData |
long |
收款金额(分为单位) |
|
refund_amount |
data.pageData |
Long |
退款金额(分为单位) |
|
refund_time |
data.pageData |
Long |
最后一次退款时间,时间戳 |
|
trade_type |
data.pageData |
String(64) |
交易类型 |
具体取值请参照:名词解释 |
payment_channel |
data.pageData |
String(64) |
支付渠道 |
具体取值请参照:名词解释 |
subject |
data.pageData |
String(128) |
订单描述 |
|
remark |
data.pageData |
String(128) |
订单备注 |
|
discount_amount |
data.pageData |
long |
优惠金额(分为单位) |
|
paymeny_way |
data.pageData |
String(64) |
付款方式 |
具体取值参照:名词解释 |
pay_time |
data.pageData |
long |
支付时间,格式为时间戳 |
|
merchant_code |
data.pageData |
String(64) |
商户号 |
|
store_id |
data.pageData |
String(64) |
门店Id |
|
operator_id |
data.pageData |
String(64) |
收银员ID |
|
refund_operator_id |
data.pageData |
String(64) |
退款收银员ID |
只在退款交易中有值 |
buyer_id |
data.pageData |
String(64) |
消费者ID,支付宝支付全局唯一,微信支付并不是唯一的(同一个商户,汇付微信、乐刷微信、官方微信,同一个消费者在每个通道下都会有一个ID)请注意微信订单这个buyer_id是消费者在平台通道公众号下的openId |
返回值举例
{
data: {
page_data: "W3siY2Jfb3JkZXJfbm8iOiJUQ1JXWDE4MDkyNjE1MjQwODE5NTEzNzMiLCJkaXNjb3VudF9hbW91bnQiOjAsImxvY2FsX29yZGVyX25vIjoiT1BFTkFQSTIwMTgwOTI2MTUyNDE1MjczMTAxMSIsIm1lcmNoYW50X2NvZGUiOiJBMDAzMDU3MTAwMDAwNjciLCJvcGVyYXRvcl9pZCI6ImNjYWFhZDJiYTFmMmE2YmFjY2I5ODZkMGE3NDhkYmI5Iiwib3JkZXJfc3RhdHVzIjoiUkVGVU5EX1NVQyIsIm91dF9vcmRl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0b3JlX2lkIjoiMTcxNzI2Iiwic3ViamVjdCI6IuW8gOaUvuW5s+WPsOa1i+ivlei0puWPt2Mt5byA5pS+5bmz5Y+w5rWL6K+V6Zeo5bqXIOa2iOi0uSIsInRvdGFsX2Ftb3VudCI6MTIzMDAsInRyYWRlX3R5cGUiOiJQQVlNRU5UIn1d=",
page_number: 1,
page_size: 20,
request_id: "1b1d770c-c2da-4aa4-9055-0428de44f149",
request_time: "20180926164245",
response_time: "20180926164333",
total_count: 4,
total_page: 1
},
result: {
success: true
},
sign: "gViVofO2IHvVZwpZQpX0h7aoJinPr17G+hUurXwVKFsoLD2SYrx+rTpqIjHWgN3Op1XF3kBhvEB92g4DjpwQqTB+IMkf5vYpG3U9EyJKilBcdj0tRys6sqfOszQgW2XG6LJ+Qkz6bK/gdTl4fE5tmP5yG0Luwn2YLb/xud2WZ+Hrk9zmZUIluGnM7ISn40qxpoU0lJcfveQSaP7kscq/kZ1bJnVbVcaerzoteHyT+M+LMx2kVOKeCqboTNvAh8lUj4fXe18eXQ6qR5YIdixoeeZUGehXStCG8DvmvPomKNFeksrgOEAn860FOLYAZ1xEYuj0JtVJcak5nzd600Y9OQ=="
}
Js Demo
http://openapi.caibaopay.com/test/api/v2/tradeList.htm