# 计价规则
# 简介
本接口用于获取享道打车计价规则信息。
# 服务提供方
享道
# 接口URL
/openapi/order/price/rule
# 请求方式
POST
# 请求频次
单次
# 请求参数
参数名称 | 类型 | 必选 | 说明 |
---|---|---|---|
timestamp | long | 是 | 请求时间,Unix Timestamp单位毫秒 |
city_code | string | 是 | 城市code,参见附录6 |
product_type | string | 是 | 产品类型,参见附录1 |
ride_type | string | 是 | 运力类型,参见附录1 |
service_id | string | 是 | 服务类型,参见附录2 |
order_id | string | 否 | 享道订单id |
# 响应参数
参数名称 | 类型 | 必有 | 说明 |
---|---|---|---|
errCode | int | 是 | 服务响应状态,参见附录5 |
errMsg | string | 是 | 服务响应状态说明,参见附录5 |
content | object | 否 | |
content.product_type | string | 是 | 产品类型,参见附录1 |
content.ride_type | string | 是 | 运力类型,参见附录1 |
content.service_id | string | 是 | 服务类型,参见附录2 |
content.wait_minute | int | 是 | 司机到达上车点后多久开始收等待费,单位分钟 |
content.wait_minute_unit | string | 是 | 司机到达上车点后多久开始收等待费的单位:分钟 |
content.prices | list | 是 | 费用信息,单位分 |
content.prices.type | string | 是 | 费用类型 |
content.prices.description | string | 是 | 费用描述 |
content.prices.amount | double | 否 | 价格,单位分 |
content.prices.amount_unit | double | 否 | 价格单位:分 |
content.prices.rule | string | 否 | 计价方式 |
content.prices.fee_mode | list | 否 | 分时段计价 |
content.prices.fee_mode.begin_hour | string | 是 | 开始时间,HH:mm:ss |
content.prices.fee_mode.end_hour | string | 是 | 结束时间,HH:mm:ss |
content.prices.fee_mode.amount | double | 是 | 计价科目单价,里程费单位,分/0.1公里,时长费单位,分/分钟 |
content.prices.fee_mode .amount_unit | string | 是 | 计价科目价格单位,里程费单位:分/0.1公里,时长费单位:分/分钟 |
# 请求示例
请求
curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/order/price/rule' \
--header 'X-Sign: 5e9745dea27fc8b7b4b90aa2565868c0ebf847fd' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201020164300' \
--header 'X-MerchantId: open_app_uOzMWv59sDGCUC5t' \
--header 'Content-Type: application/json' \
--header 'Cookie: tgw_l7_route=b9cf6aa352d8f4f35de0b28bfe2760db' \
--data-raw '{"timestamp":1603183265876,"city_code":"021","product_type":"private-car","ride_type":"compact","service_id":"1"}'
响应
{
"errCode": 10000,
"errMsg": "successful",
"content": {
"product_type": "private-car",
"ride_type": "compact",
"service_id": "1",
"prices": [
{
"type": "startFee",
"description": "起步费(含3公里/10分钟)",
"amount": 1500.0,
"rule": "车费合计包含起步费、里程费、时长费、远途费等费用",
"amount_unit": "分"
},
{
"type": "distanceFee",
"description": "里程费",
"amount": 0.0,
"fee_mode": [
{
"begin_hour": "00:00:00",
"end_hour": "00:00:00",
"amount": 100.0,
"amount_unit": "分/公里"
}
],
"amount_unit": "分/公里"
},
// …… …… (略)
{
"type": "crossCityFeeModel",
"description": "分段跨城费",
"amount": 0.0,
"rule": "分段跨城费",
"amount_unit": "分",
"distance_fee_mode": [
{
"begin_distance": 0,
"end_distance": 10000000,
"amount": 10000.0,
"amount_unit": "分",
"endCityCode": "0"
}
]
}
],
"wait_minute": 0
}
}