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 Trip Events
  • Sample Request

Was this helpful?

Export as PDF
  1. APIs
  2. Events API

Trip Events

The Get Trip Events API lets you fetch the events the users triggered during a trip.

GET Trip Events

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

Query Parameters

Name
Type
Description

page_number

integer

Used to go through all the pages of data. E.g.- 1

user_id

string

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

trip_id

string

Filters events data for the given trip_id. E.g.- 5cd024aa9533a30eb6147132

start_date

string

Date to define the start of date_range of data to be returned. E.g.- 2020-09-01

end_date

string

Date to define the end of date_range. E.g.- 2020-10-02

Headers

Name
Type
Description

Api-key

string

Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f

{
    "status": true,
    "msg": "Success.",
    "code": 200,
    "data": {
        "next_page": 2,
        "pages": 2,
        "prev_page": null,
        "events": [
            {
                "trip_id": "5f7dac74ffb3fb58435309e7",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:ended",
                "created_at": "2020-10-07T11:54:47.547000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac87bd4165ae1751b49d"
            },
            {
                "trip_id": "5f7dac74ffb3fb58435309e7",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:started",
                "created_at": "2020-10-07T11:54:36.747000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac7cbd4165ae1751b49c"
            },
            {
                "trip_id": "5f7dac74ffb3fb58435309e7",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:created",
                "created_at": "2020-10-07T11:54:31.620000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac77bd4165ae1751b49b"
            },
            {
                "trip_id": "5f7dac3de5fc233612297d5d",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:created",
                "created_at": "2020-10-07T11:53:35.464000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac3fbd4165ae1751b49a"
            },
            {
                "trip_id": "5f7dac37ffb3fb583d5309e2",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:ended",
                "created_at": "2020-10-07T11:53:33.149000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac3dbd4165ae1751b499"
            },
            {
                "trip_id": "5f7dac37ffb3fb583d5309e2",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:started",
                "created_at": "2020-10-07T11:53:31.780000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac3bbd4165ae1751b498"
            },
            {
                "trip_id": "5f7dac37ffb3fb583d5309e2",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:created",
                "created_at": "2020-10-07T11:53:29.718000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dac39bd4165ae1751b497"
            },
            {
                "trip_id": "5f7dab4ee5fc233611297c78",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:ended",
                "created_at": "2020-10-07T11:50:21.457000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dab7dbd4165ae1751b496"
            },
            {
                "trip_id": "5f7dab4ee5fc233611297c78",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:reached_origin",
                "location": {
                    "type": "Point",
                    "coordinates": [
                        77.622977,
                        12.918705611879671
                    ]
                },
                "created_at": "2020-10-07T11:50:19.279000",
                "speed": 0,
                "course": 0,
                "altitude": 505.20001220703125,
                "activity": "S",
                "horizontal_accuracy": 20,
                "user_id": "5f7daae0e5fc233612297d5a",
                "location_id": "5f2ba9edb3611421f252e019",
                "trip_location_id": "5f7dab4ee5fc233611297c79",
                "recorded_at": "2020-10-07T11:50:16.158000",
                "id": "5f7dab7bbd4165ae1751b495"
            },
            {
                "trip_id": "5f7dab4ee5fc233611297c78",
                "event_source": "geospark:trip",
                "event_version": "1.0",
                "event_type": "geospark:trip:started",
                "created_at": "2020-10-07T11:50:12.378000",
                "user_id": "5f7daae0e5fc233612297d5a",
                "id": "5f7dab7447cd80500a7f7e49"
            }
        ]
    }
}

Sample Request

curl --location --request GET 'https://api.roam.ai/v1/api/event/trips/?user_id=5f71ad9a5c3a0f059acebb39' \
--header 'Api-Key: 50ccfe35a1ee409f9791cdee340e5864'
PreviousGet EventsNextNearby API

Last updated 3 years ago

Was this helpful?