API reference/InTouch Telematics
POSTstatefullegacy-source evidence

This API will create a trip.

/trips

Based on the input parameters provided, a new trip will get created.

Legacy contract evidence

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

POSThttps://intouch.mapmyindia.com/iot/api/trips
Base URLhttps://intouch.mapmyindia.com/iot/api
Authenticationbearer
Journey rolecommand
Content typesapplication/raw

Parameters

NameLocationTypeDescriptionExample
No explicit parameters are declared by the source operation.

Body schema

FieldTypeDescriptionExample
deviceId
number

id of the device for which the trip is getting created.

1
name
string

name of the trip

example
forceClose
boolean

boolean value - if true then trip will get automatically closed as soon as the device gets associated with another trip.

true
closureType
integer

type 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

1
plannedEndTime
number

tentative time when trip will end. Mandatory field when user selects closure type as 1

1700000000000
metadata
object

No field description in the source contract.

example
metadata.myattribute
string

dummy meta data value. this can be any key-value data pair.

sample text
destination
object

Destination of the trip. This is not a mandatory. If the user does not provide this object still the trip will get created.

example
destination.geometry
object

This is standard geo json format.

28.612964,77.229463
destination.geometry.type
string

supports the following geometry types - Point, Polygon.

Point
destination.geometry.coordinates
array<number>

No field description in the source contract.

28.612964,77.229463
destination.radius
number

radius of the point

100
destination.name
string

name of the geofence/point

example
destination.plannedTime
number

planned time at which device reach the destination

1700000000000
destination.metadata
object

No field description in the source contract.

example
destination.metadata.myattribute
string

dummy meta data value. this can be any key-value data pair.

sample text
geofences
array<object>

No field description in the source contract.

example
geofences[].geometry
object

No field description in the source contract.

28.612964,77.229463
geofences[].geometry.type
string

supports the following geometry types - Point, Polygon.

Point
geofences[].geometry.coordinates
array<number>

No field description in the source contract.

28.612964,77.229463
geofences[].radius
number

radius of the point

100
geofences[].name
string

name of the geofence/point

example
geofences[].plannedTime
number

planned timestamp at which device reach the destination

1700000000000
geofences[].metadata
object

No field description in the source contract.

example
geofences[].metadata.myattribute
string

dummy meta data value. this can be any key-value data pair.

sample text
Request body example
{
  "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.

Local request composerCode stays local · fixtures are explicit
POSTRequest inputs
0 editable · 0 protected
This operation has no editable path or query parameters.
Generated in eight languages
Environment-backed credentials
POSThttps://intouch.mapmyindia.com/iot/api/trips
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --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.

POST /trips
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

201

Created

203

Device Not Found or invalid device id

400

Bad Request - Invalid ID supplied or invalid data type.

401

Unauthorized Request. Access to API is forbidden.

404

Not Found - URL Not Found

Operate it safely

command

This operation creates or triggers durable state. Supply an idempotency strategy and persist the returned identifier before continuing.

Keep credentials and raw tokens out of source, client bundles, prompts, and logs.Record the operation ID, status, latency, retry count, and source contract version in traces.Classify 4xx responses before retrying; back off and add jitter for retryable 5xx or transport failures.Persist resource identifiers and apply commands exactly once in effect across retries and event replay.

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.