Query History of Foot Traffic Data

Last Updated on : 2023-06-15 05:51:55

According to the criteria, you can query the history data of the foot traffic under a specified asset, including visitors who enter or pass by a store or get interested in the campaign of the store.

API address

GET: /v1.0/iot-03/passenger-flows/assets/{asset_id}/historical-data

Request parameter

Parameter name Type IN Required Description
asset_id String uri true The ID of a specified asset.
config HistoricalDataQueryReq query true The information about query.

Description of config

Parameter name Type IN Required Description
flow_type Integer true The type of foot traffic. Valid values:
  • 1: Enter the store.
  • 2: Pass by the store.
  • 3: Take part in the campaign of the store.
display_type Integer true The type of data display. Valid values:
  • 1: Display the data by hour.
  • 2: Display the data by day.
start_time Long true The start time (timestamp). When you query the data by hour, maximum 1-day data is available. When you query the data by day, maximum 31-day data is available.
end_time Long true The end time (timestamp). When you query the data by hour, maximum 1-day data is available. When you query the data by day, maximum 31-day data is available.

Return parameter

Parameter name Type Description
result List The returned result.

Description of result

Parameter name Type Description
time Long The timestamp.
number Integer The number of persons.

Request example

GET: /v1.0/iot-03/passenger-flows/assets/14169xxxxxxx025/historical-data?flow_type=1&display_type=1&start_time=1622304000000&end_time=1622386800000

Return example

{ "result": [ { "number": 72, "time": 1622354400000 }, { "number": 92, "time": 1622329200000 }, { "number": 36, "time": 1622304000000 }, { "number": 64, "time": 1622379600000 }, { "number": 46, "time": 1622340000000 }, { "number": 86, "time": 1622314800000 }, { "number": 18, "time": 1622332800000 }, { "number": 61, "time": 1622307600000 }, { "number": 68, "time": 1622383200000 }, { "number": 85, "time": 1622358000000 }, { "number": 14, "time": 1622368800000 }, { "number": 36, "time": 1622343600000 }, { "number": 97, "time": 1622318400000 }, { "number": 44, "time": 1622386800000 }, { "number": 10, "time": 1622361600000 }, { "number": 78, "time": 1622336400000 }, { "number": 40, "time": 1622311200000 }, { "number": 40, "time": 1622347200000 }, { "number": 62, "time": 1622322000000 }, { "number": 78, "time": 1622372400000 }, { "number": 88, "time": 1622365200000 }, { "number": 26, "time": 1622376000000 }, { "number": 68, "time": 1622350800000 }, { "number": 32, "time": 1622325600000 } ], "t": 1627539440420, "success": true }

Error code

For more information, see error code.