Get Trip Summary API

Explore how to get a trip summary with our Trip API

Get Trip Summary

GET https://api.roam.ai/v2/trips/:id/summary

Get the summary of the given trip id.

Path Parameters

NameTypeDescription

id*

String

Retrieves the trip summary with the given ID.

Headers

NameTypeDescription

Authorization*

String

Bearer <API-KEY>

{
   "code": 200,
   "description": "The trip summary for requested id.",
   "message": "trip_summary",
   "trip": {
       "id": "6221bf4393ade81ce90c8c5c",
       "trip_state": "ended",
       "total_distance": 1942.08,
       "total_duration": 328,
       "total_elevation_gain": 52,
       "name": "trip name",
       "description": "trip description",
       "metadata": {
           "Key1": "value1"
       },
       "start_location": {
           "id": "6221bf683d4d460000e33446",
           "metadata": {},
           "address": "Bailey Road, Priyadarshi Nagar, Danapur, Dinapur-Cum-Khagaul, Patna District, Bihar, 801506, India",
           "recorded_at": "2022-03-04T07:27:36.645",
           "geometry": {
               "type": "Point",
               "coordinates": [
                   85.06961939,
                   25.60647234
               ]
           }
       },
       "end_location": {
           "id": "6221c1493d4d460000e334c1",
           "metadata": {},
           "address": "Priyadarshi Nagar, Danapur, Dinapur-Cum-Khagaul, Patna District, Bihar, 800018, India",
           "recorded_at": "2022-03-04T07:35:37.382",
           "geometry": {
               "type": "Point",
               "coordinates": [
                   85.06689824,
                   25.61904625
               ]
           }
       },
       "started_at": "2022-03-04T07:27:36.645",
       "ended_at": "2022-03-04T07:35:37.382",
       "created_at": "2022-03-04T07:26:59.480",
       "updated_at": "2022-03-04T07:35:39.913",
       "user": {
           "id": "6221bc24ffb3fb125a2e2342",
           "name": "",
           "description": "",
           "metadata": {
               "Mobile": "1234567890",
               "Name": "Nikhil"
           }
       },
       "stops": [
           {
               "id": "6221bf4393ade81ce90c8c5b",
               "name": "STOP 1",
               "description": "tea break",
               "metadata": {
                   "Key1": "value1"
               },
               "address": "Bangalore",
               "geometry_radius": 600,
               "geometry": {
                   "type": "Point",
                   "coordinates": [
                       85.30614739,
                       23.5155215
                   ]
               },
               "created_at": "2022-03-04T07:26:59.475",
               "updated_at": "2022-03-04T07:26:59.475",
               "arrived_at": null,
               "departed_at": null
           }
       ],
       "events": [
           {
               "id": "6221bf45b5ef8c40ac13ff5e",
               "trip_id": "6221bf4393ade81ce90c8c5c",
               "location_id": "",
               "user_id": "6221bc24ffb3fb125a2e2342",
               "event_type": "roam:trip:created",
               "created_at": "2022-03-04T07:27:01.615",
               "event_source": "roam:trip",
               "event_version": "1.0"
           },
           {
               "id": "6221bf6e1674e3543f398a40",
               "trip_id": "6221bf4393ade81ce90c8c5c",
               "location_id": "6221bf683d4d460000e33446",
               "user_id": "6221bc24ffb3fb125a2e2342",
               "event_type": "roam:trip:started",
               "created_at": "2022-03-04T07:27:41.257",
               "event_source": "roam:trip",
               "event_version": "1.0"
           },
           {
               "id": "6221c0701674e3543f398a41",
               "trip_id": "6221bf4393ade81ce90c8c5c",
               "location_id": "6221c06d3d4d460000e3346c",
               "user_id": "6221bc24ffb3fb125a2e2342",
               "event_type": "roam:trip:paused",
               "created_at": "2022-03-04T07:31:59.919",
               "event_source": "roam:trip",
               "event_version": "1.0"
           },
           {
               "id": "6221c0e1b5ef8c40ac13ff5f",
               "trip_id": "6221bf4393ade81ce90c8c5c",
               "location_id": "6221c0dd3d4d460000e33492",
               "user_id": "6221bc24ffb3fb125a2e2342",
               "event_type": "roam:trip:resumed",
               "created_at": "2022-03-04T07:33:53.222",
               "event_source": "roam:trip",
               "event_version": "1.0"
           },
           {
               "id": "6221c14d1674e3543f398a42",
               "trip_id": "6221bf4393ade81ce90c8c5c",
               "location_id": "6221c1493d4d460000e334c1",
               "user_id": "6221bc24ffb3fb125a2e2342",
               "event_type": "roam:trip:ended",
               "created_at": "2022-03-04T07:35:41.291",
               "event_source": "roam:trip",
               "event_version": "1.0"
           }
       ],
       "route_indexes": [
           [
               1,
               39
           ],
           [
               40,
               86
           ]
       ],
       "route": [
           {
               "coordinates": {
                   "coordinates": [
                       85.06961939,
                       25.60647234
                   ],
                   "type": "Point"
               },
               "speed": 0,
               "altitude": 110,
               "activity": "STOP",
               "recorded_at": "2022-03-04T07:27:36.645",
               "metadata": null,
               "distance": 0,
               "duration": 0,
               "elevation_gain": 0
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06968719,
                       25.60665091
                   ],
                   "type": "Point"
               },
               "speed": 13,
               "altitude": 129.82,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:28:31.744",
               "metadata": null,
               "distance": 21.01,
               "duration": 55,
               "elevation_gain": 19
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06948914,
                       25.60671479
                   ],
                   "type": "Point"
               },
               "speed": 6,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:28:41.816",
               "metadata": null,
               "distance": 42.12,
               "duration": 65,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06929126,
                       25.60677863
                   ],
                   "type": "Point"
               },
               "speed": 14,
               "altitude": 129.38,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:04.882",
               "metadata": null,
               "distance": 63.21,
               "duration": 88,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06904013,
                       25.60685963
                   ],
                   "type": "Point"
               },
               "speed": 24,
               "altitude": 129.91,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:09.838",
               "metadata": null,
               "distance": 89.98,
               "duration": 92,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06883539,
                       25.60692568
                   ],
                   "type": "Point"
               },
               "speed": 7,
               "altitude": 129.44,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:16.823",
               "metadata": null,
               "distance": 111.8,
               "duration": 98,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06863859,
                       25.60698916
                   ],
                   "type": "Point"
               },
               "speed": 12,
               "altitude": 129.26,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:30.928",
               "metadata": null,
               "distance": 132.78,
               "duration": 112,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0684211,
                       25.60706062
                   ],
                   "type": "Point"
               },
               "speed": 22,
               "altitude": 128.27,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:35.939",
               "metadata": null,
               "distance": 156.01,
               "duration": 117,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06820577,
                       25.60713976
                   ],
                   "type": "Point"
               },
               "speed": 16,
               "altitude": 127.77,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:41.011",
               "metadata": null,
               "distance": 179.35,
               "duration": 122,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06800858,
                       25.60721223
                   ],
                   "type": "Point"
               },
               "speed": 11,
               "altitude": 127.61,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:29:45.849",
               "metadata": null,
               "distance": 200.72,
               "duration": 126,
               "elevation_gain": 20
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06781342,
                       25.60728395
                   ],
                   "type": "Point"
               },
               "speed": 9,
               "altitude": 128.85,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:10.860",
               "metadata": null,
               "distance": 221.87,
               "duration": 151,
               "elevation_gain": 21
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06759802,
                       25.60736312
                   ],
                   "type": "Point"
               },
               "speed": 18,
               "altitude": 128.68,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:15.998",
               "metadata": null,
               "distance": 245.21,
               "duration": 156,
               "elevation_gain": 21
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06739371,
                       25.60743821
                   ],
                   "type": "Point"
               },
               "speed": 11,
               "altitude": 129.95,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:21.892",
               "metadata": null,
               "distance": 267.35,
               "duration": 161,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0672014,
                       25.60751067
                   ],
                   "type": "Point"
               },
               "speed": 12,
               "altitude": 128.69,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:26.826",
               "metadata": null,
               "distance": 288.27,
               "duration": 165,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06700945,
                       25.60758558
                   ],
                   "type": "Point"
               },
               "speed": 16,
               "altitude": 128.34,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:32.845",
               "metadata": null,
               "distance": 309.26,
               "duration": 171,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06679251,
                       25.60767003
                   ],
                   "type": "Point"
               },
               "speed": 17,
               "altitude": 128.24,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:38.918",
               "metadata": null,
               "distance": 332.97,
               "duration": 177,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06660112,
                       25.60774419
                   ],
                   "type": "Point"
               },
               "speed": 13,
               "altitude": 128.32,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:42.852",
               "metadata": null,
               "distance": 353.88,
               "duration": 180,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06638153,
                       25.60782928
                   ],
                   "type": "Point"
               },
               "speed": 19,
               "altitude": 127.84,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:47.844",
               "metadata": null,
               "distance": 377.87,
               "duration": 184,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0661767,
                       25.60790865
                   ],
                   "type": "Point"
               },
               "speed": 26,
               "altitude": 128.25,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:52.856",
               "metadata": null,
               "distance": 400.24,
               "duration": 189,
               "elevation_gain": 23
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06594634,
                       25.60799497
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 128.76,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:55.981",
               "metadata": null,
               "distance": 425.28,
               "duration": 192,
               "elevation_gain": 24
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06573304,
                       25.60807386
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 127.26,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:30:58.857",
               "metadata": null,
               "distance": 448.42,
               "duration": 194,
               "elevation_gain": 24
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06547511,
                       25.60817058
                   ],
                   "type": "Point"
               },
               "speed": 34,
               "altitude": 128.9,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:01.830",
               "metadata": null,
               "distance": 476.46,
               "duration": 196,
               "elevation_gain": 25
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06521008,
                       25.60824988
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 129.79,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:04.882",
               "metadata": null,
               "distance": 504.49,
               "duration": 199,
               "elevation_gain": 26
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0649913,
                       25.6083136
                   ],
                   "type": "Point"
               },
               "speed": 25,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:07.885",
               "metadata": null,
               "distance": 527.56,
               "duration": 202,
               "elevation_gain": 26
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06477762,
                       25.60837584
                   ],
                   "type": "Point"
               },
               "speed": 29,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:11.031",
               "metadata": null,
               "distance": 550.1,
               "duration": 205,
               "elevation_gain": 26
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06452776,
                       25.60844861
                   ],
                   "type": "Point"
               },
               "speed": 32,
               "altitude": 129.09,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:13.865",
               "metadata": null,
               "distance": 576.45,
               "duration": 207,
               "elevation_gain": 26
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06426739,
                       25.60851561
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:16.873",
               "metadata": null,
               "distance": 603.63,
               "duration": 210,
               "elevation_gain": 27
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06405443,
                       25.60857429
                   ],
                   "type": "Point"
               },
               "speed": 24,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:19.974",
               "metadata": null,
               "distance": 625.98,
               "duration": 213,
               "elevation_gain": 27
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06386509,
                       25.60864441
                   ],
                   "type": "Point"
               },
               "speed": 24,
               "altitude": 129.01,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:22.914",
               "metadata": null,
               "distance": 646.52,
               "duration": 215,
               "elevation_gain": 27
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06364274,
                       25.60872913
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 128.36,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:26.044",
               "metadata": null,
               "distance": 670.75,
               "duration": 218,
               "elevation_gain": 27
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06341159,
                       25.60881739
                   ],
                   "type": "Point"
               },
               "speed": 20,
               "altitude": 129.18,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:29.963",
               "metadata": null,
               "distance": 695.94,
               "duration": 221,
               "elevation_gain": 28
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06322453,
                       25.60888629
                   ],
                   "type": "Point"
               },
               "speed": 23,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:33.856",
               "metadata": null,
               "distance": 716.22,
               "duration": 224,
               "elevation_gain": 29
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06302312,
                       25.60895644
                   ],
                   "type": "Point"
               },
               "speed": 19,
               "altitude": 129.83,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:38.029",
               "metadata": null,
               "distance": 737.89,
               "duration": 228,
               "elevation_gain": 29
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06280411,
                       25.60903273
                   ],
                   "type": "Point"
               },
               "speed": 22,
               "altitude": 128.76,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:41.848",
               "metadata": null,
               "distance": 761.45,
               "duration": 231,
               "elevation_gain": 29
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06256706,
                       25.60911529
                   ],
                   "type": "Point"
               },
               "speed": 22,
               "altitude": 128.39,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:45.793",
               "metadata": null,
               "distance": 786.95,
               "duration": 234,
               "elevation_gain": 29
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0623316,
                       25.6091994
                   ],
                   "type": "Point"
               },
               "speed": 31,
               "altitude": 129.52,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:48.884",
               "metadata": null,
               "distance": 812.37,
               "duration": 237,
               "elevation_gain": 30
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06211789,
                       25.60929494
                   ],
                   "type": "Point"
               },
               "speed": 27,
               "altitude": 128.6,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:51.924",
               "metadata": null,
               "distance": 836.31,
               "duration": 240,
               "elevation_gain": 30
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06193204,
                       25.60937814
                   ],
                   "type": "Point"
               },
               "speed": 24,
               "altitude": 129.52,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:31:54.941",
               "metadata": null,
               "distance": 857.13,
               "duration": 243,
               "elevation_gain": 31
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06182,
                       25.60942829
                   ],
                   "type": "Point"
               },
               "speed": 0,
               "altitude": 129.91,
               "activity": "STOP",
               "recorded_at": "2022-03-04T07:31:57.273",
               "metadata": null,
               "distance": 869.68,
               "duration": 245,
               "elevation_gain": 31
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06280688,
                       25.61014692
                   ],
                   "type": "Point"
               },
               "speed": 0,
               "altitude": 127.47762887,
               "activity": "STOP",
               "recorded_at": "2022-03-04T07:33:51.349",
               "metadata": null,
               "distance": 869.68,
               "duration": 0,
               "elevation_gain": 31
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06297614,
                       25.61050536
                   ],
                   "type": "Point"
               },
               "speed": 39,
               "altitude": 129.96,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:33:53.057",
               "metadata": null,
               "distance": 913.04,
               "duration": 246,
               "elevation_gain": 34
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06306297,
                       25.61068923
                   ],
                   "type": "Point"
               },
               "speed": 39,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:33:55.087",
               "metadata": null,
               "distance": 935.28,
               "duration": 248,
               "elevation_gain": 34
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.0631498,
                       25.6108731
                   ],
                   "type": "Point"
               },
               "speed": 39,
               "altitude": 130,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:33:56.975",
               "metadata": null,
               "distance": 957.52,
               "duration": 249,
               "elevation_gain": 34
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06323663,
                       25.61105697
                   ],
                   "type": "Point"
               },
               "speed": 39,
               "altitude": 129.62,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:33:58.909",
               "metadata": null,
               "distance": 979.76,
               "duration": 250,
               "elevation_gain": 34
           },
           {
               "coordinates": {
                   "coordinates": [
                       85.06331741,
                       25.61122804
                   ],
                   "type": "Point"
               },
               "speed": 34,
               "altitude": 129.15,
               "activity": "MOVING",
               "recorded_at": "2022-03-04T07:34:01.095",
               "metadata": null,