1.1获取订单明细

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

本接口用于获取指定的订单详情。

订单id由平台通过推送接口向下推送,API模式收到推送消息后,需要根据消息中的订单id调用此接口获取订单详情。

DLL接口中已经封装好,向DLL主程序推送时已经准备好完整的订单详情数据,不需要单独调用此接口。

请求参数说明

参数描述必填示例值类型最大长度
action接口参数组object
└action需要调用的接口名称do_get_orderstring
getGET参数组,本组参数需要参与签名object
└id订单id.由推送消息中获得相应订单id8600032893number18
└getpay获取订单支付信息 ,用于订单有支付时,一次性获取订单信息和支付信息1number
└invoice设置该参数备注( memo字段)与发票信息( invoice字段)分别单独显示,不设置invoice参数,默认将发票和备注信息合并到( memo字段)显示1number

请求示例

{
	"action": {
		"action": "do_get_order"
	},
	"get": {
		"id": "8600032893",
		"getpay": "1",
		"invoice": "1"
	}
}

响应参数说明

参数描述必填示例值类型最大长度
status返回状态。接口成功时为1,出错为01number
id订单的唯一编号8600032893number18
count2number
date订单业务日期20190702number
cust客人姓名张三丰string
cate订单业务分类10=堂食,11=打包,12=预点,20=外卖,21=外卖自提number
addr订单地址(外卖业务)string
other_pay_item外卖平台参数信息object
route路线string
rider_name骑手名称string
phone客人手机号13988888888number
payid支付单id。先付模式下订单已支付,会有订单 id。为0说明未支付(后付)。已支付外卖订单为18600426131number
rider_phone骑手电话string
src订单来源wx,el=饿了么,mt=美团string
num订单序号1number
paytype支付类型1=货到付款,2=在线支付number
pay_amt外卖平台客人实付金额(外卖官方接口支持)string
chucfs出菜方式string
mbaccid微会员id2060615number
package_numstring
srcnum订单流水号描述微信#1string
rider_id菜品外部代码string
wishtime预约时间string
cfmuser确认人支付下单string
cfmtime下单时间2019-07-02 13:31:15string
cfmcode确认人工号string
mbcardno会员卡号20606157number
table订单桌台名称string
invoice是否单独推送发票信息(设置该参数备注( memo字段)与发票信息( invoice字段)分别单独显示,不设置invoice参数,默认将发票和备注信息合并到( memo字段)显示)string
pscount人数9number
state订单状态1number
srcid外卖平台订单号string
type类选0=堂食,1=外卖number
time订单时间2019-07-02 13:31:09string
msid订单门店编号,使用搬单功能时,有可能会推送多个门店的订单6786number
memo订单备注预点,尽快string
mbid平台id6061522number
list订单中的明细列表list
└qty数量1number
└amt金额20number
└rebate折扣100number
└id明细 id1number
└unit单位string
└name名称芋头奶茶string
└memo备注string
└dgid平台菜品id4927381number
└refid门店菜品idstring
└parentid套餐明细标识0number
└price价格20number
└cartid外卖平台订单口袋id33number
└cartname外卖平台订单口袋名称333333number
└spec外卖平台支持:菜品规格(开放需申请)大份string
└attrs外卖平台支持:菜品属性(开放需申请)加辣string
└remark外卖平台支持:菜品备注(开放需申请)不加香菜string
└dcid菜品类别ID22number
└dcname菜品类别名称凉菜string

响应示例

{
    "status": "1",
    "id": "8600032893",
    "count": "2",
    "date": "20190702",
    "cust": "张三丰",
    "cate": "12",
    "addr": "",
    "other_pay_item": [],
    "route": "",
    "rider_name": "",
    "phone": "13988888888",
    "payid": "8600426131",
    "rider_phone": "",
    "src": "wx",
    "num": 1,
    "paytype": "0",
    "pay_amt": "",
    "server_timestamp": 1566061006,
    "chucfs": "",
    "mbaccid": "2060615",
    "package_num": "",
    "srcnum": "微信#1",
    "rider_id": "",
    "wishtime": "",
    "cfmuser": "支付下单",
    "cfmtime": "2019-07-02 13:31:15",
    "cfmcode": "",
    "mbcardno": "20606157",
    "table": "",
    "server_time": "2019-08-18 00:56:46",
    "server_name": "wx-task2.hz",
    "invoice": "",
    "pscount": "9",
    "state": "1",
    "srcid": "",
    "type": "0",
    "time": "2019-07-02 13:31:09",
    "msid": "6786",
    "memo": "预点,尽快",
    "mbid": "6061522",
    "list": [
        {
            "qty": 1,
            "amt": 20,
            "rebate": "100",
            "id": "1",
            "unit": "",
            "name": "芋头奶茶",
            "memo": "",
            "spec": "大份",
            "attrs": "加辣",
            "remark": "不加香菜",
            "dgid": "4927381",
            "refid": "",
            "parentid": "0",
            "price": 20,
            "cartid": "33",
            "cartname": "333333",
            "dcid": "22",
            "dcname": "凉菜"
        },
        {
            "qty": 1,
            "amt": 2,
            "rebate": "100",
            "id": "2",
            "unit": "",
            "name": "泰国香米饭",
            "memo": "",
            "dgid": "4927382",
            "refid": "",
            "parentid": "0",
            "price": 2
        },
        {
            "qty": 9,
            "amt": 180,
            "rebate": "100",
            "id": "3",
            "unit": "位",
            "name": "茶位费",
            "memo": "",
            "dgid": 21,
            "refid": "99921",
            "parentid": "0",
            "price": 20
        },
        {
            "qty": 1,
            "amt": 4,
            "rebate": "100",
            "id": "4",
            "unit": "项",
            "name": "服务费",
            "memo": "+4",
            "dgid": 22,
            "refid": "99922",
            "parentid": "0",
            "price": 4
        },
        {
            "qty": 1,
            "amt": 12.3594,
            "rebate": "100",
            "id": "5",
            "unit": "项",
            "name": "税金",
            "memo": "22x6%",
            "dgid": 23,
            "refid": "99923",
            "parentid": "0",
            "price": 12.3594
        }
    ]
}

说明

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

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