API
Our web services API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. JSON will be returned in all responses from the API, including errors.
Authentication
You authenticate to the API by including an API key in each request. Your account's API key is unique and should be kept secret.
To obtain your account's API key, sign into HQ and visit your Account > Info page. Your API key is at the bottom-left of the page. Clicking Re-key will generate a new API key for your account and disable the previously-generated API key.
Usage
To use the API, send a GET request to https://my.gpspolice.com/hq/api/v1 that includes your API key along with what data you would like returned. For example, if you wanted to see the current status and location of all the vehicles or assets in your account, you would call:
https://my.gpspolice.com/hq/api/v1/API_KEY/assets
What is returned is a JSON document containing an array of objects, with each object describing a vehicle:
To get the same details for a single vehicle, include its ID:
https://my.gpspolice.com/hq/api/v1/API_KEY/assets/1234
To get a list of drivers or places:
https://my.gpspolice.com/hq/api/v1/API_KEY/drivers https://my.gpspolice.com/hq/api/v1/API_KEY/places
Rate limit
To ensure our web services API remains fast and responsive for all users, please avoid sending requests more often once every 15 seconds.
In conclusion
As you can see, our web services API is pretty simple and (we hope) easy to use. We plan to expand its features in the future, but for now please try it out and let us know what you think!