跳转到主要内容
Mutation

创建路线

使用 createRoute 变更创建新路线。当您想计算起点与终点之间的充电停靠点、能耗和行驶时间时,此操作非常有用。

变更

创建路线需要 vehicle、origin 和 destination。您还可以添加 via 点、operators、weather 或其他偏好设置来优化计算。该变更会返回路线的 id,可用于获取路线详情、排放量或沿途设施。

参数

input· CreateRouteInput· required
Input for generating a route.

字段

ID· ID

操作可能会失败。请考虑以下错误场景以正确处理。有关错误的更多信息 here.

alternative_station_radius_above_allowed
The radius value is above allowed, the maximum value is $VALUE $UNIT.
alternative_station_radius_below_allowed
The radius value is below allowed, the minimum value is $VALUE $UNIT.
cabin_desired_temperature_above_allowed
The provided desired cabin temperature is too high. The value must be less than or equal to $VALUE $UNIT.
cabin_desired_temperature_below_allowed
The provided desired cabin temperature is too low. The value must be greater than or equal to $VALUE $UNIT.
conflicting_weather_parameters
Invalid combination: 'weather.type' and 'season' cannot be used together.
consumption_exceeded
Provided consumption value for $LOCATION is not valid. The value must be between 0 and $MAXVALUE kwh, or the equivalent in another unit, for this vehicle.
custom_air_pressure_above_allowed
The provided custom air pressure is too high. The value must be lower than or equal to $VALUE $UNIT.
custom_air_pressure_below_allowed
The provided custom air pressure is too low. The value must be greater than or equal to $VALUE $UNIT.
custom_solar_irradiance_above_allowed
The provided custom solar irradiance is too high. The value must be lower than or equal to 1200 $UNIT.
custom_solar_irradiance_below_allowed
The provided custom solar irradiance is too low. The value must be greater than or equal to 0 $UNIT.
custom_temperature_above_allowed
The provided custom temperature is too high. The value must be lower than or equal to $VALUE $UNIT.
custom_temperature_below_allowed
The provided custom temperature is too low. The value must be greater than or equal to $VALUE $UNIT.
invalid_weather_input
weather.custom cannot be used when weather.type is not set to CUSTOM.
missing_custom_weather_parameters
weather.custom must be provided when weather.type is set to CUSTOM.
negative_value_not_allowed
Negative value for $LOCATION is not allowed.
occupants_above_allowed
Provided number of occupants for $LOCATION is not valid. The value must be less than or equal to $OCCUPANTSCOUNT for this vehicle.
occupants_below_allowed
Provided number of occupants for $LOCATION is not valid. The value must be at least 1.
occupants_not_specified
Total occupant weight requires occupants to be specified for $LOCATION.
operator_both_excluded_and_ranking
Operator $OPERATORID is both in the ranking and excluded lists.
operator_duplicated_in_avoid
Operator $OPERATORID is multiple times in the avoid lists.
operator_duplicated_in_exclude
Operator $OPERATORID is multiple times in the exclude lists.
operator_duplicated_in_ranking
Operator $OPERATORID is multiple times in the ranking lists.
operator_in_avoid_and_excluded
Operator $OPERATORID is set in both avoid and excluded for [$COUNTRIES].
operator_in_multiple_ranking_levels
Operator $OPERATORID is set in multiple ranking levels for [$COUNTRIES].
operator_in_ranking_and_avoid
Operator $OPERATORID is set in both ranking and avoid for [$COUNTRIES].
operator_in_ranking_and_excluded
Operator $OPERATORID is set in both ranking and excluded for [$COUNTRIES].
operator_not_found
No operator was found with the $OPERATORID ID.
operator_ranking_none_given
The route operator type was set to $ROUTEOPTYPE, but no ranking was provided. Please add an operator to your client or route request.
route_alternatives_above_allowed
Provided number of alternative routes is not valid. The value must be lower than or equal to 2.
route_alternatives_below_allowed
Provided number of alternative routes is not valid. The value must be higher than or equal to 0.
route_battery_capacity_above_allowed
The provided battery capacity is too high. The value must be less than or equal to $MAX kwh or the equivalent in another unit.
route_battery_capacity_below_allowed
The provided battery capacity is too small. The value must be greater than or equal to $MIN kwh or the equivalent in another unit.
route_cargo_below_allowed
Provided amount of cargo weight is not valid. The value cannot be negative.
route_destination_invalid_properties
Destination properties are invalid. $MESSAGE
route_destination_location_missing
Missing location data for the destination. The destination must include at least one of the following: geometry coordinates, station_id or external_station_id.
route_destination_station_and_external_station_not_matching
The destination station for the route requested was not matched with the external station.
route_destination_station_invalid_charger
The provided destination station $STATIONID cannot be used as charging stop. The charger standard of the vehicle is not supported.
route_destination_station_invalid_speed
The provided destination station $STATIONID cannot be used as charging stop. The station does not support DC charging (> 43kW).
route_destination_station_not_found
The destination station for the route requested was not found with the provided ID.
route_destination_station_out_of_service
The provided destination station $STATIONID cannot be used as charging stop. All compatible connectors at this station are out of service.
route_final_soc_too_high
The provided final state of charge is too high. The value must be less than or equal to 80% of the vehicle battery capacity.
route_invalid_destination_coordinates
The destination coordinates provided are not valid.
route_invalid_maximum_state_of_charge
Invalid maximum_state_of_charge: must be an integer between 80 and 100 (inclusive).
route_invalid_origin_coordinates
The origin coordinates provided are not valid.
route_invalid_safe_risk_margin
Safe risk margin needs to be a value between 0 and 60.
route_invalid_via_coordinates
The via coordinates provided are not valid.
route_min_power_below_allowed
The provided minimum power is too small. The value must be greater than 0.
route_occupant_weight_below_allowed
Provided occupant weight is not valid. The value cannot be negative.
route_same_coordinates_consecutive_via
The coordinates of consecutive via points cannot be the same.
route_same_coordinates_origin_destination
The origin coordinates cannot be the same as the destination coordinates.
route_same_coordinates_origin_via
The origin coordinates cannot be the same as the (first) via point coordinates.
route_same_coordinates_via_destination
The (last) via coordinates cannot be the same as the destination coordinates.
route_speed_factor_above_allowed
The speed factor is too high. The value must be equal or lower than 1.20.
route_speed_factor_below_allowed
The speed factor is too low. The value must be equal or higher than 0.8.
route_station_invalid_charger
The provided via station $STATIONID cannot be used as charging stop. The charger standard of the vehicle is not supported.
route_station_invalid_min_power
The minimum power requested is higher than the station could support.
route_station_invalid_speed
The provided via station $STATIONID cannot be used as charging stop. The station does not support DC charging (> 43kW).
route_station_invalid_truck_only
The station selected as via is restricted to heavy-duty trucks and is not accessible to this vehicle.
route_station_out_of_service
The provided via station $STATIONID cannot be used as charging stop. All compatible connectors at this station are out of service.
route_traffic_aware_disabled
Traffic-aware routing is not enabled for your project. Please contact support to activate this feature.
route_traffic_aware_invalid_departure_date
Traffic-aware routing is not supported for past departure dates. Omit the {departure_time path} or set it to a date in the future.
route_via_cargo_below_allowed
Provided amount of cargo is not valid. The value must be greater than 0.
route_via_invalid_properties
Via properties are invalid. $MESSAGE
route_via_location_missing
Missing location data for one or more vias. All vias must include at least one of the following: geometry coordinates, station_id or external_station_id.
route_via_station_and_external_station_not_matching
The via station for the route requested was not matched with the external station.
route_via_station_missing_station_identifier
Via properties are invalid. A station ID or external station ID must be provided to use a station as a via point.
route_via_station_not_found
The station ID used as a via for the requested route was not found.
soc_exceeding_battery_capacity
The provided state of charge for $LOCATION is too high. The value must be less than or equal to the vehicle battery capacity.
station_destination_coordinates_not_matching
Coordinates [$DESTINATIONCOORDINATES] of destination don't match with station coordinates [$STATIONCOORDINATES].
station_via_coordinates_not_matching
Coordinates [$VIACOORDINATES] of via don't match with station coordinates [$STATIONCOORDINATES].
vehicle_type_not_allowed
Vehicle of type $TYPE is not allowed for this operation.
zero_or_negative_value_not_allowed
Zero or negative value for $LOCATION is not allowed.

