Upload Csv Import
POST/api/v1/devices/locations/import
Upload CSV file for bulk location import.
This endpoint accepts a CSV file with location data and queues it for async processing. Useful for customer migrations or bulk historical data imports.
Authentication: JWT token required Max File Size: 50 MB Max Rows: 500,000
CSV Format:
device_id,ts,lat,lon,accuracy_m,speed_mps,heading_deg,meta_driver
truck-005,2025-10-01T14:12:03Z,42.651,-73.756,9.2,12.4,180,alice
truck-006,2025-10-01T14:13:00Z,42.652,-73.757,8.5,15.0,175,bob
Required Columns:
device_id: Unique device identifierts: ISO-8601 timestamplat: Latitude (-90 to 90)lon: Longitude (-180 to 180)
Optional Columns:
accuracy_m: GPS accuracy in metersspeed_mps: Speed in meters per secondheading_deg: Heading in degrees (0-359)meta_*: Metadata columns (e.g., meta_driver, meta_cargo)
Validation Rules:
- Rejects entire import if >1% rows are invalid
- Rejects timestamps > 5 minutes in the future
- Warns for timestamps > 30 days old
PRD Reference: §3.1.2 CSV Import Schema Roadmap: Phase 2, Task 2.2
Request
Responses
- 200
- 400
OK
Bad Request