Trips

The Get Trips API lets you fetch the trips data of all active ongoing and completed trips for your users.

get
Get Trips List API

https://api.geospark.co/v1/api/trips/
The Get Trips list API lets you fetch the list of all trips data of all active ongoing and completed trips for your users.
Request
Response
Headers
Api-Key
required
string
33223kjhdcscijhb5sdbsdmjsdcbj5f
Content-Type
required
string
application/json
Query Parameters
start_date
optional
string
This field can be used for defining a start date from which the list of users need to be shown. Input Data: 2018-10-19
end_date
optional
string
This field can be used to define a range of time till when the last document needs to be provided. 'end_date' should always be greater than 'start_date'. If end_date is provided then start_date should also be provided.If only start_date is passed, the user list for same day will be returned. Input Date: 2018-10-20
page_number
optional
integer
This field can be used for getting 10 entries at a time. If the response returns an empty list in data filed, it is safe to assume the pages are exhausted.
200: OK
JSON
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"next_page": 2,
"pages": 7,
"prev_page": null,
"trips": [
{
"id": "5cceed3877aebe551032bd53",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [],
"destinations": [
[
{
"id": "5cceed5277aebe551032bd57",
"trip_id": "5cceed3877aebe551032bd53",
"created_at": "2019-05-05T14:04:01.192",
"updated_at": "2019-05-05T14:04:01.192",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceed3a77aebe551032bd54",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:37.536",
"is_deleted": false
}
],
[
{
"id": "5cceed4c77aebe551032bd55",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:56.171",
"is_deleted": false
}
],
[
{
"id": "5cceed4f77aebe551032bd56",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:58.834",
"is_deleted": false
}
],
[
{
"id": "5cceed9777aebe558cd83c60",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:started",
"trip_location_id": null,
"user_location_id": "5cceed7d77aebe558cd83c5e",
"created_at": "2019-05-05T14:04:54.232",
"is_deleted": false
}
],
[
{
"id": "5cceedbd77aebe558cd83c63",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:completed",
"trip_location_id": null,
"user_location_id": "5cceedb177aebe558cd83c61",
"created_at": "2019-05-05T14:05:47.278",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": true,
"is_deleted": false,
"created_at": "2019-05-05T14:03:36.002",
"updated_at": "2019-05-05T14:05:49.837"
},
{
"id": "5cceeb9277aebe52e845a8b3",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [],
"destinations": [
[
{
"id": "5cceeba877aebe52e845a8b7",
"trip_id": "5cceeb9277aebe52e845a8b3",
"created_at": "2019-05-05T13:56:55.093",
"updated_at": "2019-05-05T13:56:55.093",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceeb9377aebe52e845a8b4",
"trip_id": "5cceeb9277aebe52e845a8b3",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:56:35.530",
"is_deleted": false
}
],
[
{
"id": "5cceeba277aebe52e845a8b5",
"trip_id": "5cceeb9277aebe52e845a8b3",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:56:50.074",
"is_deleted": false
}
],
[
{
"id": "5cceeba577aebe52e845a8b6",
"trip_id": "5cceeb9277aebe52e845a8b3",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:56:52.738",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T13:56:34.002",
"updated_at": "2019-05-05T13:58:54.498"
},
{
"id": "5cceeb11fb9796312dc41a90",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [],
"destinations": [
[
{
"id": "5cceeb27fb9796312dc41a94",
"trip_id": "5cceeb11fb9796312dc41a90",
"created_at": "2019-05-05T13:54:47.586",
"updated_at": "2019-05-05T13:54:47.586",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceeb11fb9796312dc41a91",
"trip_id": "5cceeb11fb9796312dc41a90",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:54:25.189",
"is_deleted": false
}
],
[
{
"id": "5cceeb27fb9796312dc41a92",
"trip_id": "5cceeb11fb9796312dc41a90",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:54:47.461",
"is_deleted": false
}
],
[
{
"id": "5cceeb27fb9796312dc41a93",
"trip_id": "5cceeb11fb9796312dc41a90",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T13:54:47.512",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T13:54:25.183",
"updated_at": "2019-05-05T13:55:08.581"
},
{
"id": "5cced38afb97963040ab7ceb",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5cced3c1fb97963040ab7cf0",
"trip_id": "5cced38afb97963040ab7ceb",
"created_at": "2019-05-05T12:14:57.005",
"updated_at": "2019-05-05T12:14:57.005",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5cced3c1fb97963040ab7cf1",
"trip_id": "5cced38afb97963040ab7ceb",
"created_at": "2019-05-05T12:14:57.010",
"updated_at": "2019-05-05T12:14:57.010",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cced38afb97963040ab7cec",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:14:02.687",
"is_deleted": false
}
],
[
{
"id": "5cced3c0fb97963040ab7ced",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:14:56.847",
"is_deleted": false
}
],
[
{
"id": "5cced3c0fb97963040ab7cee",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:origin_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:14:56.903",
"is_deleted": false
}
],
[
{
"id": "5cced3c0fb97963040ab7cef",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:14:56.956",
"is_deleted": false
}
],
[
{
"id": "5cced3e7fb97963040ab7cf9",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:started",
"trip_location_id": null,
"user_location_id": "5cced3e7fb97963040ab7cf7",
"created_at": "2019-05-05T12:15:35.546",
"is_deleted": false
}
],
[
{
"id": "5cced3f1fb97963040ab7cfc",
"trip_id": "5cced38afb97963040ab7ceb",
"user_id": null,
"event_type": "trip:completed",
"trip_location_id": null,
"user_location_id": "5cced3f1fb97963040ab7cfa",
"created_at": "2019-05-05T12:15:45.712",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": true,
"is_deleted": false,
"created_at": "2019-05-05T12:14:02.679",
"updated_at": "2019-05-05T12:15:45.716"
},
{
"id": "5cced06efb9796300649b444",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5cced13efb9796300649b44d",
"trip_id": "5cced06efb9796300649b444",
"created_at": "2019-05-05T12:04:14.593",
"updated_at": "2019-05-05T12:04:14.593",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5cced13efb9796300649b44e",
"trip_id": "5cced06efb9796300649b444",
"created_at": "2019-05-05T12:04:14.598",
"updated_at": "2019-05-05T12:04:14.598",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cced06efb9796300649b445",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:00:46.279",
"is_deleted": false
}
],
[
{
"id": "5cced13efb9796300649b44a",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:04:14.423",
"is_deleted": false
}
],
[
{
"id": "5cced13efb9796300649b44b",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:origin_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:04:14.486",
"is_deleted": false
}
],
[
{
"id": "5cced13efb9796300649b44c",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T12:04:14.541",
"is_deleted": false
}
],
[
{
"id": "5cced18bfb9796300649b455",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:started",
"trip_location_id": null,
"user_location_id": "5cced18bfb9796300649b453",
"created_at": "2019-05-05T12:05:31.348",
"is_deleted": false
}
],
[
{
"id": "5cced211fb9796300649b45e",
"trip_id": "5cced06efb9796300649b444",
"user_id": null,
"event_type": "trip:ended",
"trip_location_id": null,
"user_location_id": "5cced211fb9796300649b45c",
"created_at": "2019-05-05T12:07:45.293",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": true,
"is_deleted": false,
"created_at": "2019-05-05T12:00:46.273",
"updated_at": "2019-05-05T12:07:45.298"
},
{
"id": "5ccec47ffb97962d91f39e75",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5ccec4bbfb97962d91f39e7b",
"trip_id": "5ccec47ffb97962d91f39e75",
"created_at": "2019-05-05T11:10:51.269",
"updated_at": "2019-05-05T11:10:51.269",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5ccec4bbfb97962d91f39e7c",
"trip_id": "5ccec47ffb97962d91f39e75",
"created_at": "2019-05-05T11:10:51.274",
"updated_at": "2019-05-05T11:10:51.274",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5ccec47ffb97962d91f39e76",
"trip_id": "5ccec47ffb97962d91f39e75",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:09:51.112",
"is_deleted": false
}
],
[
{
"id": "5ccec4bbfb97962d91f39e78",
"trip_id": "5ccec47ffb97962d91f39e75",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:10:51.088",
"is_deleted": false
}
],
[
{
"id": "5ccec4bbfb97962d91f39e79",
"trip_id": "5ccec47ffb97962d91f39e75",
"user_id": null,
"event_type": "trip:origin_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:10:51.177",
"is_deleted": false
}
],
[
{
"id": "5ccec4bbfb97962d91f39e7a",
"trip_id": "5ccec47ffb97962d91f39e75",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:10:51.222",
"is_deleted": false
}
]
],
"user_id": "5ccec272fb97962d91f39e5a",
"is_started": true,
"is_ended": true,
"is_deleted": false,
"created_at": "2019-05-05T11:09:51.107",
"updated_at": "2019-05-05T11:26:35.594"
},
{
"id": "5ccec2bffb97962d91f39e62",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5ccec2f1fb97962d91f39e65",
"trip_id": "5ccec2bffb97962d91f39e62",
"created_at": "2019-05-05T11:03:13.233",
"updated_at": "2019-05-05T11:03:13.233",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5ccec321fb97962d91f39e6b",
"trip_id": "5ccec2bffb97962d91f39e62",
"created_at": "2019-05-05T11:04:01.379",
"updated_at": "2019-05-05T11:04:01.379",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5ccec2bffb97962d91f39e63",
"trip_id": "5ccec2bffb97962d91f39e62",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:02:23.474",
"is_deleted": false
}
],
[
{
"id": "5ccec2f1fb97962d91f39e64",
"trip_id": "5ccec2bffb97962d91f39e62",
"user_id": null,
"event_type": "trip:origin_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:03:13.178",
"is_deleted": false
}
],
[
{
"id": "5ccec321fb97962d91f39e6a",
"trip_id": "5ccec2bffb97962d91f39e62",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:04:01.306",
"is_deleted": false
}
],
[
{
"id": "5ccec355fb97962d91f39e6c",
"trip_id": "5ccec2bffb97962d91f39e62",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T11:04:53.897",
"is_deleted": false
}
]
],
"user_id": "5ccec272fb97962d91f39e5a",
"is_started": true,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T11:02:23.468",
"updated_at": "2019-05-05T11:06:28.361"
},
{
"id": "5cceb9abfb97962d91f39dea",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5ccec215fb97962d91f39e54",
"trip_id": "5cceb9abfb97962d91f39dea",
"created_at": "2019-05-05T10:59:33.420",
"updated_at": "2019-05-05T10:59:33.420",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5ccec1a5fb97962d91f39e47",
"trip_id": "5cceb9abfb97962d91f39dea",
"created_at": "2019-05-05T10:57:41.988",
"updated_at": "2019-05-05T10:57:41.988",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceb9abfb97962d91f39deb",
"trip_id": "5cceb9abfb97962d91f39dea",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:23:39.747",
"is_deleted": false
}
],
[
{
"id": "5cceba3dfb97962d91f39dec",
"trip_id": "5cceb9abfb97962d91f39dea",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:26:05.780",
"is_deleted": false
}
],
[
{
"id": "5ccec1a5fb97962d91f39e46",
"trip_id": "5cceb9abfb97962d91f39dea",
"user_id": "5cceb99bfb97962d91f39de9",
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:57:41.925",
"is_deleted": false
}
],
[
{
"id": "5ccec215fb97962d91f39e53",
"trip_id": "5cceb9abfb97962d91f39dea",
"user_id": null,
"event_type": "trip:origin_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:59:33.372",
"is_deleted": false
}
]
],
"user_id": null,
"is_started": false,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T10:23:39.741",
"updated_at": "2019-05-05T10:59:33.425"
},
{
"id": "5cceb774fb97962d91f39de5",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5cceb774fb97962d91f39de6",
"trip_id": "5cceb774fb97962d91f39de5",
"created_at": "2019-05-05T10:14:12.905",
"updated_at": "2019-05-05T10:14:12.905",
"coordinates": {
"type": "Point",
"coordinates": [
77.653488,
12.859914
]
}
}
]
],
"destinations": [
[
{
"id": "5cceb774fb97962d91f39de7",
"trip_id": "5cceb774fb97962d91f39de5",
"created_at": "2019-05-05T10:14:12.909",
"updated_at": "2019-05-05T10:14:12.909",
"coordinates": {
"type": "Point",
"coordinates": [
77.606256,
12.853946
]
}
}
]
],
"events": [
[
{
"id": "5cceb774fb97962d91f39de8",
"trip_id": "5cceb774fb97962d91f39de5",
"user_id": "5cceb75afb97962d91f39de4",
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:14:12.918",
"is_deleted": false
}
]
],
"user_id": "5cceb75afb97962d91f39de4",
"is_started": false,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T10:14:12.903",
"updated_at": "2019-05-05T10:14:12.924"
},
{
"id": "5cceb612eec1a505f86b859d",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [
[
{
"id": "5cceb613eec1a505f86b859e",
"trip_id": "5cceb612eec1a505f86b859d",
"created_at": "2019-05-05T10:08:18.694",
"updated_at": "2019-05-05T10:08:18.694",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5cceb615eec1a505f86b859f",
"trip_id": "5cceb612eec1a505f86b859d",
"created_at": "2019-05-05T10:08:20.189",
"updated_at": "2019-05-05T10:08:20.190",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceb617eec1a505f86b85a0",
"trip_id": "5cceb612eec1a505f86b859d",
"user_id": "5cceb221fb97962d91f39db0",
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T10:08:22.369",
"is_deleted": false
}
]
],
"user_id": "5cceb221fb97962d91f39db0",
"is_started": true,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-05T10:08:18.053",
"updated_at": "2019-05-05T10:17:42.438"
}
]
}
}
‚Äč

