Streaks

Streaks | Overview

Streaks feature allows you to get best & current series of Trips with statistics, based and calculated on user's accumulated statistics:

  • Trips without Acceleration

  • Trips without Braking

  • Trips without Speeding

  • Trips without Phone Usage

  • Trips without Cornering

Streaks | Example of Interface [ZenRoad]

Streaks | Steps to integrate:

  1. Check this guide to select authorization type according to your goals:

  2. Use the Individual Streaks API if you'd like to get user's streaks to moblie app for a single user.

  3. Use the Accumulated Streaks API if you'd like to get streaks to your back-end services for a single user or for all users within single user group.

Streaks | Dictionary

Field

Meaning

StreakAccelerationBest

Total trips in Best series;

StreakAccelerationBestDurationSec

Driving time in Best series;

StreakAccelerationBestDistanceKm

Mileage in Best series;

StreakAccelerationBestFromDate

Best series start date;

StreakAccelerationBestToDate

Best series end date;

StreakAccelerationCurrentStreak

Total trips in Current series;

StreakAccelerationCurrentDurationSec

Driving time in Current series;

StreakAccelerationCurrentDistanceKm

Mileage in Current series;

StreakAccelerationCurrentFromDate

Current series start date;

StreakAccelerationCurrentToDate

Current series end date;

StreakAccelerationIsActive

True - Calculate Series of >=3 days duration only;

False - Series with any duration are calculated.

get
Individual Streaks

https://api.telematicssdk.com/Statistics/v1/Streaks/individual/
User: Get Personal Streaks Authorization: Required as User
Request
Response
Request
Headers
Authorization
required
string
"Bearer {Token}" - get it via https://user.telematicssdk.com/v1/auth/login
Response
200: OK
{
"Result":
{
"DeviceToken": "42b8b70d-54ug-49e6-8381-0120fb4be8ae",
"InstanceId": "1e1c3e55-8fji-461d-bbbf-18a08913ec20",
"AppId": "d9a26f4a-sr7h-476a-a54a-f5fd6fdb6395",
"CompanyId": "ee654467-08hj-40ef-b9e9-665ab63aa2a5",
"StreakCorneringBest": 47,
"StreakCorneringBestDurationSec": 43750,
"StreakCorneringBestDistanceKm": 573.5549999999998,
"StreakCorneringBestFromDate": "2020-08-02T00:00:00",
"StreakCorneringBestToDate": "2020-08-26T00:00:00",
"StreakCorneringCurrentStreak": 5,
"StreakCorneringCurrentDurationSec": 1922,
"StreakCorneringCurrentDistanceKm": 16.749,
"StreakCorneringCurrentFromDate": "2020-12-28T00:00:00",
"StreakCorneringCurrentToDate": "2020-12-28T00:00:00",
"StreakCorneringIsActive": true,
"StreakDecelerationBest": 38,
"StreakBreakingBestDurationSec": 31001,
"StreakBreakingBestDistanceKm": 437.4810000000001,
"StreakBreakingBestFromDate": "2020-12-17T00:00:00",
"StreakBreakingBestToDate": "2020-12-28T00:00:00",
"StreakBreakingCurrentStreak": 38,
"StreakBreakingCurrentDurationSec": 31001,
"StreakBreakingCurrentDistanceKm": 437.4810000000001,
"StreakBreakingCurrentFromDate": "2020-12-17T00:00:00",
"StreakBreakingCurrentToDate": "2020-12-28T00:00:00",
"StreakBreakingIsActive": true,
"StreakAccelerationBest": 38,
"StreakAccelerationBestDurationSec": 29169,
"StreakAccelerationBestDistanceKm": 298.137,
"StreakAccelerationBestFromDate": "2020-08-30T00:00:00",
"StreakAccelerationBestToDate": "2020-09-27T00:00:00",
"StreakAccelerationCurrentStreak": 2,
"StreakAccelerationCurrentDurationSec": 919,
"StreakAccelerationCurrentDistanceKm": 10.845,
"StreakAccelerationCurrentFromDate": "2020-12-28T00:00:00",
"StreakAccelerationCurrentToDate": "2020-12-28T00:00:00",
"StreakAccelerationIsActive": false,
"StreakOverSpeedBest": 28,
"StreakOverSpeedBestDurationSec": 20553,
"StreakOverSpeedBestDistanceKm": 182.11299999999997,
"StreakOverSpeedBestFromDate": "2020-08-31T00:00:00",
"StreakOverSpeedBestToDate": "2020-09-23T00:00:00",
"StreakOverSpeedCurrentStreak": 5,
"StreakOverSpeedCurrentDurationSec": 1922,
"StreakOverSpeedCurrentDistanceKm": 16.749,
"StreakOverSpeedCurrentFromDate": "2020-12-28T00:00:00",
"StreakOverSpeedCurrentToDate": "2020-12-28T00:00:00",
"StreakOverSpeedIsActive": true,
"StreakPhoneUsageBest": 31,
"StreakPhoneUsageBestDurationSec": 28797,
"StreakPhoneUsageBestDistanceKm": 364.79999999999984,
"StreakPhoneUsageBestFromDate": "2020-08-06T00:00:00",
"StreakPhoneUsageBestToDate": "2020-08-25T00:00:00",
"StreakPhoneUsageCurrentStreak": 17,
"StreakPhoneUsageCurrentDurationSec": 16674,
"StreakPhoneUsageCurrentDistanceKm": 302.076,
"StreakPhoneUsageCurrentFromDate": "2020-12-23T00:00:00",
"StreakPhoneUsageCurrentToDate": "2020-12-28T00:00:00",
"StreakPhoneUsageIsActive": true,
"UpdatedAt": "2020-12-28T03:15:25.933"
},
"Status": 200,
"Title": "",
"Errors": []
}

