Mobile SDK

iOS or Android

    API Reference - pims.vehicle.trips-export

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

    This API allows exporting trips in stored the head-unit.

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

    Filter mode, in this case export.

    String

    export

    export true
    ids

    Identifiers of the trip(s) to export

    List of Numbers

    n/a

    [418, 419] true
    Output Data
    Data name Description Type Unit/Values Example
    file

    String containing data of exported trips.

    String

    n/a

    Error
    Error Code Error Label
    2001

    Facade not initialized

    2101

    Missing [PARAMETER] parameter

    2102

    Invalid [PARAMETER] parameter

    2301

    Need Basic Authentication (to get CVS token)

    2374

    Can’t export [Table name]

    Code Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    pims.set("pims.vehicle.trips",
      mapOf( /* parameters */  
        Pair("action", "export"),
        Pair("ids", "[418, 419]")
      ) 
    ) { message -> when (message["status"] as? String) {
          "SUCCEEDED" -> { }                          // handle succeeded status
          "FAILED" ->    { }                          // handle failed status
      } }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    pims.set(api: "pims.vehicle.trips",
      parameters: [  
      "action": "export",
      "ids": "[418, 419]"
      ]
      ) { (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
    
    // representation of the `succeeded` dictionary object message as JSON
    {
      "transactionId": "953cfefb-bc72",
      "status": "SUCCEEDED",
      "result": { 
      "file": ""
    } 
    }
    
    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
    
    // 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: 2301 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2301,
        "label": "Need Basic Authentication (to get CVS token)"
      }
    }
    /* -------- STATUS FAILED: 2374 -------- */
    {
      "transactionId": "953cfefb-bc72",
      "status": "FAILED",
      "error": {
        "code": 2374,
        "label": "Can't export [Table name]"
      }
    }