## 創建訂單
>接口說明
創建訂單
>接口請求說明
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
}
}
~~~