基本信息
Item |
Info |
URL |
/nsc/v1/service-options |
Method |
POST |
Content-Type: |
application/json |
接口输入参数
参数名 |
必选 |
类型 |
说明 |
channel |
是 |
string |
渠道,系统会对 channel 和 app_id 做相关性校验 |
user_id |
否 |
string |
用户名,nio 用户传入 |
channel_user_id |
否 |
string |
渠道用户名,企业对接必传 |
model_id |
否 |
string |
用户车型 ID |
plate_number |
否 |
string |
用户车牌号,参见 车牌校验规则 |
client |
是 |
byte |
客户端,参见 Client |
parking_infos |
是 |
list |
停车点信息列表 |
-- parking_info |
是 |
object |
停车点信息 |
---- type |
是 |
地址类型 |
参见 枚举值定义-ParkingInfoType |
---- longitude |
否 |
double |
用户车经度 |
---- latitude |
否 |
double |
用户车纬度 |
---- poi_id |
是 |
string |
停车点 POI ID |
---- poi_name |
是 |
string |
停车点 POI 名称 |
---- poi_area_code |
是 |
string |
停车点区级邮编 |
---- poi_address |
是 |
string |
停车点 POI 地址(不含行政区域) |
---- poi_latitude |
是 |
string |
POI 纬度 |
---- poi_longitude |
是 |
string |
POI 经度 |
resource_schedule_mode |
是 |
integer |
调度模式,参见 枚举值定义-resourceScheduleMode |
sub_service |
否 |
string |
子服务类型, 参见 枚举值定义-Sub-Service, 常规服务时不传,救援加电服务时传入 EMERGENCY_CHARGE |
remaining_range |
否 |
double |
剩余续航里程,单位 km,默认20km(传入精确的 remaining range 有助于 NSC 提供更好的服务) |
consumption_package_info |
否 |
object |
扣减的消费包信息(若不传,默认通过渠道的对接方式判断,TO_C 对接时消费包类型为先付后用,TO_B 对接时消费包类型为企业代付) |
--package_code |
是 |
string |
消费包类型,参见 枚举值定义-ConsumptionPackageCode |
注意:user_id和channel_user_id必传且只传其一
地址坐标类型为「火星坐标」
接口输入示例
{
"user_id":"100543",
"sub_service": "",
"model_id":"mod-ac10088a01689e96846400000004",
"plate_number":"京A12222",
"remaining_range":40.0,
"channel":"NIO",
"client":4,
"parking_infos":[
{
"type":13,
"longitude":116.465546,
"latitude":40.021790,
"poi_id":"qq:11862288642589575245",
"poi_name":"望京诚盈中心",
"poi_area_code":"110100",
"poi_address":"北京市朝阳区望京广顺北大街与来广营西路交汇处",
"poi_latitude":40.021790,
"poi_longitude":116.465546
}
],
"resource_schedule_mode":0
}
返回参数说明
键 |
类型 |
说明 |
request_id |
string |
见 API 规范 |
result_code |
string |
见 API 规范 |
debug_msg |
string |
见 API 规范 |
display_msg |
string |
见 API 规范 |
server_time |
long |
见 API 规范 |
data |
list |
服务推荐列表 |
-- option_name |
String |
id |
-- service_option_id |
String |
服务选项 id |
-- strategy |
String |
服务选项策略 超级单:SUPER_ORDER |
-- credit |
int |
服务选项赠送积分 |
-- start_time |
int |
专员出发服务时间( strategy 为 SUPER_ORDER 的时候,此字段为空) |
-- pickup_time |
int |
预计取车时间 |
-- end_time |
int |
预计还车时间 |
-- ttl |
int |
服务选项有效时间,单位:秒 |
-- disobey_traffic_control |
boolean |
是否违反限行规则 |
-- allow_offline_mode |
boolean |
是否允许下为 offline 订单 |
-- promotion_date |
int |
优惠时间 |
-- promotion_id |
string |
优惠 ID |
-- total_fee_amount |
double |
总费用 |
-- original_total_fee_amount |
double |
原价总费用 |
-- price_strategy |
int |
命中的价格策略,参见 枚举值定义-PriceStrategy |
返回示例
{
"result_code":"success",
"debug_msg":"success",
"display_msg":"success",
"server_time": 1480000000,
"request_id":"383",
"data":[
{
"service_option_id": "ac110001jxvo8jmi_10095",
"option_name": "最优",
"strategy": "OPTIMAL",
"start_time": 1562668096,
"pickup_time": 1562668200,
"end_time": 1562683200,
"promotion_date": null,
"promotion_id": null,
"credit": null,
"ttl": 120,
"disobey_traffic_control": false,
"allow_offline_mode": false,
"total_fee_amount": 60.0,
"original_total_fee_amount": 300.0,
"price_strategy": 4
}
]
}
服务选项 result code
具体含义参见 result code 说明
result_code |
success |
fail |
vehicle_model_not_found |
no_resource_available |
one_external_order_per_user |
channel_not_valid |
call_autopedia_fail |
call_autopedia_fail |
remote_invocation_fail |
consumption_type_not_valid_for_channel |
unexpected_result |
call_gis_fail |