get
User(s) Streaks

https://api.telematicssdk.com/Statistics/v1/Streaks/accumulated/
Admin: Get user(s) Streaks Authorization: Required as admin with API Authorization Credentials
Request
Response
Request
Headers
Authorization
required
string
"Bearer {Token}" - get it via https://user.telematicssdk.com/v1/auth/login
Query Parameters
DeviceToken
optional
string
One of this is required
InstanceID
optional
string
One of this is required
Response
200: OK
{
"Result": [
{
"DeviceToken": "e8622a79-04c4-67ui-b13f-00284b820807",
"InstanceId": "1e1c3e55-3fbd-34ft-bbbf-18a08913ec20",
"AppId": "d9a26f4a-b9a5-34rf-a54a-f5fd6fdb6395",
"CompanyId": "ee654467-hyz8-40ef-b9e9-665ab63aa2a5",
"StreakCorneringBest": 21,
"StreakCorneringBestDurationSec": 20516,
"StreakCorneringBestDistanceKm": 266.596,
"StreakCorneringBestFromDate": "2020-09-11T00:00:00",
"StreakCorneringBestToDate": "2020-09-21T00:00:00",
"StreakCorneringCurrentStreak": 4,
"StreakCorneringCurrentDurationSec": 16902,
"StreakCorneringCurrentDistanceKm": 316.374,
"StreakCorneringCurrentFromDate": "2021-01-15T00:00:00",
"StreakCorneringCurrentToDate": "2021-01-21T00:00:00",
"StreakCorneringIsActive": true,
"StreakBreakingBest": 8,
"StreakBreakingBestDurationSec": 8743,
"StreakBreakingBestDistanceKm": 123.202,
"StreakBreakingBestFromDate": "2020-09-25T00:00:00",
"StreakBreakingBestToDate": "2020-09-28T00:00:00",
"StreakBreakingCurrentStreak": 1,
"StreakBreakingCurrentDurationSec": 1375,
"StreakBreakingCurrentDistanceKm": 17.951,
"StreakBreakingCurrentFromDate": "2020-11-27T00:00:00",
"StreakBreakingCurrentToDate": "2020-11-27T00:00:00",
"StreakBreakingIsActive": false,
"StreakAccelerationBest": 17,
"StreakAccelerationBestDurationSec": 16517,
"StreakAccelerationBestDistanceKm": 209.78,
"StreakAccelerationBestFromDate": "2020-09-11T00:00:00",
"StreakAccelerationBestToDate": "2020-09-19T00:00:00",
"StreakAccelerationCurrentStreak": 1,
"StreakAccelerationCurrentDurationSec": 3446,
"StreakAccelerationCurrentDistanceKm": 35.31,
"StreakAccelerationCurrentFromDate": "2021-01-21T00:00:00",
"StreakAccelerationCurrentToDate": "2021-01-21T00:00:00",
"StreakAccelerationIsActive": false,
"StreakOverSpeedBest": 15,
"StreakOverSpeedBestDurationSec": 20108,
"StreakOverSpeedBestDistanceKm": 287.484,
"StreakOverSpeedBestFromDate": "2020-09-29T00:00:00",
"StreakOverSpeedBestToDate": "2020-10-09T00:00:00",
"StreakOverSpeedCurrentStreak": 1,
"StreakOverSpeedCurrentDurationSec": 3756,
"StreakOverSpeedCurrentDistanceKm": 80.009,
"StreakOverSpeedCurrentFromDate": "2021-01-15T00:00:00",
"StreakOverSpeedCurrentToDate": "2021-01-15T00:00:00",
"StreakOverSpeedIsActive": false,
"StreakPhoneUsageBest": 21,
"StreakPhoneUsageBestDurationSec": 20812,
"StreakPhoneUsageBestDistanceKm": 298.212,
"StreakPhoneUsageBestFromDate": "2020-09-18T00:00:00",
"StreakPhoneUsageBestToDate": "2020-09-26T00:00:00",
"StreakPhoneUsageCurrentStreak": 1,
"StreakPhoneUsageCurrentDurationSec": 3446,
"StreakPhoneUsageCurrentDistanceKm": 35.31,
"StreakPhoneUsageCurrentFromDate": "2021-01-21T00:00:00",
"StreakPhoneUsageCurrentToDate": "2021-01-21T00:00:00",
"StreakPhoneUsageIsActive": false,
"UpdatedAt": "2021-01-26T05:05:11.45"
},
{
"DeviceToken": "42b8b70d-54ug-49e6-8381-0120fb4be8ae",
"InstanceId": "1e1c3e55-8fji-461d-bbbf-18a08913ec20",
"AppId": "d9a26f4a-sr7h-476a-a54a-f5fd6fdb6395",
"CompanyId": "ee654467-08hj-40ef-b9e9-665ab63aa2a5",
"StreakCorneringBest": 47,
"StreakCorneringBestDurationSec": 43750,
"StreakCorneringBestDistanceKm": 573.5549999999998,
"StreakCorneringBestFromDate": "2020-08-02T00:00:00",
"StreakCorneringBestToDate": "2020-08-26T00:00:00",
"StreakCorneringCurrentStreak": 5,
"StreakCorneringCurrentDurationSec": 1922,
"StreakCorneringCurrentDistanceKm": 16.749,
"StreakCorneringCurrentFromDate": "2020-12-28T00:00:00",
"StreakCorneringCurrentToDate": "2020-12-28T00:00:00",
"StreakCorneringIsActive": true,
"StreakBreakingBest": 38,
"StreakBreakingBestDurationSec": 31001,
"StreakBreakingBestDistanceKm": 437.4810000000001,
"StreakBreakingBestFromDate": "2020-12-17T00:00:00",
"StreakBreakingBestToDate": "2020-12-28T00:00:00",
"StreakBreakingCurrentStreak": 38,
"StreakBreakingCurrentDurationSec": 31001,
"StreakBreakingCurrentDistanceKm": 437.4810000000001,
"StreakBreakingCurrentFromDate": "2020-12-17T00:00:00",
"StreakBreakingCurrentToDate": "2020-12-28T00:00:00",
"StreakBreakingIsActive": true,
"StreakAccelerationBest": 38,
"StreakAccelerationBestDurationSec": 29169,
"StreakAccelerationBestDistanceKm": 298.137,
"StreakAccelerationBestFromDate": "2020-08-30T00:00:00",
"StreakAccelerationBestToDate": "2020-09-27T00:00:00",
"StreakAccelerationCurrentStreak": 2,
"StreakAccelerationCurrentDurationSec": 919,
"StreakAccelerationCurrentDistanceKm": 10.845,
"StreakAccelerationCurrentFromDate": "2020-12-28T00:00:00",
"StreakAccelerationCurrentToDate": "2020-12-28T00:00:00",
"StreakAccelerationIsActive": false,
"StreakOverSpeedBest": 28,
"StreakOverSpeedBestDurationSec": 20553,
"StreakOverSpeedBestDistanceKm": 182.11299999999997,
"StreakOverSpeedBestFromDate": "2020-08-31T00:00:00",
"StreakOverSpeedBestToDate": "2020-09-23T00:00:00",
"StreakOverSpeedCurrentStreak": 5,
"StreakOverSpeedCurrentDurationSec": 1922,
"StreakOverSpeedCurrentDistanceKm": 16.749,
"StreakOverSpeedCurrentFromDate": "2020-12-28T00:00:00",
"StreakOverSpeedCurrentToDate": "2020-12-28T00:00:00",
"StreakOverSpeedIsActive": true,
"StreakPhoneUsageBest": 31,
"StreakPhoneUsageBestDurationSec": 28797,
"StreakPhoneUsageBestDistanceKm": 364.79999999999984,
"StreakPhoneUsageBestFromDate": "2020-08-06T00:00:00",
"StreakPhoneUsageBestToDate": "2020-08-25T00:00:00",
"StreakPhoneUsageCurrentStreak": 17,
"StreakPhoneUsageCurrentDurationSec": 16674,
"StreakPhoneUsageCurrentDistanceKm": 302.076,
"StreakPhoneUsageCurrentFromDate": "2020-12-23T00:00:00",
"StreakPhoneUsageCurrentToDate": "2020-12-28T00:00:00",
"StreakPhoneUsageIsActive": true,
"UpdatedAt": "2020-12-28T03:15:25.933"
},
],
"Status": 200,
"Title": "",
"Errors": []
}