Developers · Events API

REST · JSON over HTTP

Events API.

Read scored trips, GPS routes, and factor-level AURA breakdowns over HTTP. Telemetry is captured at the edge by the SDK and certified connectors; the API gives your stack the scored, explainable result. AURA supports underwriting — the licensed insurer retains pricing authority.

Quickstart

Authenticate, then read a score.

Every request carries a bearer token and an optional fleet scope. Responses are JSON with a top-level ok flag.

Authentication

Pass a bearer token in the Authorization header. Scope a request to one fleet with the optional x-fleet-id header; omit it and admin tokens see every fleet they own.

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 }
}

Reference

Core endpoints.

Read-only endpoints for trips, routes, scores, and vehicles. Ingestion happens through the SDK and connectors, not a public write endpoint.

  • 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.

Example

Retrieve a trip score breakdown.

The breakdown groups roughly 100 risk factors into six themes, each with its own sub-score, and names the weakest theme so you know where to coach.

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" }
  }
}

Data model

The Trip object.

A trip is the unit of scoring. These are the fields most integrations read — the full schema is in the reference docs.

FieldDescription
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.

Conventions

Predictable by design.

Errors

Failures return ok: false with an error string and a conventional HTTP status — 400, 401, 403, 404, 429, or 500.

Pagination

List endpoints take page and limit (10–100) and return a pagination block with page, limit, totalPages, and total.

Fleet scope

The x-fleet-id header scopes reads to one fleet. A mismatched scope returns 404 — never another fleet's data.

Score tiers

Tiers are derived from one scale: Critical, Fair, Good, Safe — the same bands across every machine type.

Build against a sandbox.

Qualified pilots get sandbox credentials and reference docs. Tell us your integration surface and markets.