**請求方式:** POST
**請求地址:** `/taxi.php/estimatePrice
`
**Content-Type:** application/json
**參數說明:**
| 參數 | 參數類型 | 必須 | 說明|
| ----------- | ------------------------------ | ------------ | --- |
| from_latitude | String | yes | 出發地緯度 |
| from_longitude | String | yes | 出發地經度 |
| to_latitude | String | yes | 目的地緯度 |
| to_longitude | String | yes | 目的地經度 |
| car_type | String | yes | 服務車型,多種車型用英文逗號分隔,如 1,2 ,1 出租車(暫無該車型);2 新能源;3 舒適型;4 豪華型;5 商務型|
| city_code | String | yes | 城市編碼|
| order_type | String | yes | 訂單類型 1 實時單; 2 預約訂單|
| departure_time | String | no | 出發時間,非實時單必填(格式:yyyy-MM-dd HH:mm:ss),預約單出發時間必須大于等于當前時間30分鐘 |
**請求包結構體:**
~~~
{
"from_latitude ": "34.775208",
"from_longitude": "113.733841",
"to_latitude": "34.759277",
"to_longitude": "113.779144",
"car_type ": "2",
"city_code ": "0371",
"order_type":"2",
"departure_time":""
}
~~~
**返回信息**
金額以`分`為單位
| 參數 | 參數類型 | 必須 | 說明|
| ----------- | ------------------------------ | ------------ | --- |
| car_type| Integer | yes |服務車型code|
| name | String| yes | 車型名稱|
| price | Integer | yes | 預估價格,單位分 |
|freeze_price|Integer|yes|凍結金額,單位分|
| distance | String| yes | 預估行程距離,單位米 |
| duration | Integer | yes | 預估行程時間,單位秒|
| price_key | Integer | yes | 預估金額的key,訂單會對預估金額做校驗,priceKey有效期為10分鐘,如果priceKey過期或出發地經緯度有變化必須重新預估|
|dynamic_rule_id|Integer|no|動態折扣ID(企業具備此權限,derateType值為2時才有值),下單時值原樣傳入|
**返回示例:**
```
{
"errcode": 0,
"errmsg": "ok",
"data": {
"car_type": 2,
"name": "新能源",
"price": 172,
"freeze_price": 272,
"distance": 6902,
"duration": 1220,
"price_key": "e9cb4895-e740-476b-a355-c6a9f7d3ad9c",
"dynamic_rule_id": 0
}
}
```