API Reference - pims.vehicle.informations-O2X
This API allows to retrieve O2X vehicle informations.
Input Parameters Object | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
actionType | Action name, in this case |
String |
|
O2X
|
true |
Output Data Object | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
vin | Vehicle Identification Number. |
String |
|
VR1AB12C3D4567890
|
receivedAt | Receive time. |
String |
|
YYYY-MM-DDTHH:MM:SSZ
|
status | Vehicle status. |
String |
- unknown
- driving
- parked
- charging
|
charging
|
currentAlert | CurrentAlert informations. |
Object |
/ |
|
currentAlert
.parkingBrake |
Is parking brake alert active. |
Boolean |
|
false
|
currentAlert
.clusterIssue |
Is cluster issue alert active. |
Boolean |
|
false
|
currentAlert
.stop |
Is stop alert active. |
Boolean |
|
true
|
currentAlert
.batteryCharge |
Is battery charge alert active. |
Boolean |
|
true
|
currentAlert
.brakeSystemProblem |
Is brake system problem alert. |
Boolean |
|
true
|
currentAlert
.service |
Is service alert active. |
Boolean |
|
false
|
currentAlert
.batteryTemperature |
Is battery temperature alert active. |
Boolean |
|
true
|
currentAlert
.turtleMode |
Is turtle mode alert active. |
Boolean |
|
false
|
previousAlert | PreviousAlert informations. |
Object |
/ |
|
previousAlert
.parkingBrake |
Is parking brake alert was active. |
Boolean |
|
false
|
previousAlert
.clusterIssue |
Is cluster issue alert was active. |
Boolean |
|
false
|
previousAlert
.stop |
Is stop alert was active. |
Boolean |
|
true
|
previousAlert
.batteryCharge |
Is battery charge alert was active. |
Boolean |
|
true
|
previousAlert
.brakeSystemProblem |
Is brake system problem alert was active. |
Boolean |
|
true
|
previousAlert
.service |
Is service alert was active. |
Boolean |
|
false
|
previousAlert
.batteryTemperature |
Is batter temperature alert was active. |
Boolean |
|
true
|
previousAlert
.turtleMode |
Is turtle mode alert was active. |
Boolean |
|
false
|
data | Data informations. |
Object |
/ |
|
data
.batterySoc |
BatterySoc informations. |
Object |
/ |
|
data
.batterySoc .value |
Battery soc value. |
String |
|
42
|
data
.batterySoc .unit |
Battery soc unit. |
String |
|
%
|
data
.systemState |
System state value. |
String |
- init
- standby
- driving
- charging
- noticed
- powerdown
- sleep
- unknown
|
sleep
|
data
.batteryState |
battery state value |
String |
- ready
- maintenaceautoid
- bootloader
- maintenancelogflash
- maintenanceexit
- maintenanceinit
- shutdownwait
- bootwait
- bootexit
- bootinit
- errorwait
- errorexit
- errorinit
- chargewait
- chargeheatingaftercharging
- chargeopenpwrrelays
- chargechargingwithheating
- chargecharging
- chargeclosepwrrelays
- chargeheatingforcharging
- chargecheckchargerstatus
- chargeactivebaltest
- chargeexit
- chargeinit
- downgradedsafetyline
- downgradedopenpwrrelays
- downgradedheating
- downgradedrunning
- downgradedclosepwrrelays
- downgradedexit
- downgradedinit
- runwaiting
- runsafetyline
- runopenpwrrelays
- runheating
- runrunning
- runclosepwrrelays
- runexit
- runinit
- docerror
- unknown
|
ready
|
data
.remainingAutonomy |
remainingAutonomy informations. |
Object |
/ |
|
data
.remainingAutonomy .value |
Remaining autonomy value. |
String |
|
42
|
data
.remainingAutonomy .unit |
Remaining autonomy unit. |
String |
|
%
|
data
.rnd |
the position of the gearbox |
String |
- unknown
- reverse
- neutral
- drive
|
neutral
|
data
.chargeDelay |
chargeDelay informations. |
Object |
/ |
|
data
.chargeDelay .value |
Charge delay value. |
String |
|
42
|
data
.chargeDelay .unit |
Charge delay unit. |
String |
|
%
|
data
.parkBrakeStatus |
Park brake status. |
String |
- activated
- notActivated
- unknown
|
notActivated
|
data
.totalOdometer |
Total odometer information. |
Object |
/ |
|
data
.totalOdometer .value |
Total odometer value. |
String |
|
%
|
data
.totalOdometer .unit |
Total odometer unit. |
String |
|
42
|
Error | ||
---|---|---|
No errors |
1
2
3
4
5
6
7
8
9
pims.get("pims.vehicle.informations",
mapOf( /* parameters */
Pair("actionType", "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.informations",
parameters: [
"actionType": "O2X"
]
) { (message) in
if message["status"] == "SUCCEEDED" { } // 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
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
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": {
"vin": "VR1AB12C3D4567890",
"receivedAt": "YYYY-MM-DDTHH:MM:SSZ",
"status": "charging",
"currentAlert": {
"parkingBrake": false,
"clusterIssue": false,
"stop": true,
"batteryCharge": true,
"brakeSystemProblem": true,
"service": false,
"batteryTemperature": true,
"turtleMode": false
},
"previousAlert": {
"parkingBrake": false,
"clusterIssue": false,
"stop": true,
"batteryCharge": true,
"brakeSystemProblem": true,
"service": false,
"batteryTemperature": true,
"turtleMode": false
},
"data": {
"batterySoc": {
"value": "42",
"unit": "%"
},
"systemState": "sleep",
"batteryState": "ready",
"remainingAutonomy": {
"value": "42",
"unit": "%"
},
"rnd": "neutral",
"chargeDelay": {
"value": "42",
"unit": "%"
},
"parkBrakeStatus": "notActivated",
"totalOdometer": {
"value": "%",
"unit": "42"
}
}
}
}
false