开发指南 官网
API 2.0 > 4.3 全渠道订单 > 4.3.1 订单上送

4.3.1 订单上送

开启令牌和权限后可调用。签名方式请查看开发指南
场景描述:针对支付完成和订单完成两种状态的订单进行上传

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string communal.order.order-upload 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
order_list array
 ├0 array
  ├order_no string 第三方的订单号(支持批量上送,最大10个)
  ├industry_type int 行业类型。餐饮-1,零售-2
  ├type_cate int 订单类型<< 餐饮:【1 堂食 2 打包 3 外卖 4 自助买单 5储值订单 6预约订单 7口碑付款码 8卡券包 9 协议扣费 10礼品卡订单-----------------------------------------------------零售:【1- 商品订单,2- 扫码订单,3- 购买储值订单,4- 扫用户付款码订单,5- 拼团订单,6- 礼品卡订单,7- 微众订单,8- 卡券订单,9- 扫码购订单,10- 会员卡订单,11-F码订单,12 - 积分兑换订单 13:电子卡券订单,14:预付卡订单】
  ├status int 5 订单状态。2 支付完成订单 5 完成订单,不传默认为5
  ├source int 订单来源。1-微信小程序,2-支付宝口碑,3-支付宝小程序 4- 美团 5- 饿了么 6- 支付宝插件 7- 支付宝H5 8- 收银机POS 9 - 代客下单 10 - 商家后台 11 - 百度 12 - 餐道ERP
  ├create_time int 下单时间(10位时间戳)
  ├mobile string 会员手机号
  ├total_amount float 订单总金额(单位:元,以下金额单位均为元) 比如, 你 商品价格是10块钱, 打包费是2,块钱, 餐具费是1块钱, 优惠券优惠4元, 那你 total_amount就传, 13, pack_cost打包费传2, 餐盒费tableware_price 传 1, minus_amount传4, amount=13-4=9 coupons 必须要传券信息 特别是coupons里的 amout字段,
  ├minus_amount float 优惠的金额
  ├amount float 实付金额/应付金额 【amount=0的时,是不加积分的】
  ├pack_cost float 打包费
  ├tableware_price float 餐具费
  ├points int 赠送的积分数量
  ├coupons array
   ├0 array
    ├id string 当前订单使用优惠券的id(第三方的或企迈系统的)
    ├name string 当前订单使用优惠券的名称(第三方的或企迈系统的)
    ├amount float 当前订单使用优惠券优惠的金额(第三方的或企迈系统的)
  ├multi_mark string 门店编码
  ├send_status int 发货状态 0:未发货 1:发货 2:部分发货
  ├user_id int 企迈系统的“用户id”,可通过“会员类API-基础数据-会员识别”接口获得 (传此参数,此订单方可加积分)
  ├pay_at int 支付时间(10位时间戳)
  ├trade_no string 第三方交易号
  ├payment_id int 餐饮= 支付方式 1 - 微信支付,2 - 支付宝支付,4 - 现金支付,5 - 自有微信支付,6 - 自有支付宝支付,8 - pos刷卡支付, 9混合支付,10标记支付,13商家结算,14线下支付,15 云闪付,21标记美团团购,22标记口碑团购,23标记代金券,25美团团购券支付,99组合支付,6508官方微信,6509官方支付宝,6512扫呗微信,6513扫呗支付宝,6514扫呗银联,7508收呗微信,7509收呗支付宝,8508富友微信,8509富友支付宝,9508收钱吧微信,9509收钱吧支付宝,8608多多喵微信,8609多多喵支付宝,8708一点付微信,8709一点付支付宝,8108哗啦啦微信,8109哗啦啦支付宝 零售=支付方式 1 - 微信支付,2 - 支付宝支付,4 - 现金支付,5 - 自有微信支付,6 - 自有支付宝支付,7 - pos刷卡支付,9 - 微众卡支付
  ├completed_at int 订单完成时间(10位时间戳) status=5时,此参数必填
  ├operate_code string 操作人员编号
  ├operate_name string 操作人员姓名
  ├goods array
   ├0 array
    ├trade_mark string 商品标识/编码(在企迈商家后台手动维护,用来建立企迈商品和第三方商品的对应关系)
    ├name string 商品名称
    ├num int 商品数量
    ├price float 商品价格
    ├minus float 商品优惠
    ├spec string 规格数据,json(例如:[{"name":"颜色","value":"黑色"}, {"name":"版本","value":"128G"}])
    ├property string 做法数据,json(例如:[{"name":"加冰","value":"少冰"}, {"name":"甜度","value":"少糖"}])
  ├dispatch_info array
   ├company_id string 配送的物流公司(例如:dada,shunfeng,paotui)
   ├rider_name string 骑手姓名
   ├rider_mobile string 骑手手机号码
   ├get_at string 骑手取单时间(10位时间戳)
   ├finish_at string 配送单完成时间(10位时间戳)
   ├arrive_at string 配送单的预计送达时间(10位时间戳)
  ├sort_num string 取单号,不传会自动生成
  ├use_wallet int 1:使用余额支付,0:未使用余额支付
  ├wallet_amount int 余额支付金额
  ├recipient_address string 收货地址

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "communal.order.order-upload",
    "Params": {
        "order_list": [
            {
                "order_no": "",
                "industry_type": "1",
                "type_cate": "1",
                "status": "2",
                "source": "1",
                "create_time": "1562227529",
                "mobile": "15555136681",
                "total_amount": "100",
                "minus_amount": "10",
                "amount": "90",
                "pack_cost": "2",
                "tableware_price": "1",
                "points": "",
                "coupons": [
                    {
                        "id": "",
                        "name": "",
                        "amount": ""
                    }
                ],
                "multi_mark": "",
                "send_status": "",
                "user_id": "",
                "pay_at": "",
                "trade_no": "",
                "payment_id": "",
                "completed_at": "",
                "operate_code": "",
                "operate_name": "",
                "goods": [
                    {
                        "trade_mark": "",
                        "name": "",
                        "num": "",
                        "price": "",
                        "minus": "",
                        "spec": "",
                        "property": ""
                    }
                ],
                "dispatch_info": {
                    "company_id": "",
                    "rider_name": "",
                    "rider_mobile": "",
                    "get_at": "",
                    "finish_at": "",
                    "arrive_at": ""
                },
                "sort_num": "",
                "use_wallet ": "",
                "wallet_amount": "",
                "recipient_address": ""
            }
        ]
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "status": "",
        "code": "",
        "message": ""
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

请求地址

请求方式 版本信息 请求地址
POST V2 http://openapi.zvcms.com/api/v2

公共参数

参数 参数类型 是否必填 默认值 描述
OpenId string 密钥Id
GrantCode string 授权code
Token string 签名,参考《数字签名sign》
Timestamp string 当前时间戳
Nonce string 随机正整数
Action string communal.order.order-upload 接口方法
Params array 业务参数

请求参数

参数 参数类型 是否必填 默认值 描述
order_list array
 ├0 array
  ├order_no string 第三方的订单号(支持批量上送,最大10个)
  ├industry_type int 行业类型。餐饮-1,零售-2
  ├type_cate int 订单类型<< 餐饮:【1 堂食 2 打包 3 外卖 4 自助买单 5储值订单 6预约订单 7口碑付款码 8卡券包 9 协议扣费 10礼品卡订单-----------------------------------------------------零售:【1- 商品订单,2- 扫码订单,3- 购买储值订单,4- 扫用户付款码订单,5- 拼团订单,6- 礼品卡订单,7- 微众订单,8- 卡券订单,9- 扫码购订单,10- 会员卡订单,11-F码订单,12 - 积分兑换订单 13:电子卡券订单,14:预付卡订单】
  ├status int 5 订单状态。2 支付完成订单 5 完成订单,不传默认为5
  ├source int 订单来源。1-微信小程序,2-支付宝口碑,3-支付宝小程序 4- 美团 5- 饿了么 6- 支付宝插件 7- 支付宝H5 8- 收银机POS 9 - 代客下单 10 - 商家后台 11 - 百度 12 - 餐道ERP
  ├create_time int 下单时间(10位时间戳)
  ├mobile string 会员手机号
  ├total_amount float 订单总金额(单位:元,以下金额单位均为元) 比如, 你 商品价格是10块钱, 打包费是2,块钱, 餐具费是1块钱, 优惠券优惠4元, 那你 total_amount就传, 13, pack_cost打包费传2, 餐盒费tableware_price 传 1, minus_amount传4, amount=13-4=9 coupons 必须要传券信息 特别是coupons里的 amout字段,
  ├minus_amount float 优惠的金额
  ├amount float 实付金额/应付金额 【amount=0的时,是不加积分的】
  ├pack_cost float 打包费
  ├tableware_price float 餐具费
  ├points int 赠送的积分数量
  ├coupons array
   ├0 array
    ├id string 当前订单使用优惠券的id(第三方的或企迈系统的)
    ├name string 当前订单使用优惠券的名称(第三方的或企迈系统的)
    ├amount float 当前订单使用优惠券优惠的金额(第三方的或企迈系统的)
    ├method string gift_card - 礼品卡 reward_gift - 满赠 card - 会员卡优惠 redpack - 红包优惠 reward - 满减优惠 coupon - 优惠券
  ├multi_mark string 门店编码
  ├send_status int 发货状态 0:未发货 1:发货 2:部分发货
  ├user_id int 企迈系统的“用户id”,可通过“会员类API-基础数据-会员识别”接口获得 (传此参数,此订单方可加积分)
  ├pay_at int 支付时间(10位时间戳)
  ├trade_no string 第三方交易号
  ├payment_id int 餐饮= 支付方式 1 - 微信支付,2 - 支付宝支付,4 - 现金支付,5 - 自有微信支付,6 - 自有支付宝支付,8 - pos刷卡支付, 9混合支付,10标记支付,13商家结算,14线下支付,15 云闪付,21标记美团团购,22标记口碑团购,23标记代金券,25美团团购券支付,99组合支付,6508官方微信,6509官方支付宝,6512扫呗微信,6513扫呗支付宝,6514扫呗银联,7508收呗微信,7509收呗支付宝,8508富友微信,8509富友支付宝,9508收钱吧微信,9509收钱吧支付宝,8608多多喵微信,8609多多喵支付宝,8708一点付微信,8709一点付支付宝,8108哗啦啦微信,8109哗啦啦支付宝 零售=支付方式 1 - 微信支付,2 - 支付宝支付,4 - 现金支付,5 - 自有微信支付,6 - 自有支付宝支付,7 - pos刷卡支付,9 - 微众卡支付
  ├completed_at int 订单完成时间(10位时间戳) status=5时,此参数必填
  ├operate_code string 操作人员编号
  ├operate_name string 操作人员姓名
  ├goods array
   ├0 array
    ├trade_mark string 商品标识/编码(在企迈商家后台手动维护,用来建立企迈商品和第三方商品的对应关系)
    ├name string 商品名称
    ├num int 商品数量
    ├price float 商品价格
    ├minus float 商品优惠
    ├spec string 规格数据,json(例如:[{"name":"颜色","value":"黑色"}, {"name":"版本","value":"128G"}])
    ├property string 做法数据,json(例如:[{"name":"加冰","value":"少冰"}, {"name":"甜度","value":"少糖"}])
  ├dispatch_info array
   ├company_id string 配送的物流公司(例如:dada,shunfeng,paotui)
   ├rider_name string 骑手姓名
   ├rider_mobile string 骑手手机号码
   ├get_at string 骑手取单时间(10位时间戳)
   ├finish_at string 配送单完成时间(10位时间戳)
   ├arrive_at string 配送单的预计送达时间(10位时间戳)
  ├sort_num string 取单号,不传会自动生成
  ├use_wallet int 1:使用余额支付,0:未使用余额支付
  ├wallet_amount int 余额支付金额
  ├recipient_address string 收货地址
  ├wx_open_id string 用户微信openid或者公众号openId
  ├ali_user_id string 支付宝uid
  ├other_amount string 其他支付(不参与积分的支付金额)
  ├change_gift_amount int 扣减赠送金额/分
  ├change_recharge_amount int 扣减充值金额/分
  ├bizId string 余额扣减的bizId, 用来在订单中记录这笔订单余额扣减信息

响应参数

参数 参数类型 描述
status bool 请求成功或者失败
code int 成功/错误编码
message string 成功/错误描述

请求示例

{
    "OpenId": "6dc05b4ac175cf316d226252b05cf685",
    "GrantCode": "782c281f62",
    "Timestamp": "1547186244",
    "Nonce": "658965",
    "Token": "0%2B%2B3c6hthjwAml4ABAXOYF4Q6UY%3D",
    "Action": "communal.order.order-upload",
    "Params": {
        "order_list": [
            {
                "order_no": "",
                "industry_type": "1",
                "type_cate": "1",
                "status": "2",
                "source": "1",
                "create_time": "1562227529",
                "mobile": "15555136681",
                "total_amount": "100",
                "minus_amount": "10",
                "amount": "90",
                "pack_cost": "2",
                "tableware_price": "1",
                "points": "",
                "coupons": [
                    {
                        "id": "",
                        "name": "",
                        "amount": "",
                        "method": ""
                    }
                ],
                "multi_mark": "",
                "send_status": "",
                "user_id": "",
                "pay_at": "",
                "trade_no": "",
                "payment_id": "",
                "completed_at": "",
                "operate_code": "",
                "operate_name": "",
                "goods": [
                    {
                        "trade_mark": "",
                        "name": "",
                        "num": "",
                        "price": "",
                        "minus": "",
                        "spec": "",
                        "property": ""
                    }
                ],
                "dispatch_info": {
                    "company_id": "",
                    "rider_name": "",
                    "rider_mobile": "",
                    "get_at": "",
                    "finish_at": "",
                    "arrive_at": ""
                },
                "sort_num": "",
                "use_wallet ": "",
                "wallet_amount": "",
                "recipient_address": "",
                "wx_open_id": "",
                "ali_user_id": "",
                "other_amount": "",
                "change_gift_amount": "",
                "change_recharge_amount": "",
                "bizId": ""
            }
        ]
    }
} 

响应示例

{
    "status": "true",
    "code": "0",
    "message": "说明",
    "data": {
        "status": "",
        "code": "",
        "message": ""
    }
}

异常示例

{
    "status": true,
    "code": "异常编码,根据不同的业务返回编码",
    "message": "异常说明:查询的信息不存在"
}

错误码

{
    "status": false,
    "code": "系统错误编码:详见全局返回编码",
    "message": "系统错误说明"
}

免费升级

营销功能、插件持续每月更新开发升级

免费专业培训

每月建站、微信营销、电商等互联网增值培训

7×24小时服务支持

400电话、QQ、微信、在线等多渠道售后支持

 

安徽智迈科技股份有限公司 版权所有 Copyright 2009-2018 皖公网安备 34019202000074号 增值电信业务经营许可证:皖B2-20170075