Developers and integrations
Getting trip data into a BI tool or data warehouse
Start with CSV exports of trips, stops and summaries, then automate: a nightly job pulls report data from the API as JSON and loads it into tables keyed by device, driver and time.
Ashish Srivastava7 min read

To get fleet data into Power BI or a data warehouse, start with the reports you already read in the portal: trips, stops and daily summaries. Download them as CSV or Excel while you work out which figures matter, then automate: a small scheduled job asks the API's report endpoints for yesterday's rows as JSON and loads them into a table, keyed by device, driver and time. The same tables then sit next to your jobs, invoices and fuel cards in any BI tool.
Key takeaways
- Analysts usually need three tables: trips, stops and a daily summary per vehicle.
- CSV and Excel downloads are the quickest start; they are formatted for people, in your time zone and units.
- For automation, call the report endpoints on a timer and take JSON: instants in UTC, distance in metres, durations in milliseconds.
- Join on the device id, the driver's identifier (where the tracker reports one) and time ranges.
- Data in the warehouse is still personal data: your retention periods and access rules apply there too.
What analysts usually want
Raw positions are rarely what a finance or operations analyst asks for. They want answers that are already shaped like business events, and the reports give exactly that:
- Trips: one row per journey with start and end time, start and end place, distance, average and top speed, duration, the driver where one is recorded, and fuel used where the vehicle reports it.
- Stops: one row per stop with place, arrival and departure, duration and engine hours while standing, which is where idling shows up.
- Summary: one row per vehicle for the period, or with daily rows one per vehicle and day, with distance, moving and idle time, engine hours, and fuel used where the vehicle reports it.
Each report is described on the reports page. Positions and events exist too, for analyses such as time inside a zone or alarm counts, but start with the three tables above and add more only when a question needs them.

The manual start: CSV and Excel exports
Open Reports, choose the devices or a group and the period, and download the trips, stops or summary as CSV or Excel. Excel can hold one sheet, or one sheet per device. These files are ready for people: labelled columns, times in your time zone, distances and speeds in your units, and you choose the columns.
That makes them the right tool for the first weeks. Load a month of trips into Power BI or a spreadsheet, build the measure you actually need (cost per kilometre, jobs per day, idle time per depot) and show it to the people who will use it. Many teams find they need only one or two reports.
Two limits push you towards automation:
- Someone has to remember to run the export, with the same devices and dates each time.
- Formatted files change when someone changes their units, time zone or column choice, which breaks the import on the other side.
Scheduled reports are a middle step: the platform emails a link to a report each time a calendar period ends, for example every night for the previous day. They suit people who read the report; a pipeline is better served by the API.
The automated way: report endpoints on a timer

Every report the portal shows is also an endpoint of the API: GET /api/reports/trips, /stops, /summary, /route and /events, with the devices or groups and a from and to period. Asked for JSON, they return the same rows without formatting, which is what a pipeline wants:
- Times are ISO-8601 instants in UTC.
- Distances are in metres, speeds in knots, durations and engine hours in milliseconds, fuel in litres.
- Field names stay the same whatever a person chose in the portal.
The help article on downloading reports through the API shows the calls with curl, including CSV and Excel through the Accept header if a downstream tool insists on files.
Run it as its own user
Give the job its own user with read rights on devices, positions and events plus report runs, scoped to the vehicles it covers, and the Read-only restriction. Create a token for that user and store it as a secret; the post on API tokens and least privilege explains why and how. Every report run is written to the audit log, so the job's activity is visible under its own name.
Pull a window, not a single day
Trackers that lose coverage store positions and send them later, so yesterday's trips can still change this morning. Ask for a rolling window, for example the last three days, every night, and replace the rows of that window in your table rather than appending. Upsert on the device id and the trip's start time.
Respect what the account keeps
Trips, stops and summaries can only be built while the positions behind them exist, or from the trip archive where your installation keeps one for longer. Pull data well inside your retention period, and don't expect to backfill years that were never kept.
Keys for joining
Tracking rows only become useful when they meet your other data. Plan the joins before you build the pipeline.
| Join to | Use | Watch out for |
|---|---|---|
| Your asset list | deviceId, or the device's unique identifier (usually the IMEI) from the device list |
Device ids are the platform's; keep a mapping table to your fleet numbers |
| Drivers and payroll | The driver's identifier on the trip, where the tracker has a driver ID reader | Without a reader, trips have no driver; join by the vehicle and your own shift or assignment table instead |
| Jobs and tickets | Time ranges: a job's start and end against trips and stops of the same vehicle | Compare in UTC; convert to local time only in the presentation layer |
| Fuel cards | Vehicle and day, against the daily summary | Fuel figures exist only when the vehicle or tracker reports fuel |
Daily summaries are split at midnight in the time zone of the user who runs them. Give the pipeline user the time zone your business reports in, so its days match your finance days.
Private trips need a rule too. If your fleet uses driver privacy, trips driven while a vehicle was private are marked private, carry no addresses and count only as distance. Keep that flag in the warehouse and never try to rebuild those trips from other data.
Personal data in the warehouse
Once trips with driver names land in a warehouse, the warehouse holds personal data about your staff. The duties you have in the tracking platform travel with the data:
- Retention: set a period for the warehouse tables that is no longer than the purpose needs, and delete old rows on a schedule. A warehouse that keeps everything forever undoes the retention settings you chose in the platform.
- Access: give analysts aggregated views (per vehicle, per depot, per week) and keep row-level driver data to the few people who need it.
- Requests: when a driver asks for a copy of their data, or for erasure, the warehouse is one more place to search. Note it in your records of processing.
- Purpose: data collected to plan routes and bill customers is not automatically fair game for judging individual drivers. Agree the uses before you build the dashboards, with employee representatives where they have a say.
A minimal pipeline to begin with
- Choose one question, for example kilometres and moving time per vehicle per day.
- Create the job's user: read-only, a role for devices, positions, events and reports, scoped to the fleet group, in your reporting time zone.
- Create a token for it with an expiry you will renew, and store it in your secret store.
- Write the job: every night, call
GET /api/reports/summarywith the group,daily=trueand the last three days, as JSON. - Load the rows into a staging table, then upsert into a
fleet_dailytable keyed on device and day. - Add a mapping table from device id to your fleet number and cost centre.
- Connect Power BI or your BI tool to
fleet_dailyand build the first report. - Add trips and stops the same way once the first report is in use.
Start small, check the numbers against the portal's own summary for a few vehicles, and extend only when someone asks a new question. If you want alerts rather than tables, for example a ticket when a vehicle leaves a site, look at webhooks and other integrations instead of polling reports.
How Alongpin helps
Alongpin (alongpin.com) is a GPS tracking platform you open in a browser or on your phone. Everything the portal shows is in its REST API, with live positions over a WebSocket, webhooks for alerts, and integrations including an MCP server for AI assistants. Start in the developer overview, or sign up and create an API token in your account.
Frequently asked questions
Can Power BI call the API directly?
It can call a web endpoint, but a small job in between is easier to run: it handles the token, the rolling window and the upserts, and Power BI reads a stable table.
Should I store raw positions?
Only if a question needs them, such as time inside zones that aren't geofences. Positions are many times the volume of trips, and they are the most sensitive data you hold about drivers.
Why do my CSV columns differ from a colleague's?
CSV and Excel downloads follow each user's units, time zone and column choice. Use JSON for anything a machine reads.


