# Location Analytics

# Get Location Sessions

By using this API endpoint, it is possible to get the list of location sessions.

Please note that you cannot get more than 100 records per request. In case you need to get more than 100 records, then you should make more than one request.

# Endpoint

GET /locations-analytics/sessions

# Parameters

Name Type Description
guest_id string Guest ID
location_id string Location / Venue ID
mac string Guest device MAC address
started_at date Returns entries started after the entered starting date (format: yyyy-mm-dd hh:ii)
ended_at date Returns entries ended before the entered ending date (format: yyyy-mm-dd hh:ii)
visit_type int Visit type
per_page integer The number of records returned. Default is 10, maximum is 100

# Response

TIP

HTTP/1.1 200 OK

{
  "data": [
    {
      "id": "pR3zOKmvzqe",
      "guest_id": "VGBzq2o1XQ5",
      "location_id": "1kgXJ6RXN9D",
      "mac": "74:e5:0b:10:c2:cc",
      "started_at": "2017-10-24T13:11:25.000000Z",
      "ended_at": "2017-10-24T18:11:25.000000Z",
      "duration": "600",
      "visit_type": 1
    }
  ],

  "links": {
    "first": "https://api.iperawifi.com/api/v1/locations-analytics/sessions?page=1",
    "last": null,
    "prev": null,
    "next": "https://api.iperawifi.com/api/v1/locations-analytics/sessions?page=2"
  },

  "meta": {
    "current_page": 1,
    "from": 1,
    "path": "https://api.iperawifi.com/api/v1/locations-analytics/sessions",
    "per_page": 10,
    "to": 10
  }
}

# Get Location Sessions Count

By using this API endpoint, it is possible to get the count of location sessions.

# Endpoint

GET /locations-analytics/sessions/count

# Parameters

Name Type Description
guest_id string Guest ID
location_id string Location / Venue ID
mac string Guest device MAC address
started_at date Returns entries started after the entered starting date (format: yyyy-mm-dd hh:ii)
ended_at date Returns entries ended before the entered ending date (format: yyyy-mm-dd hh:ii)
visit_type int Visit type
per_page integer The number of records returned. Default is 10, maximum is 100

# Response

TIP

HTTP/1.1 200 OK

{
  "count": 1000
}

# Get Location Session Details

Get location session details.

# Endpoint

GET /locations-analytics/sessions/:id

# Parameters

Name Type Description
id string location ID

# Response

TIP

HTTP/1.1 200 OK

{
  "data": {
      "id": "pR3zOKmvzqe",
      "guest_id": "VGBzq2o1XQ5",
      "location_id": "1kgXJ6RXN9D",
      "mac": "74:e5:0b:10:c2:cc",
      "started_at": "2017-10-24T13:11:25.000000Z",
      "ended_at": "2017-10-24T18:11:25.000000Z",
      "duration": "600",
      "visit_type": 1
  }
}

DANGER

HTTP/1.1 404 Not Found

{
  "error": "Record not found"
}

# Get Location Logs

By using this API endpoint, it is possible to get the list of location logs.

Please note that you cannot get more than 100 records per request. In case you need to get more than 100 records, then you should make more than one request.

# Endpoint

GET /locations-analytics/location-logs

# Parameters

Name Type Description
guest_id string Guest ID
guest_mac string Guest MAC address
session_id string Session ID of the log
zone_id string Zone ID
timestamp date Returns entries created after the entered timestamp (format: yyyy-mm-dd hh:ii)
per_page integer The number of records returned. Default is 10, maximum is 100

# Response

TIP

HTTP/1.1 200 OK

{
  "data": [
    {
      "guest_id": "VGBzq2o1XQ5",
      "guest_mac": "74:e5:0b:10:c2:cc",
      "session_id": "Zk5reDj6baK",
      "zone_id": "pR3zOKmvzqe",
      "timestamp": "2017-10-24T13:11:25.000000Z",
      "duration": "600"
    },
    {
      "guest_id": "DEFzq2o1XQ5",
      "guest_mac": "82:g6:0b:10:c2:dd",
      "session_id": "9apvYXJr5l0",
      "zone_id": "p79zOKmecq1",
      "timestamp": "2017-10-24T13:11:25.000000Z",
      "duration": "400"
    }
  ],

  "links": {
    "first": "https://api.iperawifi.com/api/v1/locations-analytics/location-logs?page=1",
    "last": null,
    "prev": null,
    "next": "https://api.iperawifi.com/api/v1/locations-analytics/location-logs?page=2"
  },

  "meta": {
    "current_page": 1,
    "from": 1,
    "path": "https://api.iperawifi.com/api/v1/locations-analytics/location-logs",
    "per_page": 10,
    "to": 10
  }
}

# Get Location Logs Count

By using this API endpoint, it is possible to get the count of the location logs.

# Endpoint

GET /locations-analytics/location-logs/count

# Parameters

Name Type Description
guest_id string Guest ID
guest_mac string Guest MAC address
session_id string Session ID of the log
zone_id string Zone ID
timestamp date Returns entries created after the entered timestamp (format: yyyy-mm-dd hh:ii)
per_page integer The number of records returned. Default is 10, maximum is 100

# Response

TIP

HTTP/1.1 200 OK

{
  "count": 1000
}
Last Updated: 4/16/2025, 8:01:29 AM