1.2*获取订单明细

优质
小牛编辑
131浏览
2023-12-01

请求地址

http://api.dc78.cn/Api/do_get_order

请求方式

GET

请求参数

参数参数名称描述
id
订单号
订单号,取自上一协议返回值
getpay=1获取订单支付信息
获取订单支付信息 ,用于订单有支付时,一次性获取订单信息和支付信息
invoice=1
是否单独推送发票信息设置该参数备注(memo字段)与发票信息(invoice字段)分别单独显示,不设置invoice参数,默认将发票和备注信息合并到(memo字段)显示

返回

{
"status": "1",
"id": "43227192",
"msid": "6786",
"time": "2018-12-19 09:52:46",
"date": "20181219",
"type": "1",
"cate": "20",
"phone": "15611428199,545",
"cust": "雪碧",
"state": "1",
"count": "0",
"table": "101",
"cfmtime": "2018-12-19 09:25:01",
"cfmcode": "",
"cfmuser": "",
"pscount": "1",
"memo": "(饿了么#1)",
"addr": "腾飞",
"payid": "1",
"paytype": "2",
"src": "el",
"srcid": "1228132382205788207",
"num": 1,
"srcnum": "饿了么1#",
"wishtime": "",
"chucfs": "",
"rider_id": "",
"rider_phone": "111",
"rider_name": "15027950333",
"package_num": "",
"route": "",
"mbid": "",
"mbaccid": "",
"mbcardno": "",
"invoice": "",
"pay_amt": 51,
"invoice": "发票标题:苏州果盘网络技术有限公司,纳税人识别号:1111111,类型:公司",
"other_pay_item": [
{
"name": "餐盒",
"price": 4,
"refid": "99902",
"unit": "元",
"qty": 1,
"amt": 4,
"memo": "",
"dgid": 2
},
{
"name": "商家优惠",
"price": -12,
"refid": "99912",
"unit": "元",
"qty": 1,
"amt": -12,
"memo": "在线支付立减优惠",
"dgid": 12
},
{
"name": "平台费",
"price": -9,
"refid": "99911",
"unit": "元",
"qty": 1,
"amt": -9,
"memo": "",
"dgid": 11
},
{
"name": "配送费",
"price": 4,
"refid": "99901",
"unit": "元",
"qty": 1,
"amt": 4,
"memo": "",
"dgid": 1
},
{
"name": "商家免减配送费",
"price": -1.5,
"refid": "99914",
"unit": "元",
"qty": 1,
"amt": -1.5,
"memo": "",
"dgid": 14
}
],
"list": [
{
"id": "196998506",
"name": "口味鸡胗",
"price": 36,
"refid": "2226",
"unit": "份",
"qty": "1",
"amt": "36.00",
"memo": "",
"dgid": "3915124",
"parentid": "0",
"rebate": "0"
},
{
"id": "196998507",
"name": "皮蛋豆腐",
"price": 16,
"refid": "1005",
"unit": "份",
"qty": "1",
"amt": "16.00",
"memo": "",
"dgid": "3915025",
"parentid": "0",
"rebate": "0"
},
{
"id": "196998508",
"name": "米饭(外)",
"price": 3,
"refid": "2714",
"unit": "份",
"qty": "2",
"amt": "6.00",
"memo": "",
"dgid": "3919169",
"parentid": "0",
"rebate": "0"
},
{
"id": "196998509",
"name": "打包费",
"price": 4,
"refid": "99902",
"unit": "单",
"qty": "1",
"amt": "4.00",
"memo": "",
"dgid": "2",
"parentid": "0",
"rebate": "0"
},
{
"id": "196998510",
"name": "配送费减免",
"price": -1.5,
"refid": "99914",
"unit": "元",
"qty": "1",
"amt": "-1.50",
"memo": "",
"dgid": "14",
"parentid": "0",
"rebate": "0"
}
],
"pay": {
"id": "32756569",
"msid": "1559",
"state": "3",
"type": 1,
"table": "2001",
"mbextid": "",
"mbaccid": "379358",
"mbcardno": "3793588",
"mblevel": "5",
"src": "wx",
"cate": "dopay",
"doid": "13928388",
"bzid": "",
"amt": "90.00",
"discount": "37.50",
"payamt": 52.5,
"pay_co": 0,
"pay_mc": 26.3,
"pay_pt": 26.2,
"pay_wx": "0.00",
"pay_ali": 0,
"time": "2018-01-11 23:56:36",
"trid": "",
"status": 1
},
"server_timestamp": 1545184571,
"server_time": "2018-12-19 09:56:11",
"server_name": "wx-task2.hz"
}

