Skip to main content
POST
/
v1
/
routing
/
trace_route
Map Matching
curl --request POST \
  --url https://api.bookovia.com/v1/routing/trace_route \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "shape": [
    {
      "lat": 123,
      "lon": 123,
      "time": 123
    }
  ],
  "costing": "<string>",
  "shape_match": "<string>",
  "gps_accuracy": 123,
  "search_radius": 123
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.bookovia.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Map Matching endpoint takes a series of GPS points (breadcrumbs) and matches them to the underlying road network. This is essential for converting raw GPS data into accurate routes, calculating precise mileage, and verifying that vehicles followed planned routes.
Map matching accounts for GPS drift, tunnels, and signal loss to produce clean, road-snapped routes from noisy GPS data.

Authentication

Required permissions: routing:read

Request

shape
array
required
Array of GPS points to match (minimum 2 points)
costing
string
required
Transportation mode: auto, truck, bicycle, pedestrian
shape_match
string
Matching algorithm: map_snap (snap to nearest roads), edge_walk (walk road network), walk_or_snap (hybrid)Default: map_snap
gps_accuracy
number
GPS accuracy in metersDefault: 5
search_radius
number
Maximum search distance for road matching (meters)Default: 50

Use Cases

  • Fleet Tracking: Convert GPS breadcrumbs into accurate driven routes
  • Mileage Calculation: Calculate precise distance driven for reimbursement
  • Route Compliance: Verify drivers followed assigned routes
  • Trip Replay: Visualize historical trips on a map
  • Speed Limit Enforcement: Identify speeding by matching to roads with known limits

Response

Returns matched route with confidence scores and road-snapped geometry.
{
  "success": true,
  "data": {
    "trip": {
      "legs": [...],
      "summary": {
        "length": 15.2,
        "time": 1800
      }
    },
    "matched_points": [
      {"lat": 40.7128, "lon": -74.0060, "edge_index": 0, "confidence": 0.95}
    ]
  }
}