get
Get Trip API

https://api.geospark.co/v1/api/trips/
This API gives you the trip data of the given trip_id.
Request
Response
Headers
Api-Key
required
string
33223kjhdcscijhb5sdbsdmjsdcbj5f
Content-Type
required
string
application/json
Query Parameters
trip_id
required
string
5c40560ea1426005bd908213
200: OK
{
"status": true,
"msg": "Success.",
"code": 200,
"data": [
{
"id": "5cceed3877aebe551032bd53",
"project_id": "5c0f7635fb979605ea1976bd",
"origins": [],
"destinations": [
[
{
"id": "5cceed5277aebe551032bd57",
"trip_id": "5cceed3877aebe551032bd53",
"created_at": "2019-05-05T14:04:01.192",
"updated_at": "2019-05-05T14:04:01.192",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cceed3a77aebe551032bd54",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:37.536",
"is_deleted": false
}
],
[
{
"id": "5cceed4c77aebe551032bd55",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:user_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:56.171",
"is_deleted": false
}
],
[
{
"id": "5cceed4f77aebe551032bd56",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:destination_added",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-05T14:03:58.834",
"is_deleted": false
}
],
[
{
"id": "5cceed9777aebe558cd83c60",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:started",
"trip_location_id": null,
"user_location_id": "5cceed7d77aebe558cd83c5e",
"created_at": "2019-05-05T14:04:54.232",
"is_deleted": false
}
],
[
{
"id": "5cceedbd77aebe558cd83c63",
"trip_id": "5cceed3877aebe551032bd53",
"user_id": null,
"event_type": "trip:completed",
"trip_location_id": null,
"user_location_id": "5cceedb177aebe558cd83c61",
"created_at": "2019-05-05T14:05:47.278",
"is_deleted": false
}
]
],
"user_id": "5cced043fb9796300649b443",
"is_started": true,
"is_ended": true,
"is_deleted": false,
"created_at": "2019-05-05T14:03:36.002",
"updated_at": "2019-05-05T14:05:49.837"
}
]
}

