Skip to main content

Collision Response

The API response is structured to either provide the requested collision data or to return an error message if an issue is encountered.

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:

{
"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 Error Response Codes:

  • responseCode = 2005 : IP 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

Successful API Response Structure

When a request is successful, the API response is organized into the following sections:

  • errorMessages: This section will be empty, indicating no errors were encountered.
  • results: Contains the actual collision data, structured into sub-categories:
    • general: Provides key details about the collision, like location, time, conditions, and the nature of the accident.
    • remark: Additional notes or comments relevant to the collision.
    • roads: Information about the roads involved, including their condition and characteristics.
    • vehicles: Descriptions of each vehicle involved in the collision, detailing their actions, types, and conditions.
    • persons: Information about individuals involved, detailed according to their role in the incident (e.g., driver, pedestrian), providing insights into their actions and conditions.

The results section's structure is designed to be flexible, accommodating data variations based on jurisdiction and the specific roles of individuals involved in the collision.

Jurisdiction-Specific Documentation: The data structure may vary based on jurisdiction, and as such, documentation will be available for each jurisdiction. Currently available:

More jurisdictions will be documented and added to this list as they become integrated into the system.

Integration Sample

You can access the samples here.