Geofences & Asset Monitoring
The Geofences & Asset Monitoring API enables you to create and manage geographical boundaries (geofences), track asset locations in real-time, configure monitoring rules for geofence events and speeding and idle alerts, and manage trip data with route tracking.
Key Features
- Geofence Management - Create, update, and manage polygon, circular and rectangular geofences
- Asset Tracking - Monitor asset locations with real-time updates and historical tracking
- Event Monitoring - Set up monitors for entry/exit events, speeding alerts, and idle detection
- Trip Management - Track complete journeys with route details, stops, and summaries
The endpoints in this API are designed as building blocks for constructing custom solutions. While the API provides core functionality for geofences, assets, monitors, and trips, you'll need to combine these endpoints with the MagicLane SDK for complete location tracking capabilities.
Key Integration Points:
- API - Manages geofences, monitors, trips, and asset metadata
- SDK - Handles real-time GPS location updates from user devices
How Components Work Together
Data Flow:
- GPS Tracking → SDK sends location updates to Assets API
- Event Detection → Monitors check location against geofences and rules
- Alerts Generated → Events sent to dashboard
- Configuration → Dashboard sets up geofences, monitors, and trips
Location Tracking with SDK
Location tracking must be configured through the MagicLane SDK. The API alone cannot track asset locations - it only manages the metadata and responds to location updates sent by the SDK.
Authentication
All endpoints require authentication using an API key in the Authorization header:
curl -X POST https://api.magiclane.net/api/v1/add_geofence_area \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
See the main introduction guide for details on obtaining your API key.