Automile offers a simple, smart, cutting-edge telematics solution for businesses to track and manage their business vehicles. Automile is a next-gen IoT solution and the overall experience is unmatched. Business of all sizes love to use Automile to get fleet intelligence whether it is understanding driving behavior, recording vehicle defects and expenses, tracking vehicles real time or securing vehicles from un-authorized use.
Automile gives developers a simple way to build services and applications through its unique application program interface (API). Our simple REST based API support more than 400 core features empowering developers to access more data and enabling tighter integration to build apps for the connected ecosystem.
API information can be found at https://api.automile.com. If you need any help, we are here to help. Simply email us at support@automile.com or chat with us.
The latest OpenAPI (fka Swagger) specification may be found at: https://api.automile.com/swagger/docs/v1
😋
This library allows you to quickly and easily use the Automile API via PHP.
This SDK is currently in beta. If you need help:
- Use the Issue Tracker to report bugs or missing functionality in this library.
- Send an email to support@automile.com to request help with our API or your account.
- Java >= 1.8
To install the package via Gradle wrapper, run the following command:
gradlew install
Add installed dependency to your project via Gradle
compile('com.automile:client:1.0.1')
Add installed dependency to your project via Maven
<dependency>
<groupId>com.automile</groupId>
<artifactId>client</artifactId>
<version>1.0.1</version>
</dependency>
First, let's initialize the client.
It's recommended to store the authentication token for futher use, otherwise the client would have to retrieve new token each time upon initialization.
Java should be allowed to read and write into the token storage directory for the client to function properly.
public class Test {
public static void main(String[] args) {
//Using username+pass
AutomileClient cl1 = AutomileClient.builder().
username("username").
password("password").
clientId("clientId").
clientSecret("clientSecret").build();
cl1.authorize();
//Or using stored token data
//authentication token json data
String jsondata = "";//read data from file
AutomileClient cl2 = AutomileClient.builder().build();
cl2.authorize(jsondata);
}
}
If something's not right, please report the issue to the Issue Tracker, and we'll get to it as soon as possible.
Note: Automile is currently accepting username and password authentication for users belonging to private clients you are creating.
- Company
- Company Contact
- Company Vehicle
- Contact
- Contact 3
- Vehicle
- Contact Vehicle
- Expense Report
- Expense Report Row
- Expense Report Row Content
- IMEI Config
- IMEI Event
- Place
- Place 3
- Publish Subscribe
- Report
- Task
- Task Message
- Trigger Message History
- Trigger
- User
- Trip
- User Device
- Vehicle Defect Comment
- Vehicle Defect Type
- Vehicle Geofence
- Geofence
- Geofence2
- Vehicle Health
- Vehicle Inspection
- Vehicle Place
- Organization
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyCreateModel model = new CompanyCreateModel();
cl.createCompany(model);
}
public void test(AutomileClient cl){
cl.getCompanies();
}
public void test(AutomileClient cl){
cl.getCompany(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyEditModel model = new CompanyEditModel();
cl.editCompany(1, model);
}
public void test(AutomileClient cl){
cl.deleteCompany(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyContactCreateModel model = new CompanyContactCreateModel();
cl.createCompanyContact(model);
}
public void test(AutomileClient cl){
cl.getCompanyContacts();
}
public void test(AutomileClient cl){
cl.getCompanyContact(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyContactEditModel model = new CompanyContactEditModel();
cl.editCompanyContact(1, model);
}
public void test(AutomileClient cl){
cl.deleteCompanyContact(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyVehicleCreateModel model = new CompanyVehicleCreateModel();
cl.createCompanyVehicle(model);
}
public void test(AutomileClient cl){
cl.getCompanyVehicles();
}
public void test(AutomileClient cl){
cl.getCompanyVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CompanyVehicleEditModel model = new CompanyVehicleEditModel();
cl.editCompanyVehicle(1, model);
}
public void test(AutomileClient cl){
cl.deleteCompanyVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Contact2CreateModel model = new Contact2CreateModel();
cl.createContact2(model);
}
public void test(AutomileClient cl){
cl.getContacts2();
}
public void test(AutomileClient cl){
cl.getContact2(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Contact2EditModel model = new Contact2EditModel();
cl.editContact2(1, model);
}
public void test(AutomileClient cl){
cl.deleteContact2(1);
}
public void test(AutomileClient cl){
cl.getContact2Me();
}
public void test(AutomileClient cl){
cl.getContact2MeImage();
}
public void test(AutomileClient cl, byte[] data){
cl.editContact2UploadImage(data);
}
public void test(AutomileClient cl){
cl.editContact2RemoveImage();
}
public void test(AutomileClient cl){
cl.editContact2MeUpdateDefaultVehicle(1);
//or
cl.editContact2UpdateDefaultVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CustomCategoryPostModel model = new CustomCategoryPostModel();
cl.editContact2CustomCategories(1, model);
}
public void test(AutomileClient cl){
cl.getContacts2CustomCategory(1, 1);
}
public void test(AutomileClient cl){
cl.getContacts2CustomCategories(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Contact3CreateModel model = new Contact3CreateModel();
cl.createContact3(model);
}
public void test(AutomileClient cl){
cl.getContacts3();
}
public void test(AutomileClient cl){
cl.getContact3(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Contact3EditModel model = new Contact3EditModel();
cl.editContact3(1, model);
}
public void test(AutomileClient cl){
cl.deleteContact3(1);
}
public void test(AutomileClient cl){
cl.getContact3Me();
}
public void test(AutomileClient cl){
cl.getContact3MeImage();
}
public void test(AutomileClient cl, byte[] data){
cl.editContact3UploadImage(data);
}
public void test(AutomileClient cl){
cl.editContact3RemoveImage();
}
public void test(AutomileClient cl){
cl.editContact3MeUpdateDefaultVehicle(1);
//or
cl.editContact3UpdateDefaultVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
CustomCategoryPostModel model = new CustomCategoryPostModel();
cl.editContact3CustomCategories(1, model);
}
public void test(AutomileClient cl){
cl.getContacts3CustomCategory(1, 1);
}
public void test(AutomileClient cl){
cl.getContacts3CustomCategories(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Vehicle2CreateModel model = new Vehicle2CreateModel();
cl.createVehicle2(model);
}
public void test(AutomileClient cl){
cl.getVehicles2();
}
public void test(AutomileClient cl){
cl.getVehicle2(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Vehicle2EditModel model = new Vehicle2EditModel();
cl.editVehicle2(1, model);
}
public void test(AutomileClient cl){
cl.deleteVehicle2(1);
}
public void test(AutomileClient cl){
cl.getVehicle2VehicleInformation("identifier", 1);
}
public void test(AutomileClient cl){
cl.getVehicles2Status();
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleCheckInModel model = new VehicleCheckInModel();
cl.editVehicle2Checkin(model);
}
public void test(AutomileClient cl){
cl.editVehicle2Checkout();
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ContactVehicleDetailModel model = new ContactVehicleDetailModel();
cl.createContactVehicle(model);
}
public void test(AutomileClient cl){
cl.getContactVehicles();
}
public void test(AutomileClient cl){
cl.getContactVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ContactVehicleEditModel model = new ContactVehicleEditModel();
cl.editContactVehicle(1, model);
}
public void test(AutomileClient cl){
cl.deleteContactVehicle(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportCreateModel model = new ExpenseReportCreateModel();
cl.createExpenseReport(model);
}
public void test(AutomileClient cl){
cl.getExpenseReports(1, 1);
}
public void test(AutomileClient cl){
cl.getExpenseReport(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportEditModel model = new ExpenseReportEditModel();
cl.editExpenseReport(1, model);
}
public void test(AutomileClient cl){
cl.deleteExpenseReport(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
EmailExpenseReportModel model = new EmailExpenseReportModel();
cl.emailExpenseReportExport(1, model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
EmailExpenseReportsModel model = new EmailExpenseReportsModel();
cl.emailExpenseReportsExport(model);
}
public void test(AutomileClient cl){
cl.deleteExpenseReportRows(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
OCRRequest model = new OCRRequest();
cl.createExpenseReportOCR(model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportRowModel model = new ExpenseReportRowModel();
cl.createExpenseReportRow(model);
}
public void test(AutomileClient cl){
cl.getExpenseReportRow(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportRowEditModel model = new ExpenseReportRowEditModel();
cl.editExpenseReportRow(1, model);
}
public void test(AutomileClient cl){
cl.deleteExpenseReportRow(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportRowContentCreateModel model = new ExpenseReportRowContentCreateModel();
cl.createExpenseReportRowContent(model);
}
public void test(AutomileClient cl){
cl.getExpenseReportRowContents(1);
}
public void test(AutomileClient cl){
cl.getExpenseReporRowContent(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ExpenseReportRowContentEditModel model = new ExpenseReportRowContentEditModel();
cl.editExpenseReportRowContent(1, model);
}
public void test(AutomileClient cl){
cl.deleteExpenseReport(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
IMEIConfigCreateModel model = new IMEIConfigCreateModel();
cl.createIMEIConfig(model);
}
public void test(AutomileClient cl){
cl.getIMEIConfigs(true);
}
public void test(AutomileClient cl){
cl.getIMEIConfig(1, true);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
IMEIConfigEditModel model = new IMEIConfigEditModel();
cl.editIMEIConfig(1, model);
}
public void test(AutomileClient cl){
cl.deleteIMEIConfig(1);
}
public void test(AutomileClient cl){
cl.getIMEIEvents();
}
public void test(AutomileClient cl){
cl.getMILIMEIEvent(1);
}
public void test(AutomileClient cl){
cl.getDTCIMEIEvent(1);
}
public void test(AutomileClient cl){
cl.getIMEIEventStatus(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Place2CreateModel model = new Place2CreateModel();
cl.createPlace2(model);
}
public void test(AutomileClient cl){
cl.getPlaces();
}
public void test(AutomileClient cl){
cl.getPlace(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Place2EditModel model = new Place2EditModel();
cl.editPlace2(1, model);
}
public void test(AutomileClient cl){
cl.deletePlace(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Place3CreateModel model = new Place3CreateModel();
cl.createPlace3(model);
}
public void test(AutomileClient cl){
cl.getPlaces3();
}
public void test(AutomileClient cl){
cl.getPlace3(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
Place3EditModel model = new Place3EditModel();
cl.editPlace3(1, model);
}
public void test(AutomileClient cl){
cl.deletePlace3(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
PublishSubscribeCreateModel model = new PublishSubscribeCreateModel();
cl.createPublishSubscribe(model);
}
public void test(AutomileClient cl){
cl.getPublishSubscribes();
}
public void test(AutomileClient cl){
cl.getPublishSubscribe(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
PublishSubscribeEditModel model = new PublishSubscribeEditModel();
cl.editPublishSubscribe(1, model);
}
public void test(AutomileClient cl){
cl.deletePublishSubscribe(1);
}
public void test(AutomileClient cl){
cl.testTripStart(1, 1);
}
public void test(AutomileClient cl){
cl.testTripEnd(1, 1);
}
public void test(AutomileClient cl){
cl.testVehicleCreated(1, 1);
}
public void test(AutomileClient cl){
cl.testVehicleModified(1, 1);
}
public void test(AutomileClient cl){
cl.testContactCreated(1, 1);
}
public void test(AutomileClient cl){
cl.testContactModified(1, 1);
}
public void test(AutomileClient cl){
cl.getReportsTripSummary("dateperiod");
}
public void test(AutomileClient cl){
cl.getReportsTripSummary("dateperiod", 1);
}
public void test(AutomileClient cl){
cl.getReportsVehiclesSummary("dateperiod");
}
public void test(AutomileClient cl){
cl.getReportVehicleSummary("dateperiod", 1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
EmailTripReportModel model = new EmailTripReportModel();
cl.emailTripReport(1, model);
}
public void test(AutomileClient cl){
cl.geofenceLogReport(1, 1, LocalDateTime.now(), LocalDateTime.now(), true);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TaskCreateModel model = new TaskCreateModel();
cl.createTask(model);
}
public void test(AutomileClient cl){
cl.getTasks();
}
public void test(AutomileClient cl){
cl.getTask(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TaskEditModel model = new TaskEditModel();
cl.editTask(1, model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TaskMessageModel model = new TaskMessageModel();
cl.createTaskMessage(model);
}
public void test(AutomileClient cl){
cl.getTaskMessage(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TaskMessageEditModel model = new TaskMessageEditModel();
cl.editTaskMessage(1, model);
}
public void test(AutomileClient cl){
cl.getTriggerMessageHistories();
}
public void test(AutomileClient cl){
cl.getTriggerMessageHistories(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TriggerCreateModel model = new TriggerCreateModel();
cl.createTrigger(model);
}
public void test(AutomileClient cl){
cl.getTriggers();
}
public void test(AutomileClient cl){
cl.getTrigger(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TriggerEditModel model = new TriggerEditModel();
cl.editTrigger(1, model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TriggerEditMutedUntilModel model = new TriggerEditMutedUntilModel();
cl.editTriggerMute(1, model);
}
public void test(AutomileClient cl){
cl.editTriggerUnmute(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
MovePushTriggers model = new MovePushTriggers();
cl.editTriggerMovePush(model);
}
public void test(AutomileClient cl){
cl.deleteTrigger(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ChangePasswordModel model = new ChangePasswordModel();
cl.editUserChangePassword(model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ChangeUserNameModel model = new ChangeUserNameModel();
cl.editUserChangeUsername(model);
}
public void test(AutomileClient cl){
cl.getUser();
}
public void test(AutomileClient cl){
cl.getUserExistingPassword();
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
ResetPasswordUserModel model = new ResetPasswordUserModel();
cl.editUserResetPassword(model);
}
public void test(AutomileClient cl){
cl.getTrips(1, 1, true);
}
public void test(AutomileClient cl){
cl.getTrip(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TripEditModel model = new TripEditModel();
cl.editTrip(1, model);
}
public void test(AutomileClient cl){
cl.getTripGeoStartEnd(1);
}
public void test(AutomileClient cl){
cl.getTripSpeed(1);
}
public void test(AutomileClient cl){
cl.getTripRPM(1);
}
public void test(AutomileClient cl){
cl.getTripAmbientTemperature(1);
}
public void test(AutomileClient cl){
cl.getTripFuelLevelInput(1);
}
public void test(AutomileClient cl){
cl.getTripEngineCoolantTemperature(1);
}
public void test(AutomileClient cl){
cl.getTripPID(1);
}
public void test(AutomileClient cl){
cl.getTripGeo(1, false, 1);
}
public void test(AutomileClient cl){
cl.getTripGoogleUrlToStaticMapEncodedPolyline(1, 1, 1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TripAddNoteModel model = new TripAddNoteModel();
cl.editTripAddNotesToLastTrip(1, model);
}
public void test(AutomileClient cl){
cl.editTripSetDriverOnTrip(1, 1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
TripSynchronized model = new TripSynchronized();
cl.editTripSynchronized(1, model);
}
public void test(AutomileClient cl){
cl.getTripDetails(1);
}
Get the advanced details about the trip including driving events, speeding, idling, speed and rpm data series
public void test(AutomileClient cl){
cl.getTripAdvanced(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
UserDeviceCreateModel model = new UserDeviceCreateModel();
cl.createUserDevice(model);
}
public void test(AutomileClient cl){
cl.getUserDevices();
}
public void test(AutomileClient cl){
cl.getUserDevice(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
UserDeviceEditModel model = new UserDeviceEditModel();
cl.editUserDevice(1, model);
}
public void test(AutomileClient cl){
cl.deleteUserDevice(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleDefectCommentsCreateModel model = new VehicleDefectCommentsCreateModel();
cl.createVehicleDefectComment(model);
}
public void test(AutomileClient cl){
cl.getVehicleDefectComments();
}
public void test(AutomileClient cl){
cl.getVehicleDefectComment(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleDefectCommentsEditModel model = new VehicleDefectCommentsEditModel();
cl.editVehicleDefectComment(1, model);
}
public void test(AutomileClient cl){
cl.getVehicleDefectTypes();
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleGeofenceCreateModel model = new VehicleGeofenceCreateModel();
cl.createVehicleGeofence(model);
}
public void test(AutomileClient cl){
cl.getVehicleGeofences(1);
}
public void test(AutomileClient cl){
cl.getVehicleGeofence(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleGeofenceEditModel model = new VehicleGeofenceEditModel();
cl.editVehicleGeofence(1, model);
}
public void test(AutomileClient cl){
cl.deleteVehicleGeofence(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
GeofenceCreateModel model = new GeofenceCreateModel();
cl.createGeofence(model);
}
public void test(AutomileClient cl){
cl.getGeofences();
}
public void test(AutomileClient cl){
cl.getGeofence(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
GeofenceEditModel model = new GeofenceEditModel();
cl.editGeofence(1, model);
}
public void test(AutomileClient cl){
cl.deleteGeofence(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
GeofenceCreate2Model model = new GeofenceCreate2Model();
cl.createGeofence2(model);
}
public void test(AutomileClient cl){
cl.getGeofences2();
}
public void test(AutomileClient cl){
cl.getGeofence2(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
GeofenceEditModel2 model = new GeofenceEditModel2();
cl.editGeofence2(1, model);
}
public void test(AutomileClient cl){
cl.deleteGeofence2(1);
}
public void test(AutomileClient cl){
cl.getVehicleHealth(1);
}
public void test(AutomileClient cl){
cl.getVehicleHealth(1, "datePeriod");
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleInspectionCreateModel model = new VehicleInspectionCreateModel();
cl.createVehicleInspection(model);
}
public void test(AutomileClient cl){
cl.getVehicleInspections(1, 1, LocalDateTime.now(), LocalDateTime.now(), true);
}
public void test(AutomileClient cl){
cl.getVehicleInspection(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleInspectionExportModel model = new VehicleInspectionExportModel();
cl.emailVehicleInspectionExport(1, model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehicleInspectionEditModel model = new VehicleInspectionEditModel();
cl.editVehicleInspection(1, model);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehiclePlaceCreateModel model = new VehiclePlaceCreateModel();
cl.createVehiclePlace(model);
}
public void test(AutomileClient cl){
cl.getVehiclePlaces(1);
}
public void test(AutomileClient cl){
cl.getVehiclePlace(1);
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
VehiclePlaceEditModel model = new VehiclePlaceEditModel();
cl.editVehiclePlace(1, model);
}
public void test(AutomileClient cl){
cl.deleteVehiclePlace(1);
}
public void test(AutomileClient cl){
cl.getOrganization();
}
public void test(AutomileClient cl){
//init model and set fields using model.setXXX
OrganizationEditModel model = new OrganizationEditModel();
cl.editOrganization(1, model);
}
public void test(AutomileClient cl){
cl.getOrganizationHierarchy();
}