Skip to main content

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.

Client SDKs Overview

Bookovia provides official client SDKs for 8 different platforms and programming languages, making it easy to integrate telematics functionality into your applications. All SDKs are maintained by our engineering team and provide the same comprehensive feature set.

Available SDKs

Go SDK

Perfect for: Backend services, microservices, enterprise systems
  • Full type safety with structs
  • Context support for cancellation
  • Built-in retry logic and connection pooling
  • Production-ready with comprehensive error handling

JavaScript SDK

Perfect for: Web applications, Node.js backends
  • Universal (browser + Node.js) compatibility
  • Promise-based API with async/await
  • Automatic request/response transformation
  • TypeScript definitions included

TypeScript SDK

Perfect for: Type-safe web applications
  • Full TypeScript support with strict typing
  • Auto-generated types from API schema
  • Compile-time error checking
  • Modern ESM and CommonJS support

Python SDK

Perfect for: Data analytics, ML pipelines, automation
  • Pythonic API design with type hints
  • AsyncIO support for concurrent operations
  • Pandas integration for data analysis
  • Built-in data validation with Pydantic

Android SDK

Perfect for: Native Android applications
  • Native Kotlin implementation
  • Coroutines support for async operations
  • Room database integration for offline support
  • Background location tracking

iOS SDK

Perfect for: Native iOS applications
  • Swift 5.7+ with async/await support
  • Combine framework integration
  • Core Data integration for offline support
  • Background location tracking

Flutter SDK

Perfect for: Cross-platform mobile development
  • Dart implementation with null safety
  • Flutter 3.0+ compatibility
  • Platform-specific optimizations
  • Built-in state management integration

React Native SDK

Perfect for: Cross-platform React Native apps
  • TypeScript-first implementation
  • React Native 0.70+ compatibility
  • React hooks for state management
  • Native module integration

Quick Comparison

FeatureGoJSTSPythonAndroidiOSFlutterRN
Type Safety⚠️⚠️
Async/Await
Offline Support
Real-time Streaming
Background Processing⚠️⚠️
Auto Retry
Request Caching
Legend: ✅ Full Support | ⚠️ Partial Support | ❌ Not Available

Common Patterns

All SDKs follow consistent design patterns for a uniform developer experience:

Client Initialization

import Bookovia from '@bookovia/javascript-sdk';

const client = new Bookovia('bkv_test_your_api_key', {
  baseUrl: 'https://api.bookovia.com/v1',
  timeout: 30000,
  retryCount: 3
});

Trip Management

// Start a trip
const trip = await client.trips.start({
  vehicleId: 'vehicle_123',
  driverId: 'driver_456',
  metadata: { purpose: 'delivery' }
});

// Stop the trip
await client.trips.stop(trip.tripId, {
  endLocation: { latitude: 40.7589, longitude: -73.9851 }
});

Location Data Upload

// Batch upload
await client.locations.batchUpload({
  tripId: 'trip_123',
  locations: [
    {
      latitude: 40.7128,
      longitude: -74.0060,
      timestamp: '2024-04-13T10:30:00Z',
      speed: 35,
      heading: 180
    }
  ]
});

Error Handling

try {
  const trip = await client.trips.start({vehicleId: 'vehicle_123'});
} catch (error) {
  if (error instanceof Bookovia.AuthenticationError) {
    // Handle auth issues
  } else if (error instanceof Bookovia.RateLimitError) {
    // Handle rate limiting
  } else if (error instanceof Bookovia.ValidationError) {
    // Handle validation errors
  }
}

Installation Guide

Server-Side SDKs

go get github.com/bookovia/go-sdk
Requires Go 1.19 or later
pip install bookovia
Requires Python 3.8 or later
npm install @bookovia/javascript-sdk
# or
yarn add @bookovia/javascript-sdk
Works with Node.js 16+ and modern browsers
npm install @bookovia/typescript-sdk
# or  
yarn add @bookovia/typescript-sdk
Requires TypeScript 4.5+ and Node.js 16+

Mobile SDKs

Add to your build.gradle:
dependencies {
    implementation 'com.bookovia:android-sdk:2.1.0'
}
Requires Android API level 21+ (Android 5.0)
Swift Package Manager:
https://github.com/bookovia/ios-sdk.git
CocoaPods:
pod 'BookoviaSDK', '~> 2.1.0'
Requires iOS 13.0+ or macOS 10.15+
Add to your pubspec.yaml:
dependencies:
  bookovia: ^2.1.0
