Mobile SDK

iOS or Android

API Reference - pims.vehicle.event-sendToNav

Info: Stellantis Mobile SDK is not publicly available.
Tutorial: check-out Send Navigation.
SDK Version: v2.3
API Available since: v2.0
API Last update: v2.0
Plateforme Compatibility: PSA
Security:
  • Authentication: Authentication is required.
Operations:

“This api allows to be notified when a navigation is sent with pims.vehicle.destination or when old navigation are removed from cache.” Events are received when a navigation is successfully sent to the vehicle or when a navigation is removed from cache (after 24h).

Input Parameters Object
Param name Description Type Unit/Values Example Required
actionType

Action name, in this case sendToNav.

String

sendToNav

sendToNav true
Output Data Object
Data name Description Type Unit/Values Example
vin

Vehicle Identification Number.

String

n/a

VR1AB12C3D4567890
Location

Location destination of the nav send. This field is returned when a navigation is successfully sent.

Object

/
Location
 .latitude

latitude value

Double

n/a

48.77232
Location
 .longitude

longitude value

Double

n/a

2.2151043
Location
 .address

address value

String

n/a

Rte de Gisy, 78140 Vélizy-Villacoublay
userid

User id value. This field is returned when a navigation is successfully sent.

String

n/a

user@provider.tld
message

Deletion message. This field is returned when a navigation is deleted from cache.

String

Some locations have been removed.

Some locations have been removed.
Error
No errors
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Subscribe, see unsubscribe below */
pims.subscribe("pims.vehicle.event",
  mapOf( /* parameters */  
    Pair("actionType", "sendToNav")
  ) 
) { message -> when (message["status"] as? String) {
      "SUCCEEDED" -> { }                          // handle succeeded status
      "FAILED" ->    { }                          // handle failed status
      "RESULT" ->    {
        if(message["error"] != null) { }            // handle error event code
        else { }                                 // handle result event code
      }
  } }

/* Unsubscribe */
pims.unsubscribe( "pims.vehicle.event" /* no params */ )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Subscribe, see unsubscribe below */
pims.subscribe(api: "pims.vehicle.event",
  parameters: [  
    "actionType": "sendToNav"
  ]
  ) { (message) in 
    if message["status"] == "SUCCEEDED"    { }    // handle succeeded status
    else if message["status"] == "FAILED" { }    // handle failed status
    else if status == "RESULT" {
      if !message["error"].isEmpty { }            // handle error event code
      else { }                                    // handle result event code
    }
  } 

/* Unsubscribe */
pims.unsubscribe( api: "pims.vehicle.event" /* no params */ )
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "SUCCEEDED",
  "result": { }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// representation of the `result` dictionary object message as JSON
{
  "transactionId": "953cfefb-bc72",
  "status": "RESULT",
  "result": {
    "vin": "VR1AB12C3D4567890",
    "Location": {
      "latitude": 48.77232,
      "longitude": 2.2151043,
      "address": "Rte de Gisy, 78140 Vélizy-Villacoublay"
    },
    "userid": "user@provider.tld",
    "message": "Some locations have been removed."
  }
}

false