This operation was normalized from a MapmyIndia-generation specification. Validate its current Mappls host, path, package entitlement, authentication generation, and commercial availability before production use.
Call the operation
https://intouch.mapmyindia.com/iot/api/trips/1https://intouch.mapmyindia.com/iot/apiParameters
idrequiredThis is the ID of the trip which you want to fetch.
1polylineWill return the entire polyline locations of the route which was created for the trip.
truedeviceLocationWill return the last know device location details
MMI000eventWill return all the position events of the device.
trueBuild your request in eight languages
Change source-backed examples once, validate required inputs, and copy the synchronized cURL, JavaScript, Python, Java, C#, Go, PHP, or Ruby request. Credentials remain environment references, and this page never sends a provider request.
https://intouch.mapmyindia.com/iot/api/trips/1?polyline=true&deviceLocation=MMI000&event=truecurl --request GET \
--url 'https://intouch.mapmyindia.com/iot/api/trips/1?polyline=true&deviceLocation=MMI000&event=true' \
--header "Accept: application/json" \
--header "Authorization: Bearer ${MAPPLS_INTOUCH_TOKEN}"Credential-safe by constructionSet MAPPLS_INTOUCH_TOKEN only in your trusted runtime. Code generation stays local. Sandbox execution sends only bounded fixture inputs to this developer platform and never reads a credential or calls Mappls.
Send a production-shaped request
Examples use environment-backed access tokens, explicit timeouts where supported, status checks, and JSON bodies derived from the source schema. Replace sample identifiers and coordinates with values from your application.
curl --request GET \
--url 'https://intouch.mapmyindia.com/iot/api/trips/1' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'Responses
OK - successful operation
Invalid ID - Invalid trip id or trip id does not exist.
Bad Request - Invalid ID supplied or invalid data type.
Unauthorized Request. Access to API is forbidden.
URL Not Found
200 response fields
dataNo field description in the source contract.
exampledata[].tripIdid of the trip
5ef5a9e98a92df3a4a894db0data[].deviceIdid of the device which is associated with the trip.
1data[].status1 - active trip. 2 - completed trip
1data[].closureTypetype of trip closure. 1 - trip will get closed based on the planned end time. 2 - trip will close when the device enters the destination area/geofence. 3 - trip will get closed manually by the user
1data[].forceCloseboolean value - if true then trip will get automatically closed as soon as the device gets associated with another trip.
truedata[].namename of the trip
my tripdata[].polylinePointsThis is the route polyline. It Will get returned for single trip only if polyline query param is set to true in the API.
exampledata[].polylinePoints.coordinatesNo field description in the source contract.
28.612964,77.229463data[].polylinePoints.coordinates[].lnglongitude point
77.229463data[].polylinePoints.coordinates[].latlatititude point
28.612964data[].locationlocation data of the device. This will get returned only for a single trip when the 'deviceLocation' query param is set to true in the API.
28.612964,77.229463data[].location.gpsTimegps time of the device
1700000000000data[].location.gprsTimegps time of the device
1700000000000data[].location.latitudelatitude
28.612964data[].location.longitudelongitude
77.229463data[].location.addresslast location address of the device
exampledata[].location.statusmovement status of the device 1 is Moving 2 is idle 3 is stopped 4 is towing 5 is No Data 6 is power off i,e the device's battery is disconnected from the vehicle battery 7 is No GPS 12 is Activation Pending i,e the device is not yet active and is yet to send the first ping.
3data[].positionEventsNo field description in the source contract.
exampledata[].positionEvents[].timestampNo field description in the source contract.
1700000000000data[].positionEvents[].longitudeNo field description in the source contract.
77.229463data[].positionEvents[].latitudeNo field description in the source contract.
28.612964data[].destinationThis object will only get returned if the user has given a specific desntination as input while creating a trip
exampledata[].destination.geometryThis is standard geo json format.
28.612964,77.229463data[].destination.geometry.typesupports the following geometry types - Point, Polygon.
Pointdata[].destination.geometry.coordinatesNo field description in the source contract.
28.612964,77.229463data[].destination.radiusradius of the point
100data[].destination.plannedTimeplanned timestamp at which device reach the destination
1700000000000data[].destination.namename of the geofence point
exampledata[].destination.arrivalTimeactual timestamp at which device reach the destination
1700000000000data[].destination.departureTimedeparture timestamp at which device leaves the destination
1700000000000data[].destination.addressaddress of the desntination point
exampledata[].destination.timeplanned timestamp taken to reach the destination from previous point
1700000000000data[].destination.distanceplanned distance taken to reach the destination from previous point
1data[].destination.pointNamename given to the destination point.
exampledata[].destination.metadatawill get returned only if it was mentioned while creating a trip.
exampledata[].destination.metadata.myattributedummy meta data value. this can be any key-value data pair.
sample textdata[].geofencesvarious points of the trip. This will only get returned in case the these geofence points were explicitly mentioned while creating a trip
exampledata[].geofences[].geometryThis is standard geo json format.
28.612964,77.229463data[].geofences[].geometry.typesupports the following geometry types - Point, Polygon.
Pointdata[].geofences[].geometry.coordinatesNo field description in the source contract.
28.612964,77.229463data[].geofences[].radiusradius of the point
100data[].geofences[].plannedTimeplanned timestamp at which device reach the destination
1700000000000data[].geofences[].namename of the geofence point
exampledata[].geofences[].arrivalTimeactual timestamp at which device reach the destination
1700000000000data[].geofences[].departureTimedeparture timestamp at which device leaves the destination
1700000000000data[].geofences[].addressaddress of the desntination point
exampledata[].geofences[].timeplanned timestamp taken to reach the destination from previous point
1700000000000data[].geofences[].distanceplanned distance taken to reach the destination from previous point
1data[].geofences[].pointNamename given to the destination point.
exampledata[].geofences[].metadatawill get returned only if it was mentioned while creating a trip.
exampledata[].geofences[].metadata.myattributedummy meta data value. this can be any key-value data pair.
sample textdata[].startstart point of the trip. This will only get returned in case the start point was explicitly mentioned while creating a trip
exampledata[].start.geometryThis is standard geo json format.
28.612964,77.229463data[].start.geometry.typesupports the following geometry types - Point, Polygon.
Pointdata[].start.geometry.coordinatesNo field description in the source contract.
28.612964,77.229463data[].start.radiusradius of the point
100data[].start.plannedTimeplanned timestamp at which device reach the destination
1700000000000data[].start.namename of the geofence point
exampledata[].start.arrivalTimeactual timestamp at which device reach the destination
1700000000000data[].start.departureTimedeparture timestamp at which device leaves the destination
1700000000000data[].start.addressaddress of the desntination point
exampledata[].start.timeplanned timestamp taken to reach the destination from previous point
1700000000000data[].start.distanceplanned distance taken to reach the destination from previous point
1data[].start.pointNamename given to the destination point.
exampledata[].start.metadatawill get returned only if it was mentioned while creating a trip.
exampledata[].start.metadata.myattributedummy meta data value. this can be any key-value data pair.
sample textdata[].summaryNo field description in the source contract.
exampledata[].summary.startedOnthe actual start timestamp of the trip.
1data[].summary.durationthe actual duration time (in seconds) of the trip.
1data[].summary.distancethe actual distance (in meters) covered in the trip.
7876.33data[].summary.endedOnthe actual end timestamp of the trip.
1593157994data[].summary.delayedBythe actual timestamp by which the trip got delayed.
1data[].summary.plannedEndTimethe planned end timestamp of the trip.
1700000000000data[].summary.plannedStartTimethe planned start timestamp of the trip.
1700000000000data[].summary.plannedDurationthe planned duration time (in seconds) of the trip.
1data[].summary.plannedDistancethe planned distance (in meters) of the trip.
1{
"data": [
{
"tripId": "5ef5a9e98a92df3a4a894db0",
"deviceId": "1",
"status": 1,
"closureType": 1,
"forceClose": "true",
"name": "my trip",
"polylinePoints": {
"coordinates": []
},
"location": {
"gpsTime": 1593261959,
"gprsTime": 1593261959,
"latitude": 29.507586,
"longitude": 79.507586,
"address": "example",
"status": 3
}
}
]
}Operate it safely
This operation observes durable platform state. Preserve resource identifiers and account for pagination, delay, and eventual consistency.
Contract provenance
- Source file
contenthub/dochub/mapmyindia-intouch-rest-apis/custom/trip.json- SHA-256
f475d06cfb9d7bafd8521d713749489be1b26d16de205007fd0b42eef06c254f- Normalization
- Fields are parsed from OpenAPI. Operational guidance and language samples are generated and labeled separately.
- Source record
- Open repository audit