API Documentation


In the backend, we refer to Stores as Zones, so each store is related to a zone number.  This allows for multiple sensors to be associated with one zone.  In the example below we have zone 1, and sensor 4


The DEV environment currently is  https://web-new.scraffic.com. Set this as the default url for the examples below. The dataset will be returned in JSON formating.


POST sign_in


A validation token good for a session. The token must be sent with every request



Curl example:

shell$ curl https://web-new.scraffic.com/users/sign_in.json -d user[email]=example@example.com -d user[password]=example




To retrieve the list of zones (also thought of as stores) you’ll want to get a list of all the zones available to that user account.


GET /zones



Curl example:

shell$ curl https://web-new.scraffic.com/zones.json -G -d token=”xPQ5HBh1qZLfnPUciJfN”














-This will return zones for that user.


GET /zone/$ID/sensors


This will get the sensors for a particular zone in the previous time period (default 24h)



Curl example

shell$ curl https://web-new.scraffic.com/zones/1/sensors.json -G -d token=”xPQ5HBh1qZLfnPUciJfN”






















GET /zones/$ID/sensors/$ID.json

-This will return number of counts between specified dates by hour for the given sensor.


$URL/zones/1/sensors/4.json?start=20160801&end=20160801 &interval=3600

Curl Example:

curl https://web-new.scraffic.com/zones/1/sensors/4.json -G -d token=”xPQ5HBh1qZLfnPUciJfN” -d start=20160801 -d end=20160802 -d interval=3600



[“Aug 01 11:00”,

“Aug 01 12:00”,

“Aug 01 14:00”,

“Aug 01 15:00”,

“Aug 01 16:00”,

“Aug 01 17:00”,

“Aug 01 18:00”,

“Aug 01 19:00”,

“Aug 01 20:00”,

“Aug 01 21:00”,

“Aug 01 22:00”,

“Aug 01 23:00”,

“Aug 02 00:00”,

“Aug 02 01:00”,

“Aug 02 03:00”,

“Aug 02 13:00”,

“Aug 02 14:00”,

“Aug 02 15:00”,

“Aug 02 16:00”,

“Aug 02 17:00”,

“Aug 02 18:00”,

“Aug 02 19:00”,

“Aug 02 20:00”,

“Aug 02 21:00”,

“Aug 02 22:00”,

“Aug 02 23:00”],