Roam.ai Docs
HomeContactDashboard
  • Introduction
  • Getting Started
    • Key Concepts
  • Frameworks
  • Android
    • Quickstart (Android)
    • Pub/Sub Locations (Android)
    • SDK Methods (Android)
      • SDK Configuration (Android)
      • Get Current Location (Android)
      • Update Current Location (Android)
      • Update Location When Stationary (Android)
      • Trip v1 SDK Methods (Android)
      • Trip v2 SDK Methods (Android)
        • Create Trip (Android)
        • Update Trip (Android)
        • Start Quick Trip (Android)
        • Start Trip (Android)
        • End Trip (Android)
        • Pause Trip (Android)
        • Resume Trip (Android)
        • Sync Trip (Android)
        • Get Trip (Android)
        • Get Active Trips (Android)
        • Get Trip Summary (Android)
        • Subscribe to Trip (Android)
        • Delete Trip (Android)
    • Utility Methods (Android)
    • Troubleshooting (Android)
    • Changelog (Android)
  • iOS
    • Quickstart (iOS)
    • Pub/Sub Locations (iOS)
    • SDK Methods (iOS)
      • SDK Configuration (iOS)
      • Get Current Location (iOS)
      • Update Current Location (iOS)
      • Update Location When Stationary (iOS)
      • Trips v1 SDK Methods (iOS)
      • Trips v2 SDK Methods (iOS)
        • Create Trip (iOS)
        • Update Trip (iOS)
        • Start Quick Trip (iOS)
        • Start Trip (iOS)
        • End Trip (iOS)
        • Pause Trip (iOS)
        • Resume Trip (iOS)
        • Sync Trip (iOS)
        • Get Trip (iOS)
        • Get Active Trips (iOS)
        • Get Trip Summary (iOS)
        • Subscribe Trip (iOS)
        • Delete Trip (iOS)
    • Utility Methods (iOS)
    • Troubleshooting (iOS)
    • Changelog (iOS)
  • React Native
  • Flutter
  • PRODUCTS
  • Tracking (BETA)
  • Geofencing
  • Trips
  • APIs
    • Authorization
    • Users API
      • Create User API
      • Get User API
      • Update User API
    • Locations API
      • Get Locations API
      • Get Stop Locations API
    • Insights API
      • Get User POIs API
      • Get User Home Location API
      • Get User Work Location API
    • Trips v1 API
      • Create Trip API v1
      • Get Trip API
      • Update Trip API v1
      • Delete Trip API v1
      • Trip Summary API
      • Export Trip Summary as GPX
    • Trips v2 API
      • Create Trip API
      • Get Single Trip API
      • Get Multiple Trips API
      • Update Trip API
      • Control Trip API
        • Start Trip API
        • Pause Trip API
        • Resume Trip API
        • End Trip API
      • Get Trip Summary API
      • Export Trip API
      • Delete Trip API
    • Geofencing API
      • CREATE Geofence API
      • GET Geofence API
      • UPDATE Geofence API
      • DELETE Geofence API
    • Events API
      • Get Events
      • Trip Events
    • Nearby API
      • Get Nearby User API
      • Get Nearby Geofence API
    • Moving Geofence API
      • Create Moving-Geofence API
      • Update Moving-Geofence API
      • GET Moving-Geofence API
      • Delete Moving-Geofence API
    • User Groups API
      • Create Group API
      • Get User Group by ID
      • Get User Group List
      • Add Users to Group API
      • Update Group API
      • Find Nearby Users from Group
    • Query with Metadata
  • WEBHOOK
    • Webhook
    • Slack Integration
  • LIBRARIES
    • Javascript Library
    • Go Library
    • Python Library
Powered by GitBook
On this page
  • Get Events API
  • Sample Request

Was this helpful?

Export as PDF
  1. APIs
  2. Events API

Get Events

The Get Events API lets you fetch the entry or exit events of the users from your event enabled geofences. The API also lets you filter by user or geofence, location, and more.

Get Events API

GET https://api.roam.ai/v1/api/event/

Query Parameters

Name
Type
Description

user_id

string

Filters events data for the given user_id. E.g.- 5d9450ace47bae6d70064a9b

geofence_id

string

Filters events data for the given geofence_id. E.g.- 5eecc7491e621663c93ba2fe

start_date

string

Filters events data for the given date range. E.g.- 2020-08-05

end_date

string

Filters events data for the given date range. E.g.- 2020-08-09

page_number

integer

This field can be used for getting 10 entries at a time. if the response returns an empty list in the data field, it is safe to assume the pages are exhausted. If the points_encoded value is true, then this value will not be considered. E.g.- 1

Headers

Name
Type
Description

Api-key

string

Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f

