Fleet-Up // API
Fleet-Up API // Getting Started
The basic concepts of the API are explained below. Once the basics are understood, a list of methods can be found on the endpoints area. Please also review the permissions and response codes ares.
The Fleet-Up API is a RESTful web service and most of the data handled is in JSON format. It is assumed that users of the API are familar with these two concepts.
Apps and ApiKeys
Before developing for the API you will require two things;
  1. An "AppKey", which you can obtain by creating an app
  2. A "UserId" / "ApiCode" combination, which you can obtain by creating an API key for your app
Please note that Fleet-Up API keys are bound to a specific app when they are generated. This means you cannot use an API key from one app against another for security purposes.
Requirements and Flow
The diagram below shows how the different parts of a Fleet-Up Api integration fit together. At the bottom of the diagram you have the Fleet-Up application and Api, where App and ApiKeys are registered and Api calls are made to. Towards the top-left you have the developer, their app, and the usage of their generated AppKey. Finally, towards the right you have an end user and the role their UserId and ApiKey play in the flow.
Request Format
Requests are made to the API using a URI derived from the app key, the user's API key and code, plus the required method and filters. An example URI format to obtain a list of groups the user is a member of is displayed and explained below.
Syntax: http://api.fleet-up.com/Api.svc/{AppKey}/{UserId}/{ApiCode}/{Method}
GET: http://api.fleet-up.com/Api.svc/3xampl3App/12345/G5hdw34hSDhehdFD/MyGroupMemberships
  • http://api.fleet-up.com/Api.svc/ - The root part of all API URIs.
  • {AppKey} - The AppKey parameter is the private app identifier key that is obtained when registering an app on Fleet-Up. You should keep your app's AppKey secret for security.
  • {UserId} - The UserId parameter uniquely identifies the user accessing the API and is obtain from the user API key page by creating an API key. The UserId is not considered secret, however, the ApiCode below is.
  • {ApiCode} - The ApiCode parameter proves the authentication of the supplied UserId and is obtained from the user API key page by creating an API key. It is important to keep ApiCodes secret.
  • /MyGroupMemberships - The "/MyGroupMemberships" or "{Method}" part of the URI above is the endpoint reference or method. Visit the endpoints page to learn more.
Response Format
Responses are always in JSON format and always follow the same common layout as explained below. It is recommended to pay attention to both the HTTP status code returned from the API as well as the response code and message contained within the response itself. If you get a dreaded "400 - Bad Request" back you can see why it occured by examining the response data message and code.
An example response is displayed and explained below.
{ "Success": true, "Message": "Success", "CachedUntilUTC": "\/Date(1446890981353)\/", "CachedUntilString": "2015-11-07 10:09:41", "Code": 0, "Data": [{ "UserId": 99999, "GroupId": 12345, "DisplayName": "Example User", "GroupName": "Example Group", "GroupType": "Pro", "MembershipType": "Member", "CanPostOps": false, "Approved": true, "LastActive": "\/Date(1421800913463)\/", "Joined": "\/Date(1369751712987)\/" }, { "UserId": 99999, "GroupId": 12346, "DisplayName": "Example User", "GroupName": "My Group", "GroupType": "Free", "MembershipType": "Creator", "CanPostOps": true, "Approved": true, "LastActive": "\/Date(1421800913463)\/", "Joined": "\/Date(1389570109957)\/" }] }
  • Success ~ boolean ~ Returns true/false to indicate if the request worked or errored.
  • Message ~ string ~ A specific message explaining any error details or similar. Useful if diagnosing an issue.
  • CachedUntilUTC ~ date ~ Date and time informing how long the response should be cached for. Please respect these dates.
  • Code ~ integer ~ A generic and proprietary reponse code to allow your app to handle exceptions gracefully.
  • Data ~ object/anonymous ~ The actual data is stored here and will vary depending on the endpoint used.