Mobile SDK

iOS or Android

    API Reference - pims.vehicle.carkey

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

    Retrieve carkey status.

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

    Vehicle Identification Number

    String

    n/a

    VR1AB12C3D4567890 true
    Output Data
    Data name Description Type Unit/Values Example
    isCarKeyVerified

    true if car key is verified , otherwise false

    Boolean

    n/a

    true
    cvsStatus

    CarKey status

    String

    - unknown

    - active

    - suspended

    - disabled
    disabled
    maxReactivationDate

    If the status of carkey is suspended, user should active carkey before this date.

    String

    date

    2021-07-29T22:25:09.898Z
    Error
    Error Code Error Label
    2000

    Unknown error

    2006

    Core not well configured

    2101

    Missing [PARAMETER] parameter

    2102

    Invalid [PARAMETER] parameter

    2201

    Timeout/Polling Timeout/Command Timeout

    2202

    Network problem : No internet

    2203

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

    2204

    Server Error

    Code Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    pims.get("pims.vehicle.carkey",
      mapOf( /* parameters */  
        Pair("", "")
      ) 
    ) { 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.carkey",
      parameters: [  
      "": ""
      ]
      ) { (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
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": { 
      "isCarKeyVerified": "true",
      "cvsStatus": "disabled",
      "maxReactivationDate": "2021-07-29T22:25:09.898Z"
    } 
    }
    
    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: 2000 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2000,
        "label": "Unknown error"
      }
    }
    /* -------- STATUS FAILED: 2006 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2006,
        "label": "Core not well configured"
      }
    }
    /* -------- 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: 2202 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2202,
        "label": "Network problem : No internet"
      }
    }
    /* -------- STATUS FAILED: 2203 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2203,
        "label": "Invalid return [Parsing error] ou [No data] ou [invalid Data]"
      }
    }
    /* -------- STATUS FAILED: 2204 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2204,
        "label": "Server Error"
      }
    }
    

    Retrieve carkey status.

    Input Parameter
    No params
    Output Data
    Data name Description Type Unit/Values Example
    hasCarKey

    True if car key is set with success, false otherwise.

    Boolean

    true/false

    true
    vin

    Vehicle Identification Number

    String

    n/a

    VR1AB12C3D45678909
    securityCode

    Security code

    String

    n/a

    c2hhemFtCg==
    securityExpiration

    Expiration date of the security code.

    String

    date time

    2021-07-29T22:25:09.898Z
    Error
    Error Code Error Label
    2000

    Unknown error

    2006

    Core not well configured

    2201

    Timeout/Polling Timeout/Command Timeout

    2202

    Network problem : No internet

    2203

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

    2204

    Server Error

    2205

    CEA Error

    2341

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

    2342

    Smartphone not paired with the vehicle

    2354

    Invalid Key Car Position

    2355

    Invalid Signature

    2356

    Invalid Timestamp

    Code Example
    1
    2
    3
    4
    5
    6
    7
    
    pims.set("pims.vehicle.carkey"
      /* no params */
    ) { message -> when (message["status"] as? String) {
          "SUCCEEDED" -> { }                          // handle succeeded status
          "FAILED" ->    { }                          // handle failed status
      } }
    
    1
    2
    3
    4
    5
    6
    7
    
    pims.set(api: "pims.vehicle.carkey"
      /* no params */
      ) { (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
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": { 
      "hasCarKey": "true",
      "vin": "VR1AB12C3D45678909",
      "securityCode": "c2hhemFtCg==",
      "securityExpiration": "2021-07-29T22:25:09.898Z"
    } 
    }
    
    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    
    // representation of the `failed` dictionary objects messages as JSON
    
    /* -------- STATUS FAILED: 2000 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2000,
        "label": "Unknown error"
      }
    }
    /* -------- STATUS FAILED: 2006 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2006,
        "label": "Core not well configured"
      }
    }
    /* -------- STATUS FAILED: 2201 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2201,
        "label": "Timeout/Polling Timeout/Command Timeout"
      }
    }
    /* -------- STATUS FAILED: 2202 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2202,
        "label": "Network problem : No internet"
      }
    }
    /* -------- STATUS FAILED: 2203 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2203,
        "label": "Invalid return [Parsing error] ou [No data] ou [invalid Data]"
      }
    }
    /* -------- STATUS FAILED: 2204 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2204,
        "label": "Server Error"
      }
    }
    /* -------- STATUS FAILED: 2205 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2205,
        "label": "CEA Error"
      }
    }
    /* -------- 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: 2354 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2354,
        "label": "Invalid Key Car Position "
      }
    }
    /* -------- STATUS FAILED: 2355 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2355,
        "label": "Invalid Signature"
      }
    }
    /* -------- STATUS FAILED: 2356 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2356,
        "label": "Invalid Timestamp"
      }
    }