Intersection AADT
1. Introductionβ
This endpoint retrieves the Average Annual Daily Traffic (AADT) for specified time ranges, locations, and filtering parameters. AADT is a standard metric used to calculate the average daily traffic over a year.
2. Authenticationβ
Obtain an authentication token by following the steps outlined in the authentication section. This token will be used in the request header for subsequent API calls.
3. Sending a Requestβ
POST requests should be made to the Traffic Study endpoint. Ensure the token from the Authentication step is included in the request header.
- Endpoint URL: π https://integration.cloud.tes.ca/api/traffic/v1/studies
- IP Address Whitelisting: Before sending requests, ensure your IP address is whitelisted by sending a list of authorized IP addresses to π§ help@tes.ca
Sample Request Header
Authorization: Bearer [authentication_token]
Content-Type: application/json
4. Inputβ
The following JSON structure should be provided as the input:
{
"ids": [
"d3e63b25-d92b-47e9-aaa8-902d65690149"
],
"geoIds":[
"Y1488Y1491",
"Y1577Y1915"
],
"locationIds": [
"d3e63b25-d92b-47e9-aaa8-902d65690149"
],
"municipalityIds": [
"d3e63b25-d92b-47e9-aaa8-902d65690149"
],
"jurisdictionIds": [
"d3e63b25-d92b-47e9-aaa8-902d65690149"
],
"years": [
2019,2020,2021
],
"paging": {
"pageSize": 2,
"pageNumber": 1
}
}
Request Body Parameters
- ids:
Array<Guid>- Filter by IDs. - locationIds:
Array<Guid>- Filter by location IDs. - geoIds:
Array<string>- Filter by geographic IDs. - jurisdictionIds:
Array<Guid>- Filter by jurisdiction IDs. read more - municipalityIds:
Array<Guid>- Filter by municipality IDs. read more - years:
Array<int>- Filter by years.
5. Outputβ
The response will return the calculated AADT as a JSON object:
{
"pagingInfo": {
"itemsPerPage": 2,
"totalPages": 17455,
"totalItems": 34909,
"currentPage": 2
},
"id": "732976fa-a0e9-4fbc-83d6-6f7dc4a75f46",
"messages": [],
"responseCode": 200,
"isSuccessful": true,
"results": [
{
"id": "0015a29d-62ac-4824-acff-01f3365a1d10",
"majorAADT": 30480,
"minorAADT": 1398,
"northApproachAADT": 30367,
"southApproachAADT": 30288,
"eastApproachAADT": 1512,
"westApproachAADT": 1057,
"aadt": 31878,
"locationId": "755a4787-4fbe-aa7e-5219-9e3281e94387",
"locationDescription": "McCowan Road @ Devonshire Avenue/Coleraine Avenue",
"municipalityId": "755a42ed-cc19-53e8-a482-a9ddf4284387",
"jurisdictionId": "755a4746-c614-4ce6-8f4f-a4faa5d24387",
"geoId": "Y1153",
"locationType": 1,
"sourceType": 1,
"providerType": 0,
"qualityFactor": 0,
"year": 2003
},
{
"id": "00226d7b-3620-4f04-a856-44f280037d64",
"majorAADT": 34158,
"minorAADT": 4406,
"northApproachAADT": 33498,
"southApproachAADT": 34736,
"eastApproachAADT": 4757,
"westApproachAADT": 2004,
"aadt": 38564,
"locationId": "755a49e2-283e-d795-dfbf-f6ba0ca24387",
"locationDescription": "Yonge Street @ Glen Cameron Road",
"municipalityId": "755a42ed-cc19-53e8-a482-a9ddf4284387",
"jurisdictionId": "755a4746-c614-4ce6-8f4f-a4faa5d24387",
"geoId": "Y1515",
"locationType": 1,
"sourceType": 1,
"providerType": 0,
"qualityFactor": 0,
"year": 2024
}
]
}
6. Responseβ
Response Body Parameters
The following parameters are returned in the response, based on the filters specified in the request body:
-
Location Type:
integer- Select the type of location for traffic or road data. Options:- 1 : Intersection - Intersection point between two or more streets.
- 2 : Midblock - Section of a road between two intersections.
- 3 : Street - Entire street segment.
- 4 : MIS (Managed Information System) - Managed information system location.
-
Quality Factor:
integer- Represents the quality of the data used for calculating the Annual Average Daily Traffic (AADT). Options:- 0 : By Corridor - Data derived by corridor analysis.
- 1 : By Network - Data derived by network analysis.
- 2 : Not Found - No quality factor found.
- 3 : No Years Available - No available years for AADT calculation.
- 4 : Poor - Poor data quality.
- 5 : Fair - Fair data quality.
- 6 : Good - Good data quality.
-
Source Type:
integer- Indicates the source of data used for AADT calculation. Options:- -1 : Not Exist - Data source does not exist.
- 0 : Unknown - Unknown source type.
- 1 : Count - Data obtained through count.
- 2 : User Modified - User-modified data.
- 3 : User Modified Permanent - Permanently user-modified data.
- 4 : Growth From Count - Growth calculated from count data.
- 5 : Single Intersection - Data from a single intersection.
- 6 : Intersection Average - Average data from intersections.
- 7 : Midblock Linear Average - Linear average of midblock data.
- 8 : Trip Generation - Data from trip generation.
- 9 : Time Linear Average - Time-based linear average.
- 10 : Predicted Growth From Count - Predicted growth from count data.
- 11 : Linear Regression - Data derived through linear regression.
- 12 : Corridor - Corridor-based data.
- 13 : TES Historical - Historical TES data.
- 14 : Averaged From Member Road Segments - Average from road segment data.
- 15 : Passed Down From Traffic Section - Data passed down from traffic section.
-
Status:
integer- Represents the status of the work order or task. Options:- 0 : Work Order Created
- 1 : Started
- 2 : Counted
- 3 : Count Completed
- 4 : Approved
- 5 : Warning
- 6 : Error
- 7 : Need Review
Response with Errors
When an error occurs, the response will include an errorMessages section and a responseCode that identifies the specific error encountered. Here is a sample of an error response:
Sample Error Response:
{
"id": "00000000-0000-0000-0000-000000000000",
"errorMessages": [
{
"id": "00000000-0000-0000-0000-000000000000",
"message": "The IP is not allowed.",
"messageCode": 2005,
"type": 1
}
],
"responseCode": 2005,
"results": null
}
Explanation of with ErrorsResponse Codes:
- responseCode =
2005: IIP is not allowed or the maximum number of pull requests per hour has been reached. - responseCode =
1010: The βfromβ date must be earlier than the βtoβ date. - - responseCode =
1011: The maximum allowable number of days for querying has been reached.