The transfer of data collected by the SDK as well as driving indicators to a client server is a common need for users of the DriveQuant platform.
The information provided can be used for additional data processing, for archiving in databases or to display information on websites.
This is why DriveQuant offers the possibility to retrieve all the driving data collected by the mobile SDKs as well as all the driving indicators that result from our analyses. This is the purpose of the Push Data service.
Principle
The Push Data service sends the trip results after it is completed and analyzed. The process is described below.
When the trip recording's started (manually or automatically), DriveQuant's mobile SDK saves GPS data locally on the user's phone.
When the driver has finished his trip, the SDK automatically stops recording and requests the trip analysis service hosted on the DriveQuant's platform.
At the end of the processing, which takes about 2 seconds, the results (driving scores and indicators) are returned to the SDK and can be displayed in the driver's mobile application.
Finally, trip data (GPS variables recorded by the smartphone's sensors, driving scores and indicators) are sent to your server.
The body of the request is a JSON object with a set of fields that contain the driving scores organized by categories and the raw data collected on the user smartphone stored in tables. An example of data in JSON format is given at the end of this section.
Your service should respond with a 2xx http status code (typically 200 OK) when the push request is accepted. Any other code will be considered as a failure, and the service will attempt to send the data again as defined in the Retry Policy section.
If your service responds with a 2xx http status code, while the data has not been accepted by your platform, then there will be no further attempt to send the data!
Retry Policy
Every push request not successfully acknowledged by your service will be retried once a day. After 30 unsuccessful attempts, the push data will be permanently discarded.
Sample Message
The data included in the push data service request can be configured and depends on the analytics services you subscribed to.
If you want to receive the recorded GPS data in addition to the driving indicators, the request message body size will be larger. The size of the request message body is proportional to the duration of a trip because the GPS variables are recorded periodically at 1 Hz. Here are some approximate orders of magnitude:
10 min -> 40 kB
30 min -> 110 kB
60 min -> 200 kB
120 min -> 420 kB
150 min -> 580 kB
For security and user privacy reasons, we may delete or hash sensitive data.
The example below gives an exhaustive overview of the data resulting from DriveQuant's trip analysis. Definition of all these variables can be found in the related section.
The Push Data API specification can be downloaded here in OpenAPI YAML format.
Sample message (click to expand)
Service to get a sample message
To facilitate the validation of your data ingestion service for the Trip Push Service, we provide a dedicated admin utility service. This tool allows you to generate sample requests based on your actual data and configuration, making it easier to test and verify your integration.
Below, you'll find a detailed description of the service, and you can also test it directly here.
Push trip data request
get
This service returns the body of the push trip data request that DriveQuant would send to the customer push data service for a given trip.
Authorizations
DriveKit-Admin-API-KeystringRequired
Path parameters
tripIdstringRequired
Unique identifier of the trip
Header parameters
DriveKit-Admin-API-KeystringRequired
Drivekit Admin API key
Responses
200Success
application/json
401
Invalid DriveKit Admin API key
application/json
404
Trip Not Found
application/json
429
Too Many Requests
get
/drivekit/admin/push/trips/{tripId}
Date Format
Our API returns the dates in ISO 8601 format in Coordinated Universal Time (UTC).
The ISO 8601 format is an international standard for representing dates and times that ensures compatibility across different systems and applications.
To convert the UTC date into local date, our push trip data includes the time offset between local time and UTC, accessible viaitineraryData.timezoneOffset