post
Create Trip API

https://api.geospark.co/v1/api/trips/
This API helps you to create a new trip with origin, destination and user.
Request
Response
Headers
Api-Key
required
string
Your API Key Here
Content-Type
required
string
application/json
Body Parameters
destinations
optional
array
Destination location in [long, lat] format Eg. [[77.700475, 12.957005]]
origins
optional
array
Origin location in [long, lat] format Eg. [[77.677270, 12.914132]]
user_id
optional
string
User id of the device to be assigned to this tr
200: OK
{
"status": true,
"msg": "Success.",
"code": 201,
"data": [
{
"id": "5cd0299d77aebe2d78758d32",
"origins": [
[
{
"id": "5cd0299e77aebe2d78758d33",
"trip_id": "5cd0299d77aebe2d78758d32",
"created_at": "2019-05-06T12:33:34.106",
"updated_at": "2019-05-06T12:33:34.107",
"coordinates": {
"type": "Point",
"coordinates": [
77.67727,
12.914132
]
}
}
]
],
"destinations": [
[
{
"id": "5cd0299f77aebe2d78758d34",
"trip_id": "5cd0299d77aebe2d78758d32",
"created_at": "2019-05-06T12:33:35.257",
"updated_at": "2019-05-06T12:33:35.257",
"coordinates": {
"type": "Point",
"coordinates": [
77.700475,
12.957005
]
}
}
]
],
"events": [
[
{
"id": "5cd029a277aebe2d78758d35",
"trip_id": "5cd0299d77aebe2d78758d32",
"user_id": "5cce9048fb97962cf9c6d300",
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-06T12:33:37.103",
"is_deleted": false
}
]
],
"user_id": "5cce9048fb97962cf9c6d300",
"is_started": false,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-06T12:33:33.647",
"updated_at": "2019-05-06T12:33:38.259",
"trip_tracking_url": "https://trips.gs/NWNkMDI5OWQ3N2FlYmUyZDc4NzU4ZDMyfHNmZHNnZHNh"
}
]
}