{
    "status": true,
    "msg": "Success.",
    "code": 200,
    "data": {
        "next_page": 2,
        "pages": 3,
        "prev_page": null,
        "account_id": "5c0179df6f994031158a5646",
        "events": [
            {
                "id": "5f2c03c40401996e6d6c8ad4",
                "user_description": "postman device test",
                "user_id": "5f2be41bb3611421f252e3c3",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2be4ede3872b4e6519f8f2",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T11:09:33.280",
                "created_at": "2020-08-06T13:21:08.283",
                "is_deleted": false
            },
            {
                "id": "5f2be6634fac5ac31f740a09",
                "user_description": "postman device test",
                "user_id": "5f2be3c5b3611421f152e0dc",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2be662e3872b4f0d138e13",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T11:15:46.107",
                "created_at": "2020-08-06T11:15:47.285",
                "is_deleted": false
            },
            {
                "id": "5f2be5ab972cb25c216b8bc8",
                "user_description": "postman device test",
                "user_id": "5f2be41bb3611421f252e3c3",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2be4ede3872b4e6519f8f2",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T11:09:33.280",
                "created_at": "2020-08-06T11:12:43.542",
                "is_deleted": false
            },
            {
                "id": "5f2be4ef4fac5ac31f740a08",
                "user_description": "postman device test",
                "user_id": "5f2be41bb3611421f252e3c3",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2be4ede3872b4e6519f8f2",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T11:09:33.280",
                "created_at": "2020-08-06T11:09:35.655",
                "is_deleted": false
            },
            {
                "id": "5f2be028ad018ed53929605a",
                "user_description": "postman device test",
                "user_id": "5f2bd1e9b3611421f252e36c",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2be027e3872b4b97b61f6d",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T10:49:11.381",
                "created_at": "2020-08-06T10:49:12.636",
                "is_deleted": false
            },
            {
                "id": "5f2bdd15cb6a6dd83389d2fe",
                "user_description": "postman device test",
                "user_id": "5f2bd4cfb3611421f252e378",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2bdd12e3872b49dc215b1f",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T10:36:02.951",
                "created_at": "2020-08-06T10:36:05.404",
                "is_deleted": false
            },
            {
                "id": "5f2bd913b371fa62bad8fda5",
                "user_description": "postman device test",
                "user_id": "5f2bd1e9b3611421f252e36c",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2bd90fe3872b46fe340362",
                "event_type": "motion:geofence:exit",
                "recorded_at": "2020-08-06T10:18:55.914",
                "created_at": "2020-08-06T10:18:59.112",
                "is_deleted": false
            },
            {
                "id": "5f2bd565b371fa62bad8fda2",
                "user_description": "postman device test",
                "user_id": "5f2bd1e9b3611421f252e36c",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5f2bd562e3872b43e156a54a",
                "event_type": "motion:geofence:entry",
                "recorded_at": "2020-08-06T10:03:14.617",
                "created_at": "2020-08-06T10:03:17.245",
                "is_deleted": false
            },
            {
                "id": "5efc696e8cb244000185ea2d",
                "user_description": "location test device",
                "user_id": "5efc67c6a40ad3095d17be18",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5efc696ca40ad3095d17be79",
                "app_id": "5e95cbe83722794cf72ea0af_1",
                "event_type": "exit",
                "coordinates": {
                    "type": "Point",
                    "coordinates": [
                        80.08113,
                        12.91806
                    ]
                },
                "recorded_at": "2020-07-01T10:46:03.000",
                "timezone_offset": "+0530",
                "created_at": "2020-07-01T10:46:06.459",
                "is_deleted": false
            },
            {
                "id": "5efc696a8cb244000185ea29",
                "user_description": "location test device",
                "user_id": "5efc67c6a40ad3095d17be18",
                "geofence_description": "365",
                "geofence_id": "5eecc7491e621663c93ba2fe",
                "location_id": "5efc6968a40ad3096417bb5f",
                "app_id": "5e95cbe83722794cf72ea0af_1",
                "event_type": "entry",
                "coordinates": {
                    "type": "Point",
                    "coordinates": [
                        80.08572,
                        12.91959
                    ]
                },
                "recorded_at": "2020-07-01T10:46:00.000",
                "timezone_offset": "+0530",
                "created_at": "2020-07-01T10:46:02.379",
                "is_deleted": false
            }
        ]
    }
}

Sample Request

curl --location --request GET 'https://api.roam.ai/v1/api/event/?geofence_id=5eecc7491e621663c93ba2fe&start_date=2020-08-05&end_date=2020-08-09&page_number=1&user_id=5f2bd1e9b3611421f252e36c' \
--header 'Api-Key: 50ccfe35a1ee409f9791cdee340e5864'
PreviousEvents APINextTrip Events

Last updated 3 years ago

Was this helpful?