此内容是否有帮助?

开发者

Chargetrip ©

状态未知

管理 Cookie

生效日期: 2024 年 3 月 20 日 · 更新日期: 2023 年 1 月 25 日

我们使用 Cookie 来帮助改善您在 developers.chargetrip.com 上的体验。本 Cookie 政策是隐私政策的一部分,涵盖您的设备与我们网站之间的 Cookie 使用情况。我们还提供我们可能使用的第三方服务的基本信息,这些服务也可能在其服务中使用 Cookie,但不在我们的政策涵盖范围内。

如果您不希望接受我们的任何 Cookie,应指示您的浏览器拒绝来自 developers.chargetrip.com 的 Cookie,但请理解,我们可能因此无法为您提供某些您所需的内容和服务。

Cookie 是网站在您访问时存储在您设备上的一小段数据,通常包含有关该网站本身的信息、使网站在您再次访问时识别您的网络浏览器的唯一标识符、服务于 Cookie 自身用途的其他数据,以及 Cookie 自身的有效期。

Cookie 用于启用某些功能(例如登录)、跟踪网站使用情况(例如分析)、存储您的用户设置(例如时区、通知偏好),以及个性化您的内容(例如广告、语言)。

由您所访问的网站设置的 Cookie 通常称为“第一方 Cookie”,通常只跟踪您在该特定网站上的活动。由其他网站和公司(即第三方)设置的 Cookie 可用于在使用同一第三方服务的其他网站上跟踪您。

