Collisions
To retrieve collision data from the Collision Module, follow these instructions:
-
Authentication: First, obtain the authentication token by following the instructions in the Authentication section.
-
Sending a Request: Use the acquired token in the request header and send a POST request to the Collision endpoint:
Endpoint URL: 🔗 https://integration.cloud.tes.ca/api/collision/v2/Collisions
IP Address Whitelisting​
For the security and integrity of our systems, specific IP addresses from which API requests are made must be whitelisted. This ensures that only authorized users and systems can access our services, adhering to industry-standard security practices. Submit your list of authorized IP addresses to 📧 help@tes.ca for whitelisting.
Sample Request Body​
The maximum allowable date range for a query is one year.
{
"fromDate": "2021-01-01",
"toDate": "2021-02-01",
"modificationFromDate": "2023-01-01",
"modificationToDate": "2024-01-01",
"collisionIds": [
"755a4746-c614-4ce6-8f4f-a4faa5d24387"
],
"GeoIds": [
"A5846542"
],
"JurisdictionIds": [
"755a4746-c614-4ce6-8f4f-a4faa5d24387"
],
"MunicipalityIds": [
"755a4746-c614-4ce6-8f4f-a4faa5d24387"
],
"DivisionIds": [
"755a4746-c614-4ce6-8f4f-a4faa5d24387"
],
"LocationIds": [
"755a4746-c614-4ce6-8f4f-a4faa5d24387"
],
"LocationType": 1,
"paging": {
"pageSize": 100,
"pageNumber": 1
}
}
Request Body Parameters​
Explanation of parameters in the request body (All applicable conditions are logical and with each other):
-
fromDate: DateTime - Minimum date of collision in ISO 8601 format (e.g., 2020-05-02).
-
toDate: DateTime - Maximum date of collision in ISO 8601 format (e.g., 2024-05-02).
-
modificationFromDate: DateTime - Minimum modified date for collision in ISO 8601 format (e.g., 2020-05-02).
-
modificationToDate: DateTime - Maximum modified date for collision in ISO 8601 format (e.g., 2024-05-02).
-
locationIds:
Array<Guid>- Filter by location IDs. -
geoIds:
Array<string>- Filter by geographic IDs. -
jurisdictionIds:
Array<Guid>- Filter by jurisdiction IDs. -
municipalityIds:
Array<Guid>- Filter by municipality IDs. -
collisionIds:
Array<Guid>- Filter by collision IDs. -
divisionIds:
Array<Guid>- Filter by division IDs. -
locationType:
- Intersection
- Road segment
-
paging: Object - For chunked data retrieval:
-
pageSize: integer - Number of records per page (1 to 1000).
-
pageNumber: integer - Page number to retrieve.
Response​
The API response is structured to either provide the requested collision data or to return an error message if an issue is encountered. For more details, please refer to Collision Response.
Integration Sample​
You can access the samples here.