参数参数名称必填描述范例
id
订单id


1682248
msid
门店id


3080
time
订单时间


2016-10-19 17:32:12
date
订单日期


20161019
type
类型
0=堂食,1=外卖
1
cate
业务类型
10=堂食,11=打包,12=预点,20=外卖
20
phone
客人手机


15892907860
cust
客人姓名


贾宝玉
state
状态
1=已确认,2=已下单
1
table
桌台号



cfmtime
订单确认时间

状态已确认会有
1970-01-01 08:00:00
cfmcode
确认人工号



cfmuser
确认人姓名



chucfs
出菜方式

为空为立即上菜
等叫
pscount
人数


0
memo
订单备注


百度
addr
配送地址

外卖订单会有
京几道小区 8号楼3门601室
payid
支付标志

0=未支付,1=已支付外卖平台订单,>1为支付单号
1
src
订单来源

wx=微信,bd=百度,el=饿了么,mt=美团
bd
srcid
外卖平台订单号


14768695232424
num
订单流水号

每个平台每天从1开始
28
srcnum
订单流水号描述


百度28#
mbaccid
微会员id

非空说明是会员下的单

mbcardno
微会员卡号



id
流水号


7091808
name
菜品名


回锅肉份
price
价格


29
refid
菜品外部代码

线下对应用
2647
unit
单位


qty
数量


1
amt
金额


29
memo
备注、做法口味



dgid
平台菜品id


804381
parentid


非零表示是套餐明细,id对应菜品主项
0
pay_amt
外卖平台客人实付金额
外卖订单客人实际支付金额(新)

other_pay_item(新增)
外卖平台参数信息
配送费、打包费、外卖平台佣金、外卖平台活动费、替用户承担配送费会在这个item线下可以自行处理需要的参数

修改记录

2015-07-09

返回数据增加mbaccid,会员id。如果是非会员为空

2015-08-7

增加返回会员卡号mbcardno

2015-09-06

增加返回payid,用于判断订单是否结账,当src=wx时,payid为在线支付流水号,当src为其它外卖平台时,已支付时payid=1

2016-08-16

list明细中增加套餐标志parentid,当>0表示为套餐明细,并且可以用此parentid与列表中套餐主记录id进行匹配

2016-08-29

增加cate业务类型参数,10=堂食,11=打包,12=预点,20=外卖

2016-10-17

增加src,用于标识外卖订单来源,有wx=微信平台,bd=百度外卖,mt=美团外卖,el=饿了么

增加srcid,上述外卖平台的订单流水号

增加num,订单顺序号,各平台独立的每天从1开始的顺序号

srcnum,订单来源序号,结合了src和num,如百度3#,美团9#,微信7#

2017-09-13

列表菜品属性中增加折扣控制:

rebate=100不打折,0=可打折

2018-01-25

增加参数getpay=1,用于订单有支付时,一次性获取订单信息和支付信息

2018-10-09

增加参数pay_amt=外卖订单客人实际支付金额


说明

外卖订单中的配送费与打包费的编码如下:

编码名称
99901
配送费
99902
打包费
99911
外卖平台佣金
99912
外卖平台活动优惠
99913口碑其他费用
99914
替用户承担配送费(新)
99921
餐位/茶位费
99922
消费服务费
99923
消费税金

请求方式

INI

请求参数

[action]
描述
action
action=do_get_order
[get]
描述
id订单号,取自上一协议返回值

返回

[result]

list=away:1

status=1

id=281930
msid=113
time=2015-07-07 11:11:14
date=20150707
type=0
phone=13951117312
cust=张三
state=1
count=1
table=109
cfmtime=2015-07-07 11:22:01
cfmuser=李六
pscount=0
payid=0

mbaccid=16861

mbcardno=168611

[result_list_0]

id=1267946
name=油麦菜
price=22.00
refid=000102029
unit=例
qty=1
amt=22.00