put
Update Trip API

https://api.geospark.co/v1/api/trips/
This API helps you to update the origin, destination or user_id for given trip_id.
Request
Response
Headers
Api-Key
required
string
Your API Key Here
Content-Type
required
string
application/json
Body Parameters
trip_id
required
string
Trip id which needs to be modified. Eg. 5cd0299d77aebe2d78758d32
destinations
optional
array
Destination location in [long, lat] format Eg. [[77.700475, 12.957005]]
origins
optional
array
Origin location in [long, lat] format Eg. [[77.677270, 12.914132]]
user_id
optional
string
User id of the device to be assigned to this trip. Eg. 5ccea6ed77aebe1f28fbcc24
200: OK
{
"status": true,
"msg": "Success.",
"code": 201,
"data": [
{
"id": "5cd0299d77aebe2d78758d32",
"origins": [
[
{
"id": "5cd02a7577aebe2d78758d38",
"trip_id": "5cd0299d77aebe2d78758d32",
"created_at": "2019-05-06T12:37:09.200",
"updated_at": "2019-05-06T12:37:09.200",
"coordinates": {
"type": "Point",
"coordinates": [
77.67721,
12.912132
]
}
}
]
],
"destinations": [
[
{
"id": "5cd02a7a77aebe2d78758d3a",
"trip_id": "5cd0299d77aebe2d78758d32",
"created_at": "2019-05-06T12:37:14.038",
"updated_at": "2019-05-06T12:37:14.038",
"coordinates": {
"type": "Point",
"coordinates": [
77.400475,
12.157005
]
}
}
]
],
"events": [
[
{
"id": "5cd029a277aebe2d78758d35",
"trip_id": "5cd0299d77aebe2d78758d32",
"user_id": "5cce9048fb97962cf9c6d300",
"event_type": "trip:created",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-06T12:33:37.103",
"is_deleted": false
}
],
[
{
"id": "5cd02a6f77aebe2d78758d36",
"trip_id": "5cd0299d77aebe2d78758d32",
"user_id": "5cce9048fb97962cf9c6d300",
"event_type": "trip:user_updated",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-06T12:37:02.887",
"is_deleted": false
}
],
[
{
"id": "5cd02a7377aebe2d78758d37",
"trip_id": "5cd0299d77aebe2d78758d32",
"user_id": "5cce9048fb97962cf9c6d300",
"event_type": "trip:origin_updated",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-06T12:37:06.167",
"is_deleted": false
}
],
[
{
"id": "5cd02a7777aebe2d78758d39",
"trip_id": "5cd0299d77aebe2d78758d32",
"user_id": "5cce9048fb97962cf9c6d300",
"event_type": "trip:destination_updated",
"trip_location_id": null,
"user_location_id": null,
"created_at": "2019-05-06T12:37:11.050",
"is_deleted": false
}
]
],
"user_id": "5c0f8519fb979605ea1976d7",
"is_started": false,
"is_ended": false,
"is_deleted": false,
"created_at": "2019-05-06T12:33:33.647",
"updated_at": "2019-05-06T12:37:15.191"
}
]
}