除了机器之外,我们还在日常生活中为您提供支持。正在寻找 FLY 等产品?立即探索

开发者·活动 API

REST·JSON超过HTTP

活动 API。

阅读评分行程、GPS路线以及HTTP以上的因素级别 AURA 细分。遥测由 SDK 和经过认证的连接器在边缘捕获; API 为您的堆栈提供得分、可解释的结果。 AURA 支持承保——持牌保险公司保留定价权。

快速入门

进行身份验证,然后读取分数。

每个请求都带有一个不记名令牌和一个可选的车队范围。响应为 JSON 并带有顶级 ok 标志。

认证

在授权标头中传递不记名令牌。使用可选的 x-fleet-id 标头将请求范围限定为一个队列;省略它,管理令牌会看到他们拥有的每个车队。

cURL · authenticated request
curl https://api.yas.dev/v1/trips \
  -H "Authorization: Bearer $YAS_TOKEN" \
  -H "x-fleet-id: fleet_joie"

# Base URL
# Sandbox  https://api.sandbox.yas.dev/v1
# Productionhttps://api.yas.dev/v1
200 OK · application/json
{
  "ok": true,
  "trips": [
    { "tripId": "trip_2026_0142", "overallScore": 72.4, "tier": "Good" }
  ],
  "pagination": { "page": 1, "limit": 20, "totalPages": 9, "total": 172 }
}

参考

核心端点。

行程、路线、分数和车辆的只读端点。摄取是通过 SDK 和连接器进行的,而不是公共写入端点。

  • GET/v1/trips

    List scored trips, newest first, with pagination and fleet scope.

  • GET/v1/trips/{id}

    Retrieve a single trip with its summary metrics and GPS link.

  • GET/v1/trips/{id}/score-breakdown

    Theme-by-factor AURA score breakdown for one trip.

  • GET/v1/vehicles/{plate}

    Vehicle risk profile and driver roster.

示例

检索旅行分数明细。

该细分将大约 100 个风险因素分为六个主题,每个主题都有自己的子分数,并列出了最弱的主题,以便您知道在哪里进行指导。

GET /v1/trips/{id}/score-breakdown
{
  "ok": true,
  "breakdown": {
    "tripId": "trip_2026_0142",
    "overallScore": 72.4,
    "mapMatched": true,
    "themes": [
      {
        "id": "speeding", "label": "Speeding",
        "themeScore": 68.2,
        "factors": [
          { "key": "speedingIntensity", "score": 71.5 }
        ]
      }
    ],
    "weakestTheme": { "id": "speeding", "label": "Speeding" }
  }
}

数据模型

Trip 对象。

行程是得分单位。这些是大多数集成阅读的字段 - 完整的架构位于参考文档中。

领域描述
tripIdStable identifier for the trip.
overallScoreAURA score for the trip, 0–100. Higher is safer.
tierDerived band: Critical (<45), Fair (<65), Good (<80), Safe.
mapMatchedWhether the trip was map-matched to the road network.
distanceKmTrip distance in kilometres.
durationMinTrip duration in minutes.
startDateISO 8601 start timestamp.
vehicleVehicle plate or unit identifier.

惯例

通过设计可预测。

错误

失败返回 ok: false 并带有错误字符串和常规 HTTP 状态 — 400、401、403、404、429 或 500。

分页

列表端点获取页面和限制(10-100)并返回包含页面、限制、totalPages 和总计的分页块。

机队范围

x-fleet-id 标头范围读取一组。不匹配的范围会返回 404 — 不会返回其他队列的数据。

分数等级

等级源自一个等级:关键、公平、良好、安全——每种机器类型的等级相同。

针对沙箱进行构建。

合格的飞行员可以获得沙箱凭证和参考文档。告诉我们您的集成表面和市场。