Skip to main content

Introduction

The Safe & the City i3 Intelligence API allow you to programmatically access i3 tools and services. You can use these APIs to retrieve risk information for navigation routes or specific points of interest.

API Base Url
https://i3.safeandthecity.com/api/

Reading this documentation

Each API endpoint in this documentation is described using several parts:

  • The HTTP method. Includes GET, POST, PUT, PATCH, DELETE.
  • The base path. All URLs referenced in the documentation have the base path https://i3.safeandthecity.com/api. This base path goes before the endpoint path.
  • The endpoint path. For example, /v1/routing/query?location={coordinates}.
  • Required parameters. These parameters must be included in a request. In the example above, {coordinates} is a required parameter. In a request, you will replace the placeholders with real values.
  • Optional parameters. These parameters can be included in a request to customize the query. Query parameters are added to the end of the URL with query string encoding.

Coordinate Convention

When receiving or supplying geospatial coordinates to and from the i3 API, they should be formatted in the order of longitude, latitude and specified in decimal degrees in the WGS84 coordinate system.


Errors

i3 APIs use conventional HTTP error codes for successful or failed API requests. Response codes in the 2xx range indicate that the request was successful, response codes in the 4xx indicate that there was an error with the request data (e.g. an expected parameter was not supplied), response codes in the 5xx range indicate that there is an issue with the i3 servers.

Error Code Summary

For additional information on HTTP error codes and standard error status definitions you can read this.

Error CodeDescription
200 - OKStandard response for successful HTTP requests
400 - Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 - UnauthorizedNo valid API key provided.
402 - Request FailedThe parameters were valid but the request failed.
403 - ForbiddenThe API key doesn't have permissions to perform the request.
404 - Not FoundThe requested resource doesn't exist.
409 - ConflictThe request conflicts with another request (perhaps due to using the same idempotent key).
429 - Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server ErrorsSomething went wrong with the i3 servers