Mobile SDK

iOS or Android

    API Reference - pims.vehicle.informations-O2X

    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: O2X
    Security: Authentication is not required.
    Operations:

    This API allows to retrieve O2X vehicle informations.

    Input Parameter
    Param name Description Type Unit/Values Example Required
    actionType

    Action name, in this case O2X.

    String

    O2X: ‘get the last saved vehicle information from O2X’

    O2X true
    Output Data
    Data name Description Type Unit/Values Example
    vin

    Vehicle Identification Number

    String

    n/a

    VR1AB12C3D4567890
    receivedAt

    Receive time.

    string

    n/a

    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 batter 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

    n/a

    false
    previousAlert
     .clusterIssue

    Is cluster issue alert was active.

    Boolean

    n/a

    false
    previousAlert
     .stop

    Is stop alert was active.

    Boolean

    n/a

    true
    previousAlert
     .batteryCharge

    Is battery charge alert was active.

    Boolean

    n/a

    true
    previousAlert
     .brakeSystemProblem

    Is brake system problem alert was active.

    Boolean

    n/a

    true
    previousAlert
     .service

    Is service alert was active.

    Boolean

    n/a

    false
    previousAlert
     .batteryTemperature

    Is batter temperature alert was active.

    Boolean

    n/a

    true
    previousAlert
     .turtleMode

    Is turtle mode alert was active.

    Boolean

    n/a

    false
    data

    Data informations.

    Object

    /
    data
     .batterySoc

    BatterySoc informations.

    Object

    /
    data
     .batterySoc
      .value

    Battery soc value.

    String

    n/a

    data
     .batterySoc
      .unit

    Battery soc unit.

    String

    n/a

    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

    n/a

    data
     .remainingAutonomy
      .unit

    Remaining autonomy unit.

    String

    n/a

    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

    n/a

    data
     .chargeDelay
      .unit

    Charge delay unit.

    String

    n/a

    data
     .parkBrakeStatus

    Park brake status.

    String

    - activated

    - notActivated

    - unknown
    notActivated
    data
     .totalOdometer

    Total odometer information.

    object

    /
    data
     .totalOdometer
      .value

    Total odometer value.

    String

    n/a

    data
     .totalOdometer
      .unit

    Total odometer unit.

    String

    n/a

    Error
    Error Code Error Label
    2001

    Facade not initialized

    Code Example
    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"] == "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
    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
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": {
        "receivedAt": "YYYY-MM-DDTHH:MM:SSZ",
        "status": "charging",
        "currentAlert": {
          "parkingBrake": true,
          "clusterIssue": true,
          "stop": true,
          "batteryCharge": true,
          "brakeSystemProblem": true,
          "service": true,
          "batteryTemperature": true,
          "turtleMode": true
        },
        "previousAlert": {
          "parkingBrake": true,
          "clusterIssue": true,
          "stop": true,
          "batteryCharge": true,
          "brakeSystemProblem": true,
          "service": true,
          "batteryTemperature": true,
          "turtleMode": true
        },
        "data": {
          "batterySoc": {
              "unit": "unit_name",
              "value": 42
          },
          "systemState": "charging",
          "batteryState": "bootloader",
          "remainingAutonomy": {
              "unit": "unit_name",
              "value": 42
          },
          "rnd": "drive",
          "chargeDelay": {
              "unit": "unit_name",
              "value": 42
          },
          "parkBrakeStatus": "activated",
          "totalOdometer": {
              "unit": "unit_name",
              "value": 42
          }
        },
      }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    // representation of the `failed` dictionary objects messages as JSON
    
    /* -------- STATUS FAILED: 2001 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2001,
        "label": "Facade not initialized"
      }
    }
    

    This API allows to retrieve O2X vehicle informations.

    Input Parameter
    Param name Description Type Unit/Values Example Required
    actionType

    Action name, in this case O2X.

    String

    O2X

    O2X true
    vin

    Vehicle Identification Number. Required only if firstime: true.

    String

    n/a

    VR1AB12C3D4567890 false
    reception

    Type of subscription.

    String

    - status: 'notified when the state of the vehicle changes.'

    - information: 'notified when the device receives data from the dongle.'
    status true
    firstTime

    Indicates if is an auto start or no. If firstTime: false, vin parameter is not required.

    Boolean

    n/a

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

    Vehicle Identification Number

    String

    n/a

    VR1AB12C3D4567890
    receivedAt

    Receive time.

    string

    n/a

    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 batter 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

    n/a

    false
    previousAlert
     .clusterIssue

    Is cluster issue alert was active.

    Boolean

    n/a

    false
    previousAlert
     .stop

    Is stop alert was active.

    Boolean

    n/a

    true
    previousAlert
     .batteryCharge

    Is battery charge alert was active.

    Boolean

    n/a

    true
    previousAlert
     .brakeSystemProblem

    Is brake system problem alert was active.

    Boolean

    n/a

    true
    previousAlert
     .service

    Is service alert was active.

    Boolean

    n/a

    false
    previousAlert
     .batteryTemperature

    Is batter temperature alert was active.

    Boolean

    n/a

    true
    previousAlert
     .turtleMode

    Is turtle mode alert was active.

    Boolean

    n/a

    false
    data

    Data informations.

    Object

    /
    data
     .batterySoc

    BatterySoc informations.

    Object

    /
    data
     .batterySoc
      .value

    Battery soc value.

    String

    n/a

    data
     .batterySoc
      .unit

    Battery soc unit.

    String

    n/a

    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

    n/a

    data
     .remainingAutonomy
      .unit

    Remaining autonomy unit.

    String

    n/a

    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

    n/a

    data
     .chargeDelay
      .unit

    Charge delay unit.

    String

    n/a

    data
     .parkBrakeStatus

    Park brake status.

    String

    - activated

    - notActivated

    - unknown
    notActivated
    data
     .totalOdometer

    Total odometer information.

    object

    /
    data
     .totalOdometer
      .value

    Total odometer value.

    String

    n/a

    data
     .totalOdometer
      .unit

    Total odometer unit.

    String

    n/a

    Error
    Error Code Error Label
    2001

    Facade not initialized

    2101

    Missing [PARAMETER] parameter

    2102

    Invalid [PARAMETER] parameter

    2201

    Timeout/Polling Timeout/Command Timeout

    2203

    Invalid return [Parsing error] ou [No data] ou [invalid Data]

    2339

    Service already started

    2340

    [Permition] need to be granted

    2341

    [Location or Bluetooth] need to be activated on the phone

    Code Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    /* Subscribe, see unsubscribe below */
    pims.subscribe("pims.vehicle.informations",
      mapOf( /* parameters */  
        Pair("actionType", "O2X"),
        Pair("vin", "VR1AB12C3D4567890"),
        Pair("reception", "status"),
        Pair("firstTime", "true")
      ) 
    ) { 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.informations" /* no params */ )
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    /* Subscribe, see unsubscribe below */
    pims.subscribe(api: "pims.vehicle.informations",
      parameters: [  
      "actionType": "O2X",
      "vin": "VR1AB12C3D4567890",
      "reception": "status",
      "firstTime": "true"
      ]
      ) { (message) in 
        if message["status"] == "SUCEEDED"    { }    // 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.informations" /* no params */ )
    
    1
    2
    3
    4
    5
    6
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": null
    }
    
    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
    
    // representation of the `result` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "RESULT",
      "result": {
        "receivedAt": "YYYY-MM-DDTHH:MM:SSZ",
        "status": "charging",
        "currentAlert": {
          "parkingBrake": true,
          "clusterIssue": true,
          "stop": true,
          "batteryCharge": true,
          "brakeSystemProblem": true,
          "service": true,
          "batteryTemperature": true,
          "turtleMode": true
        },
        "previousAlert": {
          "parkingBrake": true,
          "clusterIssue": true,
          "stop": true,
          "batteryCharge": true,
          "brakeSystemProblem": true,
          "service": true,
          "batteryTemperature": true,
          "turtleMode": true
        },
        "data": {
          "batterySoc": {
              "unit": "unit_name",
              "value": 42
          },
          "systemState": "charging",
          "batteryState": "bootloader",
          "remainingAutonomy": {
              "unit": "unit_name",
              "value": 42
          },
          "rnd": "drive",
          "chargeDelay": {
              "unit": "unit_name",
              "value": 42
          },
          "parkBrakeStatus": "activated",
          "totalOdometer": {
              "unit": "unit_name",
              "value": 42
          }
        },
      }
    }
    
    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
    66
    67
    68
    69
    70
    71
    72
    73
    74
    
    // 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"
      }
    }
    /* -------- STATUS FAILED: 2201 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2201,
        "label": "Timeout/Polling Timeout/Command Timeout"
      }
    }
    /* -------- STATUS FAILED: 2203 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2203,
        "label": "Invalid return [Parsing error] ou [No data] ou [invalid Data]"
      }
    }
    /* -------- STATUS FAILED: 2339 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2339,
        "label": "Service already started"
      }
    }
    /* -------- STATUS FAILED: 2340 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2340,
        "label": "[Permition] need to be granted"
      }
    }
    /* -------- STATUS FAILED: 2341 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2341,
        "label": "[Location or Bluetooth] need to be activated on the phone"
      }
    }