API Reference - pims.vehicle.services
Info: Stellantis Mobile SDK for ex Groupe PSA brands (CitroĂŤn, DS, Peugeot, Opel and Vauxhall) is not publicly available for now.
Available since:
v2.0.X
Component:
O2XSendToNavTripNDrive
Operation:
This API return state of available services.
Input Parameter | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
services | List of available services name. |
List |
- o2x
- sendtonav
- tripsanddrive
|
o2x
|
true |
Output Data | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
services | Information about the service. |
Object |
/ |
|
services
.name |
Service name. |
String |
|
o2x
|
services
.status |
Status of the service. |
List |
- started
- stopped
- notLoaded
|
started
|
Error | |
---|---|
Error Code | Error Label |
2001 | Facade not initialized |
2101 | Missing [PARAMETER] parameter |
2102 | Invalid [PARAMETER] parameter |
Code Example
1
2
3
4
5
6
7
8
9
pims.get("pims.vehicle.services",
mapOf( /* parameters */
Pair("services", "o2x")
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
pims.get(api: "pims.vehicle.services",
parameters: [
"services": "o2x"
]
) { (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
10
11
12
13
14
15
16
17
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": {
"services": [
{
"name": "o2x",
"status": "started"
},
{
"name": "sendtonav",
"status": "notLoaded"
}
]
}
}
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
// representation of the `failed` dictionary objects messages as JSON
/* -------- STATUS FAILED: 2001 -------- */
{
"transactionId": "953cfefb-bc72",
"status": "FAILED",
"error": {
"code": 2001,
"label": "Facade not initialized"
}
}
/* -------- 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"
}
}