WEB API

accessing party for end-users

Quickstart - Request Examples

Info: Stellantis Accessing Party for End-Users API for ex Groupe PSA brands (Citroën, DS, Peugeot, Opel and Vauxhall) is available only on request.

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 #

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 Account Info #

Web API base endpoint /user allows retrieving information about the current End-User account, depending on the Access token used in the request..

This endpoint returns a single object.

1
2
3
4
5
6
7
8
9
$ curl \
  --request GET \
  --url 'https://api-cert.groupe-psa.com/connectedcar/v4/user' \
  --data-urlencode 'client_id=<client_id>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'x-introspect-realm: <realm>' \
  --key 'path/to/key.pem' \
  --cert 'path/to/client_cert.pem[:<cert_password>]' \
  --cacert 'path/to/ca_cert.pem' \

Get a List of Vehicles #

The /user/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.

1
2
3
4
5
6
7
8
9
10
11
$ curl \
  --request GET \
  --url 'https://api-cert.groupe-psa.com/connectedcar/v4/user/vehicles' \
  --data-urlencode 'client_id=<client_id>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'x-introspect-realm: <realm>' \
  --key 'path/to/key.pem' \
  --cert 'path/to/client_cert.pem[:<cert_password>]' \
  --cacert 'path/to/ca_cert.pem' \
  --data-urlencode 'indexRange=<element_per_page>' \
  --data-urlencode 'pageSize=<nb_of_pages>' \

Get Alerts of a Vehicle #

The /user/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.
1
2
3
4
5
6
7
8
9
10
11
12
$ curl \
  --request GET \
  --url 'https://api-cert.groupe-psa.com/connectedcar/v4/user/vehicles/{id}/alerts' \
  --data-urlencode 'client_id=<client_id>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'x-introspect-realm: <realm>' \
  --key 'path/to/key.pem' \
  --cert 'path/to/client_cert.pem[:<cert_password>]' \
  --cacert 'path/to/ca_cert.pem' \
  --data-urlencode 'indexRange=<element_per_page>' \
  --data-urlencode 'pageSize=<nb_of_pages>' \
  --data-urlencode 'locale=<language>' \

Post New Monitor #

The /user/vehicles/{id}/monitors endpoint allows you to create a new monitor.

Checkout the dedicated tutorial for information about Monitors.

1
2
3
4
5
6
7
8
9
10
$ curl \
  --request POST \
  --url 'https://api-cert.groupe-psa.com/connectedcar/v4/user/vehicles/{id}/monitors' \
  --data-urlencode 'client_id=<client_id>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'x-introspect-realm: <realm>' \
  --key 'path/to/key.pem' \
  --cert 'path/to/client_cert.pem[:<cert_password>]' \
  --cacert 'path/to/ca_cert.pem' \
  --data '<check out HTTP body>' \
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
{
   "label":"IDF Zone monitor With Data Triggering:[vehicle.energy.electric.level] OR on Mondays",
   "subscribeParam":{
      "refreshEvent":600,
      "retryPolicy":{
         "policy":"Always",
         "maxRetryNumber":3,
         "retryDelay":120
      },
      "batchNotify":{
         "size":10,
         "timeWindow":300
      },
      "callback":{
         "target":"http://my.dn/monitors/cb1",
         "name":"HTTP_CB",
         "attributes":[
            {
               "type":"Query",
               "key":"vin",
               "value":"$vin"
            },
            {
               "type":"Header",
               "key":"Authorization",
               "value":"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
            }
         ]
      }
   },
   "extendedEventParam":[
      "vehicle.alerts",
      "vehicle.status"
   ],
   "triggerParam":{
      "triggers": [
      {
         "name": "outOfParis",
         "zone": {
            "transition": "Out",
            "circle": {
               "radius": 20,
               "center": {
               "longitude": 2.333333,
               "latitude": 48.866667
               }
            }
         },
         "name": "onMonday",
         "time": {
            "times": [
               {
               "recurrence": "Daily",
               "start": "PT14H30M",
               "occurence": {
                  "day": [
                     "Mon"
                  ]
               },
               "duration": "PT04H30M"
             }
            ],
            "time.zone": "Europe/Paris"
         },
         "name": "batteryIsLow",
         "data": {
          "data": "vehicle.energy.electric.level",
          "op": "lowerThan",
          "value": [
            "50"
            ]
        }
      }
    ],
    "bool.exp": "((outOfParis & (batteryIsLow | onMonday)"
  }
}

Delete a Monitor #

The /user/vehicles/{id}/monitors/{mid} endpoint allows you to retrieve a list of alerts for a vehicle.

Checkout the dedicated tutorial for information about Monitors

1
2
3
4
5
6
7
8
9
$ curl \
  --request DELETE \
  --url 'https://api-cert.groupe-psa.com/connectedcar/v4/user/vehicles/{id}/monitors/{mid}' \
  --data-urlencode 'client_id=<client_id>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'x-introspect-realm: <realm>' \
  --key 'path/to/key.pem' \
  --cert 'path/to/client_cert.pem[:<cert_password>]' \
  --cacert 'path/to/ca_cert.pem' \

References

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