API

Specifications

Quickstart - Request Examples

This page is a list of examples of HTTP requests to Stellantis Accessing Party for End-Users API.

These examples will show you how to deal with:

  • Single objects
  • Collections objects, and pagination
  • GeoJSON
  • Post and Delete verbs HTTP verbs

Check out the following pages to learn about the concepts of single objects, collection and paginations in this API.

Manufacturers Brands & Realms #

--To Be Updated--

In this tutorial API calls require the manufacturer {brand.tld} or <realm>. They both depends on the vehicle brand and should be retrieved on your side based on the vehicle VIN. Available realms are:

Manufacturer Brand {brand.tld} <realm>
Peugeot peugeot.com clientsB2CPeugot/OTPPeugeot
Citroën citroen.com clientsB2CCitroen/OTPCitroen
DS driveds.com clientsB2CDS/OTPDS
Opel opel.com clientsB2COpel/OTPOpel
Vauxhall vauxhall.co.uk clientsB2CVauxhall/OTPVauxhall

Get a List of Vehicles #

The /accounts/vehicles endpoint allows you to retrieve a list of your vehicles.

This endpoint returns a collection, checkout pagination for more information about indexRange and pageSize.

$ curl \
--location --globoff '/v1/accounts/vehicles?env=&gId=&pageSize=&locale=&vinPrefix=' \
--header 'X-Introspect-Realm: ' \
--header 'X-CVS-Scope:  VIN:' \
--header 'X-IBM-Client-Id: ' \
--header 'X-Supersede-CVS-User-Id: ' \
--header 'X-IBM-Client-Secret: '

Get Alerts of a Vehicle #

The /accounts/vehicles/{id}/alerts endpoint allows to retrieve a list of alerts for a vehicle.

  • Path parameter {id} is the unique identifier of a vehicle.
  • Query parameter locale will change the language of the alert message.
$ curl \
 --location --globoff --request GET '/v1//accounts/vehicles/{id}/alerts?env={env}' \
 --header 'X-Introspect-Realm: ' \
 --header 'X-CVS-Scope: data:telemetry:vehicle:alert VIN:RCZ65065847128653' \
 --header 'X-IBM-Client-Id: ' \
 --header 'X-Supersede-CVS-User-Id: ' \
 --header 'X-IBM-Client-Secret: ' 

Post New Monitor #

The /accounts/channels/{chId}/monitors endpoint allows you to create a new monitor.

Checkout the dedicated tutorial for information about Monitors.

Post New Monitor - WebSocket #

$ curl \
--location --globoff '/v1/accounts/channels//monitors?env=' \
--header 'X-IBM-Client-Id: ' \
--header 'X-CVS-Scope:  VIN:' \
--header 'X-IBM-Client-Secret: ' \
--header 'X-Introspect-Realm: ' \
--header 'X-Supersede-CVS-User-Id: ' \
--header 'X-PartnerId: ' \
--header 'X-Customer-Context: ' \
--header 'Content-Type: application/json' \
--data '{
    "label": "Monitor 409",
    "subscribeParam": {
        "refreshEvent": 60,
        "channelAttributes": {
            "websocket": [
                {
                    "type": "Header",
                    "key": "X-Vehicle_Id",
                    "value": "$Vin"
                }
            ]
        }
    },
    "onEvent": {
        "actions": [
            {
                "type": "Notify",
                "monitorAction": {
                    "changeType": "Pause",
                    "monitorId": "string"
                },
                "remoteAction": {
                    "ChannelId": "",
                    "remote": {
                        "label": "Remote 56",
                        "attributes": [
                            {
                                "type": "Header",
                                "key": "X-Vehicle_Id",
                                "value": "$Vin"
                            }
                        ],
                        "channelAttributes": {
                            "websocket": [
                                {
                                    "type": "Header",
                                    "key": "X-Vehicle_Id",
                                    "value": "$Vin"
                                }
                            ]
                        },
                        "extendedEventParam": [
                            "vehicle.alerts.active"
                        ],
                        "action": {
                            "locking": {
                                "state": "Unlocked",
                                "identifier": "AllDoors"
                            }
                        }
                    }
                }
            }
        ],
        "onRefresh": false
    },
    "attributes": [
        {
            "type": "Header",
            "key": "X-Vehicle_Id",
            "value": "$Vin"
        }
    ],
    "extendedEventParam": [
        "vehicle.alerts.active"
    ],
    "triggerParam": {
        "triggers": [
            {
                "name": "t6",
                "data": {
                    "op": "includedIn",
                    "value": [
                        "AssistanceButtonFault"
                    ],
                    "data": "vehicle.alert",
                    "previous": {
                        "op": "equalsTo",
                        "value": [
                            "AssistanceButtonFault"
                        ]
                    }
                }
            }
        ],
        "boolExp": "t6"
    }
}'   

Post New Monitor - PushNotification #

