API and integrations

Using existing tracking apps and scripts with the compatible API

Alongpin serves the REST API of the widely used open-source GPS tracking server with the same paths and JSON, so existing clients keep working. What to point where, how to sign in, what behaves differently and what the platform adds.

Ashish Srivastava4 min read

A developer carries a cardboard box with cables and a small tracker into a sunny new office, a laptop waiting on the empty desk

Alongpin's compatible GPS tracking API serves the REST API of the widely used open-source GPS tracking server, with the same paths, parameters and JSON. Apps and scripts written for that server keep working: point them at your Alongpin address, sign in with your account or an API token, and test with one device before you move everything. On top of the shared API, the platform adds its own endpoints for care profiles, the idle report and subscriptions.

Key takeaways

  • Same paths under /api, same JSON shapes, the same /api/socket WebSocket.
  • Sign in with email and password, HTTP Basic (without two-factor) or a bearer token.
  • A few behaviours are stricter, sharing above all: shared objects are read-only.
  • Try one device and one user first, compare the results, then move the rest.

Point the client at your server address

Clients of that API take a server address and add the paths themselves. Enter your Alongpin address, for example https://YOUR_HOST; the API answers under /api/... and the live socket at /api/socket, exactly where the client expects them.

Phone apps that send their own position are a different case: they talk to the device port, not to the API. An app that reports over the OsmAnd protocol uses its port (5055 in a standard setup; use the one Set up the tracker shows for your device). The device connection guide lists the ports per protocol.

Sign in with your account or a token

The same ways in work as before:

  • Email and password with POST /api/session, which sets a session cookie. Accounts with two-factor sign-in send the one-time code as well.
  • HTTP Basic on each request, for accounts without two-factor sign-in.
  • A bearer token, created under Settings → Your account → Password and two-factor or with POST /api/session/token; on GET requests it may also go in the address as ?token=.

For anything that runs unattended, create a separate user with a narrow role and use its token. Sessions last 24 hours while unused, and a live socket closes when the token it was opened with expires, so long-running clients should be ready to sign in again.

What works unchanged

  • Devices and groups: list, add, change, delete, with limit, offset, keyword and excludeAttributes.
  • Positions: the latest of each device, history by period, and exports as CSV, GPX, KML or KMZ.
  • Reports: route, trips, stops, summary, events, geofences and combined, as JSON or Excel.
  • Commands: the command types per device, sending and saved commands.
  • Geofences, alert rules, drivers, maintenance, calendars and share links.
  • The live socket: a snapshot, then positions, devices and events.

The API reference lists every endpoint with the right it needs.

The Devices list in the portal with vehicles, their status and when each last reported
The devices a client lists through the API are the ones in the portal’s device list, with the same names and status.

What behaves differently

A few rules are stricter or richer, and a client may notice:

  • Sharing is read-only. A device shared with you can be seen, not changed; changing it takes its owner, an administrator or a role grant. Expect 403 where the other server allowed the change.
  • Read-only users change only their password, two-factor key and preferences, and cannot create share links.
  • Commands to an offline device answer 202 and are queued until it reconnects; 200 means delivered.
  • Device limits count the devices a user owns, and new users have no limit unless one is set.
  • CSV and Excel reports are formatted for people by default, in the user's units and time zone.
  • The geofence report also lists a stay already in progress at the start of the period, or not yet left at its end.
  • Scheduled reports are emailed as a link to the report rather than as an attachment.

What is added

The platform's own endpoints sit beside the shared ones and change none of them:

  • care profiles for pets and elders, with contacts, health records, reminders and care alerts (/api/care);
  • an idle report (/api/reports/idle) and a wellness report (/api/reports/wellness);
  • subscriptions, invoices and payments (/api/billing);
  • the command queue and history of a device, the notification delivery log, and share links you can list and revoke one by one;
  • read-only tools for AI assistants, when an administrator enables them; see integrations.

Test with one device before moving everything

  1. Create a test user with a narrow role and one device, and make a token for it.
  2. Point the client or script at your address and run the calls it relies on: list devices, read a day of positions, run one report.
  3. Compare the answers with what the portal shows for the same device and day.
  4. Try what writes: an edit, a command, an alert rule. A 403 there usually means the sharing or role rules above.
  5. Then move the other devices and users, a group at a time.

Frequently asked questions

Can I keep using the other server's own web app?

The platform's web interface is the Alongpin portal. Clients that only use the API keep working against it.

Do I have to rewrite my scripts?

Usually not. Change the address and the credentials, and check the differences above against what your script does.

API and integrations

Downloading reports through the API

How to run the same reports as the portal from a script and receive JSON, CSV or Excel, with devices, groups and the period as parameters, the time zone and units of the token’s user, and long periods split into pieces.

Ashish Srivastava4 min read

API and integrations

Connecting an AI assistant through the MCP server

Where the administrator has switched it on, an AI assistant can read your fleet data through the MCP endpoint with your own token and rights. How to check it is on, create a token, connect the assistant, and what it can and cannot read.

Ashish Srivastava3 min read

Put your first device on the map today

Book a demo if you would rather see it with your own use case first. Choose a package in the portal; you see the first invoice before you confirm.

Chat with us