API 文档
把 ABRP 强大的纯电动车路线规划能力带进您的平台。完整的 API 组合支持车辆感知的路由遥测接入与深层链接。
API 与集成
接入我们的 API,将纯电动车路径规划、遥测与深层链接整合进产品中。
Planning API
v2 - 推荐
v1 - 遗留
车辆感知的能耗建模与完整 EV 规划能力
Planning API 提供与 ABRP 产品线同步进化的成熟路线算法,包含能耗模型、充电优化、实时交通与天气敏感性等能力。
API 基于 REST + JSON,同时兼容旧版(v1)与现代(v2)端点。入门成本与单次规划计费会因集成规模和使用量而异。
Telemetry API
车辆实时遥测用于行程追踪与建模
Telemetry API 支持车辆实时上报,可用于行程追踪、耗电分析与车型模型迭代,从而持续改善能耗预估与路由精度。
可申请免费密钥。提交数据须用户令牌,推荐使用 OAuth2 流程获取,开发与测试也可用人工方式申请令牌。
OAuth2 API
安全的用户登录与授权
OAuth2 可帮助您的应用在与 Iternio 对接时验证用户身份。首次接入需开通 API Key,并提供回调 URL 与应用名称。
授权流程
首次调用会返回可登录并可授权应用的 HTML 页面;若用户在系统默认浏览器中打开,可复用已登录会话以简化流程。
https://abetterrouteplanner.com/oauth/auth?client_id=<your_client_id>&scope=<requested_scope>&response_type=code&redirect_uri=<your_redirect_uri>可用 scope:
get_telemetry: 读取用户最新遥测数据set_telemetry: 推送新的遥测更新到车辆档案get_plan: 以精简形式读取最新行程(详情请洽商务)vehicle_history: 检索历史行程与充电会话(详情请洽商务)
回到您的回调 URI:
https://your_redirect_uri?state=<state_provided>&auth_code=<returned_auth_code>令牌获取
拿到授权码后,可换取可长期缓存复用的访问令牌。
https://api.iternio.com/1/oauth/token?client_id=<your_client_id>&client_secret=<your_api_key>&code=<auth_code>响应格式:
{
"access_token": "<the created token>",
"token_type": "bearer",
"state": "<your supplied state>"
}用户信息
令牌就绪后可调用「me」端点拉取用户信息:
https://api.iternio.com/1/oauth/me?access_token=<the user token>&api_key=<your api key>响应格式:
{
"user_id": <the numeric ID of the user>,
"full_name": "<Full name of the user>",
"email": "<Email of user>",
"vehicle_id": <The numeric ID of the vehicle, if part of the scope>,
"vehicle_name": "<The vehicle name>",
"vehicle_typecode": "<The vehicle typecode>"
}Deep Links
以 URL 预置路线参数的集成方式
构建自定义链接,在未调用 API 的情况下直接唤起 ABRP,并载入预设路线、车辆与规划参数;适合外链到 App、网站或导航壳层。
深层链接覆盖丰富的查询参数:起终点坐标、途经点、车型、SOC 与用户偏好等。基准 URL: https://abetterrouteplanner.com