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/tripshttps://intouch.mapmyindia.com/iot/apiParameters
Body schema
deviceIdid of the device for which the trip is getting created.
1namename of the trip
exampleforceCloseboolean value - if true then trip will get automatically closed as soon as the device gets associated with another trip.
trueclosureTypetype 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
1plannedEndTimetentative time when trip will end. Mandatory field when user selects closure type as 1
1700000000000metadataNo field description in the source contract.
examplemetadata.myattributedummy meta data value. this can be any key-value data pair.
sample textdestinationDestination of the trip. This is not a mandatory. If the user does not provide this object still the trip will get created.
exampledestination.geometryThis is standard geo json format.
28.612964,77.229463destination.geometry.typesupports the following geometry types - Point, Polygon.
Pointdestination.geometry.coordinatesNo field description in the source contract.
28.612964,77.229463destination.radiusradius of the point
100destination.namename of the geofence/point
exampledestination.plannedTimeplanned time at which device reach the destination
1700000000000destination.metadataNo field description in the source contract.
exampledestination.metadata.myattributedummy meta data value. this can be any key-value data pair.
sample textgeofencesNo field description in the source contract.
examplegeofences[].geometryNo field description in the source contract.
28.612964,77.229463geofences[].geometry.typesupports the following geometry types - Point, Polygon.
Pointgeofences[].geometry.coordinatesNo field description in the source contract.
28.612964,77.229463geofences[].radiusradius of the point
100geofences[].namename of the geofence/point
examplegeofences[].plannedTimeplanned timestamp at which device reach the destination
1700000000000geofences[].metadataNo field description in the source contract.
examplegeofences[].metadata.myattributedummy meta data value. this can be any key-value data pair.
sample text{
"deviceId": "1",
"name": "example",
"forceClose": true,
"closureType": 1,
"plannedEndTime": 1591891234,
"metadata": {
"myattribute": "sample text"
},
"destination": {
"geometry": {
"type": "Point",
"coordinates": [
77.234,
28.456
]
},
"radius": 100,
"name": "example",
"plannedTime": "1",
"metadata": {
"myattribute": "sample text"
}
},
"geofences": [
{
"geometry": {
"type": "Point",
"coordinates": [
77.234,
28.456
]
},
"radius": 100,
"name": "example",
"plannedTime": "1700000000000",
"metadata": {
"myattribute": "sample text"
}
}
]
}Build 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/tripscurl --request POST \
--url 'https://intouch.mapmyindia.com/iot/api/trips' \
--header "Accept: application/json" \
--header "Authorization: Bearer ${MAPPLS_INTOUCH_TOKEN}" \
--header "Content-Type: application/raw" \
--data-raw '{"deviceId":"1","name":"example","forceClose":true,"closureType":1,"plannedEndTime":1591891234,"metadata":{"myattribute":"sample text"},"destination":{"geometry":{"type":"Point","coordinates":[77.234,28.456]},"radius":100,"name":"example","plannedTime":"1","metadata":{"myattribute":"sample text"}},"geofences":[{"geometry":{"type":"Point","coordinates":[77.234,28.456]},"radius":100,"name":"example","plannedTime":"1700000000000","metadata":{"myattribute":"sample text"}}]}'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 POST \
--url 'https://intouch.mapmyindia.com/iot/api/trips' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"deviceId": "1",
"name": "example",
"forceClose": true,
"closureType": 1,
"plannedEndTime": 1591891234,
"metadata": {
"myattribute": "sample text"
},
"destination": {
"geometry": {
"type": "Point",
"coordinates": [
77.234,
28.456
]
},
"radius": 100,
"name": "example",
"plannedTime": "1",
"metadata": {
"myattribute": "sample text"
}
},
"geofences": [
{
"geometry": {
"type": "Point",
"coordinates": [
77.234,
28.456
]
},
"radius": 100,
"name": "example",
"plannedTime": "1700000000000",
"metadata": {
"myattribute": "sample text"
}
}
]
}'Responses
Created
Device Not Found or invalid device id
Bad Request - Invalid ID supplied or invalid data type.
Unauthorized Request. Access to API is forbidden.
Not Found - URL Not Found
Operate it safely
This operation creates or triggers durable state. Supply an idempotency strategy and persist the returned identifier before continuing.
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