HistoricalSafetyEvents

  • This method returns historical safety events.
  • Returns the following required safety data:
    1. sourceId
    2. type
    3. vehicle
    4. startedAt
    5. driver
    6. startLocation.longitude
    7. startLocation.latitude
    8. endedAt
    9. endLocation.longitude
    10. endLocation.latitude
    11. stats.maximumSpeed
    12. stats.gForceForwardBackward
    13. stats.gForceSideToSide
    14. stats.heading
    15. cameraMedia.frontFacing.available
    16. cameraMedia.frontFacing.Media[].Type
    17. cameraMedia.frontFacing.Media[].Url
    18. cameraMedia.frontFacing.Media[].EventTime
    19. cameraMedia.frontFacing.Media[].PosterUrl
    20. cameraMedia.rearFacing.available
    21. cameraMedia.rearFacing.Media[].Type
    22. cameraMedia.rearFacing.Media[].Url
    23. cameraMedia.rearFacing.Media[].EventTime
    24. cameraMedia.rearFacing.Media[].PosterUrl

Use Case

  • Use to retrieve safety events for a vehicle and date range.

Request URL

Use an HTTP POST request to obtain historical safety events:

[POST] https://secure.trackyourtruck.com/WebApi/api/v2.2/HistoricalSafetyEvents

The request header should contain the API Access Token obtained from the authentication process. Get Access Token.

Header Name Description
Authorization Access Token obtained from the 1st step's authentication process.

Sample Response

A successful request will return the following JSON result:

{
    "StatusCode": "200",
    "Message": "OK",
    "pagination": {
        "PageNumber": 1,
        "PageSize": 100,
        "TotalRecords": 1250,
        "TotalPages": 13,
        "HasMore": true
    },
    "Results": [
        {
            "sourceId": "3685501941",
            "type": "harsh_turn",
            "vehicle": "29980",
            "startedAt": "2026-03-13T12:10:18.000Z",
            "driver": "",
            "startLocation": {
                "longitude": -79.24167,
                "latitude": 37.36114
            },
            "endedAt": "2026-03-13T12:10:18.000Z",
            "endLocation": {
                "longitude": -79.24167,
                "latitude": 37.36114
            },
            "stats": {
                "maximumSpeed": 21.875,
                "gForceForwardBackward": 0,
                "gForceSideToSide": 0,
                "heading": 43
            },
            "cameraMedia": {
                "frontFacing": {
                    "available": true,
                    "Media": [
                        {
                            "Type": "Video",
                            "Url": "https://...mp4",
                            "EventTime": "2026-03-13T12:10:18.000Z",
                            "PosterUrl": "https://...jpg"
                        }
                    ]
                },
                "rearFacing": {
                    "available": true,
                    "Media": [
                        {
                            "Type": "Video",
                            "Url": "https://...mp4",
                            "EventTime": "2026-03-13T12:10:18.000Z",
                            "PosterUrl": "https://...jpg"
                        }
                    ]
                }
            }
        }
    ]
}

Test

Test the HistoricalSafetyEvents using your AccessToken by entering it below:

Clicking the test button will send a request to the TYT API and display the result below.