RoadScope API

Complete API access to surveys, POIs, routes, collaboration, cloud storage, webhooks, and real-time features

API Features

Everything you need to build powerful mapping applications

Secure

Enterprise-grade security with API key authentication

Fast

High-performance API with global CDN distribution

RESTful

Clean, intuitive REST API with JSON responses

Well Documented

Comprehensive documentation with examples

Getting Started

1. Get Your API Key

First, you'll need to get your API key from your RoadScope account settings.

API Key: rs_live_1234567890abcdef...

2. Make Your First Request

Test your API key by making a simple request to get your surveys.

curl -H "Authorization: Bearer your-api-key" \
     https://api.roadscope.com/v1/surveys

3. Explore the SDKs

Use our official SDKs for faster development in your preferred language.

JavaScript/Node.js

npm install @roadscope/api

Python

pip install roadscope

PHP

composer require roadscope/api

API Reference

GET/api/v1/surveys

Get all surveys for authenticated user

Response

{
  "surveys": [
    {
      "id": "survey_123",
      "name": "Highway 401 Survey",
      "customerName": "ACME Corp",
      "createdAt": "2025-01-01T00:00:00Z",
      "status": "active"
    }
  ]
}
POST/api/v1/surveys

Create a new survey

Request

{
  "name": "New Survey",
  "customerName": "Client Name",
  "description": "Survey description",
  "vehicle": {
    "type": "flatbed",
    "length": 48,
    "width": 8.5,
    "height": 8.5,
    "weight": 80000
  }
}

Response

{
  "id": "survey_456",
  "name": "New Survey",
  "customerName": "Client Name",
  "createdAt": "2025-01-01T00:00:00Z",
  "status": "draft"
}
GET/api/v1/surveys/{id}/pois

Get all POIs for a specific survey

Response

{
  "pois": [
    {
      "id": "poi_789",
      "name": "Bridge Clearance",
      "type": "Bridge",
      "coordinates": {
        "latitude": 45.5017,
        "longitude": -73.5673,
        "altitude": 0,
        "accuracy": 5
      },
      "measurements": [],
      "photos": []
    }
  ]
}
POST/api/v1/surveys/{id}/pois

Create a new POI in a survey

Request

{
  "name": "New POI",
  "type": "Road",
  "coordinates": {
    "latitude": 45.5017,
    "longitude": -73.5673,
    "altitude": 0,
    "accuracy": 5
  },
  "address": "123 Main St",
  "notes": "Important location"
}

Response

{
  "id": "poi_101",
  "name": "New POI",
  "type": "Road",
  "coordinates": {
    "latitude": 45.5017,
    "longitude": -73.5673,
    "altitude": 0,
    "accuracy": 5
  },
  "createdAt": "2025-01-01T00:00:00Z"
}
GET/api/v1/surveys/{id}/routes

Get all routes for a specific survey

Response

{
  "routes": [
    {
      "id": "route_456",
      "name": "Highway Route",
      "waypoints": [
        {
          "latitude": 45.5017,
          "longitude": -73.5673,
          "altitude": 120,
          "address": "123 Main St"
        }
      ],
      "elevationProfile": [
        {
          "distance": 0,
          "elevation": 120
        }
      ],
      "totalDistance": 15.5,
      "createdAt": "2025-01-01T00:00:00Z"
    }
  ]
}
POST/api/v1/surveys/{id}/share

Create shared survey link with permissions and QR code

Request

{
  "permissions": ["read"],
  "expiresAt": "2025-06-01T00:00:00Z",
  "password": "optional-password",
  "customUrl": "my-survey-name",
  "generateQRCode": true
}

Response

{
  "shareId": "share_456",
  "publicUrl": "https://roadscope.com/shared/my-survey-name",
  "qrCodeUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "permissions": ["read"],
  "expiresAt": "2025-06-01T00:00:00Z",
  "createdAt": "2025-01-01T00:00:00Z"
}
POST/api/v1/surveys/{id}/export/pdf

Generate georeferenced PDF report with templates

Request

{
  "template": "professional",
  "includeElevation": true,
  "includePhotos": true,
  "mapStyle": "satellite",
  "customBranding": {
    "logo": "base64-encoded-logo",
    "companyName": "ACME Corp"
  }
}

Response

{
  "reportId": "pdf_789",
  "downloadUrl": "https://api.roadscope.com/v1/downloads/pdf_789",
  "status": "processing",
  "estimatedTime": 30,
  "georeferenced": true
}
POST/api/v1/webhooks

Register webhook for real-time notifications

Request

{
  "url": "https://your-app.com/webhooks/roadscope",
  "events": [
    "survey.updated",
    "poi.created",
    "route.modified",
    "payment.completed"
  ],
  "secret": "your-webhook-secret"
}

Response

{
  "webhookId": "webhook_123",
  "url": "https://your-app.com/webhooks/roadscope",
  "events": [
    "survey.updated",
    "poi.created",
    "route.modified",
    "payment.completed"
  ],
  "status": "active",
  "createdAt": "2025-01-01T00:00:00Z"
}

Webhooks & Real-time

Webhook Events

RoadScope sends webhooks for real-time updates on surveys, collaboration, payments, and system events.

Survey Events

  • • survey.created
  • • survey.updated
  • • survey.deleted
  • • survey.shared

Data Events

  • • poi.created
  • • poi.updated
  • • route.modified
  • • photo.uploaded

System Events

  • • payment.completed
  • • subscription.updated
  • • user.invited
  • • export.completed

Authentication Methods

Firebase Authentication

Authorization: Bearer firebase-id-token

API Key Authentication

Authorization: Bearer rs_live_1234567890...

SDK Examples

JavaScript

import RoadScopeAPI from '@roadscope/api';

const client = new RoadScopeAPI({
  apiKey: 'your-api-key',
  baseURL: 'https://api.roadscope.com'
});

// Get all surveys
const surveys = await client.surveys.list();

// Create a new POI
const poi = await client.pois.create(surveyId, {
  name: 'Bridge Clearance',
  type: 'Bridge',
  coordinates: {
    latitude: 45.5017,
    longitude: -73.5673
  }
});

Python

import roadscope

client = roadscope.Client(api_key='your-api-key')

# Get all surveys
surveys = client.surveys.list()

# Create a new POI
poi = client.pois.create(
    survey_id='survey_123',
    name='Bridge Clearance',
    type='Bridge',
    coordinates={
        'latitude': 45.5017,
        'longitude': -73.5673
    }
)

cURL

# Get all surveys
curl -H "Authorization: Bearer your-api-key" \
     https://api.roadscope.com/v1/surveys

# Create a new POI
curl -X POST \
     -H "Authorization: Bearer your-api-key" \
     -H "Content-Type: application/json" \
     -d '{"name":"Bridge Clearance","type":"Bridge","coordinates":{"latitude":45.5017,"longitude":-73.5673}}' \
     https://api.roadscope.com/v1/surveys/survey_123/pois

Ready to Start Building?

Get your API key and start integrating RoadScope into your applications today.