由您所访问的网站设置的 Cookie 通常称为“第一方 Cookie”,通常只跟踪您在该特定网站上的活动。由其他网站和公司(即第三方)设置的 Cookie 可用于在使用同一第三方服务的其他网站上跟踪您。

定向/广告 Cookie 用于确定哪些推广内容与您及您的兴趣更相关、更合适。网站可能使用它们来投放定向广告,或限制您看到某则广告的次数。这有助于公司提高其营销活动的有效性以及呈现给您的内容的质量。这些 Cookie 可能由您所访问的网站(第一方)或第三方服务设置。由第三方设置的定向/广告 Cookie 可用于在使用同一第三方服务的其他网站上跟踪您。我们在我们的网站上使用定向/广告 Cookie。

定向/广告 Cookie 用于确定哪些推广内容与您及您的兴趣更相关、更合适。网站可能使用它们来投放定向广告,或限制您看到某则广告的次数。这有助于公司提高其营销活动的有效性以及呈现给您的内容的质量。这些 Cookie 可能由您所访问的网站(第一方)或第三方服务设置。由第三方设置的定向/广告 Cookie 可用于在使用同一第三方服务的其他网站上跟踪您。我们在我们的网站上使用定向/广告 Cookie。

第三方承诺

在启用所有第三方提供商的服务之前,我们会审查其隐私政策,以确保其做法与我们一致。我们绝不会故意引入损害或违反用户隐私的第三方服务。

Cookie
google-cookie-consent
描述
存储您的 Cookie 偏好,即您已接受或拒绝了哪些类别,以便我们在您每次访问时都尊重您的选择,并仅加载您允许的分析或营销工具。
有效期
2 年

如果您不希望接受我们的 Cookie,可以指示您的浏览器拒绝来自我们网站的 Cookie。大多数浏览器默认配置为接受 Cookie,但您可以更新这些设置,以完全拒绝 Cookie,或在网站尝试设置 Cookie 时通知您。

如果您使用多台设备浏览网站,可能需要在每台设备上分别更新您的设置。

虽然阻止某些 Cookie 对网站体验的影响很小,但阻止所有 Cookie 可能意味着您无法访问您所浏览网站上的某些功能和内容。

我们可能会不时更新本 Cookie 政策,例如以反映我们所使用 Cookie 的变化,或出于其他运营、法律或监管原因。请重新访问本 Cookie 政策,以了解我们对 Cookie 及相关技术的使用情况。本 Cookie 政策顶部的日期表示其最近一次更新的时间。