Then run:
flutter pub get
Requires Flutter 3.0+ and Dart 2.18+
npm install @bookovia/react-native-sdk
# or
yarn add @bookovia/react-native-sdk
iOS (CocoaPods):
cd ios && pod install
Requires React Native 0.70+

Configuration Options

All SDKs support consistent configuration options:

Basic Configuration

const client = new Bookovia('api_key', {
  // Base API URL (default: https://api.bookovia.com/v1)
  baseUrl: 'https://api.bookovia.com/v1',
  
  // Request timeout in milliseconds (default: 30000)
  timeout: 30000,
  
  // Maximum retry attempts (default: 3)
  maxRetries: 3,
  
  // Retry delay multiplier (default: 1000ms)
  retryDelay: 1000,
  
  // Enable debug logging (default: false)
  debug: false,
  
  // Custom user agent string
  userAgent: 'MyApp/1.0.0'
});

Advanced Configuration

const client = new Bookovia('api_key', {
  // Custom HTTP headers for all requests
  defaultHeaders: {
    'X-Custom-Header': 'value'
  },
  
  // Request interceptors
  requestInterceptor: (config) => {
    // Modify request before sending
    return config;
  },
  
  // Response interceptors  
  responseInterceptor: (response) => {
    // Process response before returning
    return response;
  },
  
  // Custom retry logic
  retryCondition: (error) => {
    return error.status >= 500 || error.code === 'NETWORK_ERROR';
  },
  
  // Connection pooling (server-side SDKs)
  connectionPool: {
    maxConnections: 100,
    keepAlive: true,
    timeout: 30000
  }
});

Features Comparison

Core API Coverage

All SDKs provide complete coverage of the Bookovia API:
  • Trip Management - Start, stop, pause, resume trips
  • Location Data - Single and batch location uploads
  • Safety Analytics - Safety scores, events, behavior analysis
  • Fleet Management - Vehicle and driver management
  • Real-time Streaming - WebSocket connections for live data
  • Device Management - Device registration and configuration
  • Emergency Features - Crash detection and incident reporting

Platform-Specific Features

FeatureMobile SDKsServer SDKsWeb SDKs
Background Location
Offline Data Storage⚠️
Push Notifications⚠️
High Throughput⚠️
Connection Pooling
File Upload/Download

Best Practices

Performance

  • Reuse client instances across your application
  • Configure appropriate timeouts for your use case
  • Use connection pooling for high-throughput applications
  • Enable compression for large payloads
  • Implement exponential backoff for rate limits
  • Handle network connectivity issues gracefully
  • Log errors with correlation IDs for debugging
  • Provide fallback mechanisms for critical operations
  • Batch location uploads for efficiency
  • Implement proper data validation before API calls
  • Cache frequently accessed data locally
  • Use pagination for large data sets

Security

  • Store API keys securely (environment variables, key vaults)
  • Never hardcode keys in source code
  • Use separate keys for different environments
  • Rotate keys regularly (90-day recommended cycle)
  • Enable SSL/TLS for all API communications
  • Validate data before transmission
  • Implement proper access controls
  • Log security events for monitoring

Migration Guide

From REST API to SDKs

If you’re currently using direct REST API calls:
const response = await fetch('https://api.bookovia.com/v1/trips/start', {
  method: 'POST',
  headers: {
    'X-API-Key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    vehicle_id: 'vehicle_123',
    driver_id: 'driver_456'
  })
});

const trip = await response.json();

Between SDK Versions

Major version upgrades may include breaking changes. See individual SDK changelogs for migration guides.

Support & Community

Documentation

  • API Reference: Complete documentation for each SDK method
  • Examples: Real-world usage examples and patterns
  • Tutorials: Step-by-step integration guides
  • Best Practices: Performance and security recommendations

Getting Help

GitHub Issues

Report bugs and request features for any SDK

Community Slack

Get help from other developers and our team

Email Support

Direct support for SDK-related questions

Stack Overflow

Ask questions with the bookovia tag

Contributing

We welcome contributions to our SDKs! Each SDK repository includes:
  • Contributing guidelines
  • Development setup instructions
  • Testing procedures
  • Code style guides

Development Workflow

  1. Fork the SDK repository
  2. Create a feature branch
  3. Implement your changes with tests
  4. Submit a pull request with description
  5. Collaborate with maintainers on review

Next Steps

Choose Your SDK

Select and install the SDK for your platform

Quick Start

Follow our quickstart guide with SDK examples

API Reference

Explore the complete API documentation

Integration Examples

See real-world integration patterns and examples

Ready to integrate? Pick your SDK and start building with the most comprehensive telematics API platform.