$ curl \
--location --globoff '/v1/accounts/channels//monitors?env=' \
--header 'X-IBM-Client-Id: ' \
--header 'X-CVS-Scope:  VIN:' \
--header 'X-CVS-User-Id: ' \
--header 'X-IBM-Client-Secret: ' \
--header 'Cookie: PSACountry=IT; PSACountry=FR;' \
--header 'X-Introspect-Realm: ' \
--header 'X-Supersede-CVS-User-Id: ' \
--header 'X-PartnerId: ' \
--header 'X-Customer-Context: ' \
--header 'Content-Type: application/json' \
--data '{
    "label": "Monitor 790",
    "subscribeParam": {
        "refreshEvent": 60,
        "channelAttributes": {
            "pushnotif": [
                {
                    "type": "Body",
                    "key": "disableNotificationPayload",
                    "value": "true"
                },
                {
                    "type": "Query",
                    "key": "deliveryPriority",
                    "value": "low"
                }
            ]
        }
    },
    "onEvent": {
        "actions": [
            {
                "type": "Remote",
                "monitorAction": {
                    "changeType": "Resume",
                    "monitorId": "string"
                },
                "remoteAction": {
                    "ChannelId": "",
                    "remote": {
                        "label": "Remote 412",
                        "attributes": [
                            {
                                "type": "Header",
                                "key": "X-Vehicle_Id",
                                "value": "$Vin"
                            }
                        ],
                        "channelAttributes": {
                            "pushnotif": [
                                {
                                    "type": "Body",
                                    "key": "mutable",
                                    "value": "true"
                                },
                                {
                                    "type": "Body",
                                    "key": "contentAvailable",
                                    "value": "false"
                                },
                                {
                                    "type": "Body",
                                    "key": "title",
                                    "value": "Push Notification Title"
                                }
                            ]
                        },
                        "extendedEventParam": [
                            "vehicle.alarm"
                        ],
                        "action": {
                            "ignition": {
                                "state": "Activated"
                            }
                        }
                    }
                }
            }
        ],
        "onRefresh": false
    },
    "attributes": [
        {
            "type": "Body",
            "key": "X-monitorID",
            "value": "$MonitorID"
        }
    ],
    "extendedEventParam": [
        "vehicle.alarm"
    ],
    "triggerParam": {
        "triggers": [
            {
                "name": "t6",
                "zone": {
                    "transition": "In",
                    "place": {
                        "radius": 10,
                        "center": {
                            "longitude": -80,
                            "latitude": 68
                        }
                    }
                }
            }
        ],
        "boolExp": "t6"
    }
}'   

Post New Monitor - WebHook #

$ curl \
--location --globoff '/v1/accounts/channels//monitors?env=' \
--header 'X-IBM-Client-Id: ' \
--header 'X-CVS-Scope:  VIN:' \
--header 'X-CVS-User-Id: ' \
--header 'X-IBM-Client-Secret: ' \
--header 'Cookie: PSACountry=IT; PSACountry=FR;' \
--header 'X-Introspect-Realm: ' \
--header 'X-Supersede-CVS-User-Id: ' \
--header 'X-PartnerId: ' \
--header 'X-Customer-Context: ' \
--header 'Content-Type: application/json' \
--data '{
    "label": "Monitor 711",
    "subscribeParam": {
        "refreshEvent": 80,
        "channelAttributes": {
            "webhook": [
                {
                    "type": "Header",
                    "key": "X-vehicle-id",
                    "value": "$Vin"
                }
            ]
        }
    },
    "onEvent": {
        "actions": [
            {
                "type": "Monitor",
                "monitorAction": {
                    "changeType": "Delete",
                    "monitorId": "string"
                },
                "remoteAction": {
                    "ChannelId": "",
                    "remote": {
                        "label": "Remote 296",
                        "attributes": [
                            {
                                "type": "Body",
                                "key": "X-remoteType",
                                "value": "$remoteType"
                            },
                            {
                                "type": "Header",
                                "key": "X-remoteStatus",
                                "value": "$remoteStatus"
                            }
                        ],
                        "channelAttributes": {
                            "webhook": [
                                {
                                    "type": "Header",
                                    "key": "X-channel-id",
                                    "value": "$ChannelId"
                                },
                                {
                                    "type": "Header",
                                    "key": "X-channel-label",
                                    "value": "$ChannelLabel"
                                }
                            ]
                        },
                        "extendedEventParam": [
                            "vehicle.alarm"
                        ],
                        "action": {
                            "horn": {
                                "state": "Activated"
                            }
                        }
                    }
                }
            }
        ],
        "onRefresh": true
    },
    "attributes": [
        {
            "type": "Body",
            "key": "X-monitorLabel",
            "value": "$MonitorLabel"
        }
    ],
    "extendedEventParam": [
        "vehicle.telemetry.environment"
    ],
    "triggerParam": {
        "triggers": [
            {
                "name": "t1",
                "time": {
                    "times": [
                        {
                            "duration": "PT3H12M",
                            "start": "1990-05-25T15:30:00Z",
                            "recurrence": "None",
                            "occurrence": {
                                "day": [
                                    "Tue"
                                ]
                            },
                            "enabled": true
                        }
                    ],
                    "timeZone": "Europe/Paris"
                }
            }
        ],
        "boolExp": "t1"
    }
}'   

Delete a Monitor #

The /accounts/channels/{chId}/monitors/{mid} endpoint allows you to retrieve a list of alerts for a vehicle.

Checkout the dedicated tutorial for information about Monitors

$ curl \
 --location --globoff --request DELETE '/v1/accounts/channels/{chId}/monitors/{mid}?env={env}' \
 --header 'X-IBM-Client-Id: {client-id}' \
 --header 'X-CVS-Scope: MONITOR_WRITE VIN:{vin}' \
 --header 'X-CVS-User-Id: {user-id}' \
 --header 'X-IBM-Client-Secret: {client-secret}' \
 --header 'Cookie: PSACountry=IT; PSACountry=FR;' \
 --header 'X-Introspect-Realm: {realm}' \
 --header 'X-Supersede-CVS-User-Id: {user-id}' \
 --header 'X-PartnerId: {partner-id}' \
 --header 'X-Customer-Context: {customer-context}'

References

Check out this API references to discover Stellantis Connected Vehicles features.