API Reference - pims.vehicle.destination-coordinate
Info: Stellantis Mobile SDK for ex Groupe PSA brands (CitroĂŤn, DS, Peugeot, Opel and Vauxhall) is not publicly available for now.
This api allows sending a navigation (using Coordinates) from the mobile phone to the vehicle.
Input Parameter | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
action | Name of the action to perform, in this case |
String |
|
coordinate
|
true |
vin | Vehicle Identification Number |
String |
|
VR1AB12C3D4567890
|
true |
preserve | If this parameter is true, the navigation will be send as soon as the vehicle is connected. Otherwise it will only try once. |
Boolean |
|
true
|
true |
location | Destination Location. |
Object |
/ | / |
|
location
.latitude |
latitude value |
Double |
|
48.77232
|
true |
location
.longitude |
longitude value |
Double |
|
2.2151043
|
true |
Output Data | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
status | Indicates the status of request. |
Enum of Strings |
- notAvailable
- sent
- stored
|
sent
|
reason | Description of the failure reason. |
string |
- GEOLOC_PRIVATE
- FULL_PRIVATE
|
GEOLOC_PRIVATE
|
Error | |
---|---|
Error Code | Error Label |
2101 | Missing [PARAMETER] parameter |
2102 | Invalid [PARAMETER] parameter |
2205 | CEA Error |
2301 | Need Basic Authentication (to get CVS token) |
2341 | [Location or Bluetooth] need to be activated on the phone |
2342 | Smartphone not paired with the vehicle |
2367 | Service not started |
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pims.set("pims.vehicle.destination",
mapOf( /* parameters */
Pair("action", "coordinate"),
Pair("vin", "VR1AB12C3D4567890"),
Pair("preserve", true),
Pair("coordinate", map0f(
// coordinates
Pair("latitude", "48.77232"),
Pair("longitude", "2.2151043"),
)
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pims.set(api: "pims.vehicle.destination",
parameters: [
"action": "coordinate"
"vin": "VR1AB12C3D4567890",
"preserve": true,
"coordinate": [
// coordinates
"latitude": "48.77232",
"longitude": "2.2151043",
] ]
) { (message) in
if message["status"] == "SUCEEDED" { } // handle succeeded status
else if message["status"] == "FAILED" { } // handle failed status
}
1
2
3
4
5
6
7
8
9
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": {
"status": "sent",
"reason": "GEOLOC_PRIVATE"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// representation of the `failed` dictionary objects messages as JSON
/* -------- STATUS FAILED: 2101 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2101,
"label": "Missing [PARAMETER] parameter"
}
}
/* -------- STATUS FAILED: 2102 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2102,
"label": "Invalid [PARAMETER] parameter"
}
}
/* -------- STATUS FAILED: 2205 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2205,
"label": "CEA Error"
}
}
/* -------- STATUS FAILED: 2301 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2301,
"label": "Need Basic Authentication (to get CVS token)"
}
}
/* -------- STATUS FAILED: 2341 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2341,
"label": "[Location or Bluetooth] need to be activated on the phone"
}
}
/* -------- STATUS FAILED: 2342 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2342,
"label": "Smartphone not paired with the vehicle"
}
}
/* -------- STATUS FAILED: 2367 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2367,
"label": "Service not started"
}
}