Mobile SDK

iOS or Android

    API Reference - pims.subscription.step

    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: UserVehicleSteps
    Security: Authentication is required.
    Operation:

    Return the next to do step. This API return only one STEP at the time.

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

    Steps id value.

    String

    n/a

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

    Information about trusted phone. Returned only if this step is the next one.

    Object

    /
    trustedPhone
     .name

    Step name value.

    String

    - trustedPhone

    - deviceActivation

    - mediumCarKey
    trustedphone
    trustedPhone
     .status

    Status of the step.

    String

    - todo

    - alreadyDone
    todo
    trustedPhone
     .order

    Order of the steps.

    Integer

    - 1

    - 2

    - 3
    2
    deviceActivation

    Information about device activation. Returned only if this step is the next one.

    Object

    /
    deviceActivation
     .name

    Step name value.

    String

    - trustedPhone

    - deviceActivation

    - mediumCarKey
    trustedphone
    deviceActivation
     .status

    Status of the step.

    String

    - todo

    - alreadyDone
    todo
    deviceActivation
     .order

    Order of the steps.

    Integer

    - 1

    - 2

    - 3
    2
    mediumCarKey

    Information about medium car key. Returned only if this step is the next one.

    Object

    /
    mediumCarKey
     .name

    Step name value.

    String

    - trustedPhone

    - deviceActivation

    - mediumCarKey
    trustedphone
    mediumCarKey
     .status

    Status of the step.

    String

    - todo

    - alreadyDone
    todo
    mediumCarKey
     .order

    Order of the steps.

    Integer

    - 1

    - 2

    - 3
    2
    Error
    Error Code Error Label
    2101

    Missing [PARAMETER] parameter

    2102

    Invalid [PARAMETER] parameter

    2346

    No Step for this stepsID [stepsID]

    Code Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    pims.get("pims.subscription.step",
      mapOf( /* parameters */  
        Pair("stepsID", " ")
      ) 
    ) { 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.subscription.step",
      parameters: [  
      "stepsID": " "
      ]
      ) { (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
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": {
        // If next Step is trustedPhone
        "trustedPhone": {
          "name": "trustedPhone",
            "status": "todo",
            "order": 1
        },
        // If next Step is deviceActivation
        "deviceActivation": {
          "name": "deviceActivation",
            "status": "todo",
            "order": 1
        },
        // If next Step is mediumCarKey
        "mediumCarKey": {
            "name": "mediumCarKey",
            "status": "todo",
            "order": 1
        }
        // Null if no next steps
      }
    }
    
    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: 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: 2346 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2346,
        "label": "No Step for this stepsID [stepsID]"
      }
    }