## 创建订单
>接口说明
创建订单
>接口请求说明
HTTP请求格式: application/json
>接口参数说明
~~~[api]
post:/api/miniapp/orders/create?sessionId=
*string:companyId#公司ID
*string:customerCellphone#客户手机号
*string:customerRealName#客户名称
*string:orderType=delivery#订单类型,默认:delivery(取送)
*int:paymentMethom=1#支付方式,默认1:微信支付
string:remarks#订单备注
number:distance#距离
decimal:amount#配送费
*string:from_realName#取件人名称
*string:from_locationName#定位地址名称
*decimal:from_address#取货地址
*string:from_cellphone#取货点联系方式,支持手机
*decimal:from_lat#取货点纬度,取值范围0~90
*decimal:from_lng#取货点经度,取值范围0~180
int:from_positionSource#位置来源:1:腾讯地图,2:百度地图,3:高德地图
*string:to_realName#送件人名称
*string:to_locationName#定位地址名称
*decimal:to_address#送货点地址
*string:to_cellphone#送货点联系方式,支持手机、固话
*decimal:to_lat#送货点纬度,取值范围0~90
*decimal:to_lng#送货点经度,取值范围0~180
int:to_positionSource#位置来源:1:腾讯地图,2:百度地图,3:高德地图
string:bespeakPickupTime#预约取件时间,例:11:45
<<<
success
{
"id": "4028e7a460dec37f0160dedc104c0002",
"orderNum": "DE15155674522330161",
"orderType": "delivery",
"createDate": 1515567452236,
"amount": 18,
"payAmount": 0,
"paymentMethod": 1,
"paymentStatus": 1,
"expireDate": null,
"orderStatus": 0,
"completeDate": null,
"deliveryStatus": 0,
"confirmStatus": 0,
"assignDate": null,
"confirmDate": null,
"processDate": null,
"pickingDate": null,
"fromLocationName": "鹿城区广场路188号鹿城区行政中心1号楼",
"fromAddress": "广场路188号鹿城区行政中心1号楼",
"toLocationName": "鹿城区高新路25号",
"toAddress": "高新路25号",
"remarks": "尽快送到",
"paymentMethodLabel": "微信支付",
"paymentStatusLabel": "未支付",
"orderStatusLabel": "待支付",
"deliveryStatusLabel": "未接单",
"riderCollection": false,
"assignMode": 0,
"assignRiderId": null,
"assignRiderName": null,
"rewardAmount": 0,
"fromName": "温州美速食餐饮店",
"fromCellphone": "15869649360",
"fromLat": 28.020741,
"fromLng": 120.661726,
"toName": "陈大发",
"toCellphone": "15869649360",
"toLat": 27.979149621820945,
"toLng": 120.64154404438551,
"distance": 6.744,
"collection": null,
"payment": null,
"customRealName": null,
"customCellphone": "13588960670",
"customPhone": null,
"customDetailAddress": null,
"riderRealName": null,
"riderCellphone": null,
"riderAvatarUrl": null,
"logRes": null,
"bespeakPickupTime": "11:45"
}
<<<
error
{
"path": "/api/miniapp/orders/create",
"message": "只支持取送订单类型!",
"status": 406,
"timestamp": 1515567488693
}
~~~
>接口请求示例
~~~
{
"companyId":"34",
"customerCellphone":"13588960670",
"customerRealName":"testUserName",
"orderType":"delivery",
"paymentMethod":1,
"remarks":"尽快送到",
"customerId":"2360024746658816",
"distance":6.74,
"amount":25.0,
"riderCollection":false,
"serialNumber":"1",
"partnerOrderCreateDate":1512104290000,
"requireReceiveTime":1512106131000,
"bespeakPickupTime":"11:45",
"to":{
"realName":"陈大发",
"locationName":"鹿城区高新路25号",
"address":"高新路25号",
"cellphone":"15869649360",
"lat":27.979149621820945,
"lng":120.64154404438551,
"positionSource":2
},
"from":{
"realName":"温州美速食餐饮店",
"locationName":"鹿城区广场路188号鹿城区行政中心1号楼",
"address":"广场路188号鹿城区行政中心1号楼",
"cellphone":"15869649360",
"lng":120.661726,
"lat":28.020741,
"positionSource":2
}
}
~~~