GET https://tern.retail.roofstreet.io/api/v1/flowcycle

Based on a given place, it returns

  • The distribution of the flow intraday (base 100)
  • The distribution of the flow intraweek (base 100)

The place could be given either

  • in lat/lon coordinates : in that case the quality is computed as the best pedestrian rank detected at 150 meters arround the coordinates


  • in gid reference : in that case the quality is computed at the Hexagon given precision 50 meters

if both lat/lon and gid are given, only gid will be used.


Parameter Type Usage
lon float (-180 to 180) WSG84 Longitude (e.g. 2.4290276323522635 for Paris)
lat float (-90 to 90) WSG84 Latitude (e.g. 48.85225019822305 for Paris)
gid bigint GID given by a call to neighboursgrid
flowtype text Type of flow to measure (default = "pedestrian"). Acceptable values : "pedestrian" or "motorized".

if both lat/lon and gid are given, only gid will be used.

Returns : JSON Object

    "success" : true|false,
    "error" : "error message",
    "gid": "259887335",
    "flowcycle" : {
         "intraday" : [
        "intraweek": {
            "sunday": 11.31,
            "monday": 14,
            "tuesday": 13.67,
            "wednesday": 12.05,
            "thursday": 16,
            "friday": 20.14,
            "saturday": 12.83
Value Type Usage
success boolean True if the call was succesfull
error string If success is false, the reason of the failure
flowcycle object
flowcycle.intraday array a set of values each representing the 1 hour time slot distribution of flow across a typical day. The first value of the array is the 00:00 to 01:00 time slot, the second is the 01:00 to 02:00 slot, up to the 24th value beeing the 23:00 to 00:00 slot. The sum of the elements will be 100 +/- 0.01 Roofstreet flow quality
flowcycle.intraweek object a set of key-value pair where the key represent the day and the value is a 100 based distribution indicator.Roofstreet flow quality

Usage / Example

With basic auth :

curl --user 'APIKEY:APISECRET' --basic  "https://tern.retail.roofstreet.io/api/v1/flowcycle?lon=2.4290276323522635&lat=48.85225019822305&flowtype=pedestrian"

Auth in URL :

curl "https://tern.retail.roofstreet.io/api/v1/flowcycle?lon=2.4290276323522635&lat=48.85225019822305&flowtype=pedestrian&apikey=APIKEY&apisecret=APISECRET"


At the first call to coordinates, the system must wake-up a lot of data. So the first call to that API will take up to 11 seconds depending on the traffic.

Subsequent calls to the same site will take less than 300 ms