Developer Documentation

    Location Intelligence Developer's Guide

    Build location-aware applications with Navixy's comprehensive API. Real-time tracking, geofencing, historical analytics, and seamless integration capabilities.

    Architecture Overview

    Navixy provides a RESTful API with optional WebSocket connections for real-time data streaming. Designed for scale and security.

    Base URL

    https://api.navixy.com/v2

    Format

    JSON request/response over HTTPS. Strict schema validation.

    Authentication

    Session-based with hash token. Secure and expires automatically.

    All API requests require authentication via a session hash obtained through login. This ensures secure access to your fleet data.

    1

    Obtain Session Hash

    bash
    1curl -X POST "https://api.navixy.com/v2/user/auth" \
    2 -H "Content-Type: application/json" \
    3 -d '{"login": "[email protected]", "password": "your_password"}'

    Response

    json
    1{
    2 "success": true,
    3 "hash": "22eac1c27af4be7b9d04da2ce1af111b"
    4}
    2

    Use Hash in Requests

    bash
    1curl -X POST "https://api.navixy.com/v2/tracker/list" \
    2 -H "Content-Type: application/json" \
    3 -d '{"hash": "22eac1c27af4be7b9d04da2ce1af111b"}'

    Security Note: Never expose credentials in client-side code. Use a server-side proxy for web applications to keep your credentials safe.

    Core API Capabilities

    Everything you need to build powerful location-based applications.

    Get current location, speed, and status for all tracked assets. Optimized for high-throughput polling.

    List All Trackers

    bash
    1curl -X POST "https://api.navixy.com/v2/tracker/list" \
    2 -H "Content-Type: application/json" \
    3 -d '{"hash": "YOUR_HASH"}'

    Get Current Location

    bash
    1curl -X POST "https://api.navixy.com/v2/tracker/get_state" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "tracker_id": 123456
    6 }'

    Response Example

    json
    1{
    2 "success": true,
    3 "state": {
    4 "source_id": 123456,
    5 "gps": {
    6 "updated": "2024-01-15T14:30:00Z",
    7 "signal_level": 100,
    8 "location": {
    9 "lat": 40.7128,
    10 "lng": -74.0060
    11 },
    12 "heading": 180,
    13 "speed": 45,
    14 "alt": 10
    15 },
    16 "connection_status": "active",
    17 "movement_status": "moving"
    18 }
    19}

    For applications requiring instant updates, use WebSocket connections instead of polling.

    Connect to WebSocket

    javascript
    1const ws = new WebSocket('wss://ws.navixy.com/events');
    2
    3ws.onopen = () => {
    4 ws.send(JSON.stringify({
    5 action: 'subscribe',
    6 hash: 'YOUR_HASH',
    7 trackers: [123456, 123457]
    8 }));
    9};
    10
    11ws.onmessage = (event) => {
    12 const data = JSON.parse(event.data);
    13 console.log('Location update:', data);
    14 // Handle: tracker_id, lat, lng, speed, heading, timestamp
    15};
    Event Types
    • locationGPS position update
    • stateEngine, ignition changes
    • zoneGeofence entry/exit
    • sensorFuel, temperature readings
    Benefits
    • Sub-second latency
    • No polling overhead
    • Automatic reconnection
    • Battery-efficient for mobile

    Create virtual boundaries and monitor entry/exit events. Supports circular, polygonal, and corridor zones.

    Create a Geofence

    bash
    1curl -X POST "https://api.navixy.com/v2/zone/create" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "zone": {
    6 "label": "Warehouse A",
    7 "type": "polygon",
    8 "color": "#FF5733",
    9 "points": [
    10 {"lat": 40.7128, "lng": -74.0060},
    11 {"lat": 40.7138, "lng": -74.0050},
    12 {"lat": 40.7128, "lng": -74.0040},
    13 {"lat": 40.7118, "lng": -74.0050}
    14 ]
    15 }
    16 }'

    Get Zone Visit History

    bash
    1curl -X POST "https://api.navixy.com/v2/zone/visit/list" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "tracker_id": 123456,
    6 "zone_id": 789,
    7 "from": "2024-01-01T00:00:00Z",
    8 "to": "2024-01-31T23:59:59Z"
    9 }'

    Generate secure, temporary links for customers or partners to track specific assets without account access.

    Create Sharing Link

    bash
    1curl -X POST "https://api.navixy.com/v2/tracker/share/create" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "tracker_id": 123456,
    6 "duration": 3600,
    7 "options": {
    8 "show_speed": true,
    9 "show_address": true,
    10 "show_eta": true
    11 }
    12 }'

    Response

    json
    1{
    2 "success": true,
    3 "link": "https://share.navixy.com/v/abc123xyz",
    4 "expires": "2024-01-15T15:30:00Z"
    5}

    Generate comprehensive analytics reports programmatically for dashboards, billing, and automated workflows.

    Generate Trip Report

    bash
    1curl -X POST "https://api.navixy.com/v2/report/tracker/trips" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "tracker_id": 123456,
    6 "from": "2024-01-01T00:00:00Z",
    7 "to": "2024-01-31T23:59:59Z"
    8 }'
    Available Reports
    trips
    stops
    mileage
    fuel
    driver_journal
    speeding
    Export Formats
    JSONCSVPDFXLSX

    Push real-time event notifications directly to your application endpoints. Ideal for event-driven architectures.

    Configure Webhook

    bash
    1curl -X POST "https://api.navixy.com/v2/data_forward/create" \
    2 -H "Content-Type: application/json" \
    3 -d '{
    4 "hash": "YOUR_HASH",
    5 "forward": {
    6 "type": "webhook",
    7 "url": "https://your-app.com/webhook/navixy",
    8 "events": ["location", "zone_enter", "zone_exit", "sensor"],
    9 "trackers": [123456, 123457]
    10 }
    11 }'

    Incoming Payload Example

    json
    1{
    2 "event": "zone_enter",
    3 "timestamp": "2024-01-15T14:30:00Z",
    4 "tracker_id": 123456,
    5 "zone_id": 789,
    6 "zone_label": "Warehouse A",
    7 "location": {
    8 "lat": 40.7128,
    9 "lng": -74.0060
    10 }
    11}

    Common Integration Patterns

    Accelerate development with proven architectural patterns.

    Fleet Management Dashboard

    Combine real-time tracking with historical analytics

    Key Endpoints

    tracker/listtrack/readhistory/track/readreport/tracker/stats

    Customer Delivery Portal

    Real-time ETA and location sharing for end customers

    Key Endpoints

    link/createtracker/readWebSocket events

    Compliance Reporting System

    Automated regulatory documentation

    Key Endpoints

    report/tracker/tripszone/visit/listhistory/track/read

    Field Service Dispatch

    Assign jobs, track technicians, verify service delivery

    Key Endpoints

    task/createtracker/readzone/visit/listreport/tracker/journal

    Best Practices

    Ensure reliability and performance in your production applications.

    Rate Limiting

    • Default: 60 requests/minute per session
    • Batch operations: 10 requests/minute
    • Implement exponential backoff on 429 responses
    • Use WebSocket for real-time instead of polling

    Session Management

    • Sessions valid for 24 hours of inactivity
    • Store hash securely, don't hardcode
    • Implement session refresh before expiry
    • Clear sessions on user logout

    Error Handling

    • Always check response status
    • Handle authentication errors (status 4)
    • Implement retry logic for network failures
    • Log errors with context for debugging

    Data Efficiency

    • Use pagination for large datasets
    • Request only needed fields when possible
    • Cache static data (device types, zones)
    • Use compressed responses (gzip)

    Ready to Build?

    Get started with our API today. Create a free account to get your API credentials and start integrating in minutes.