Skip to content

Known and working endpoints

jumpjack edited this page Apr 28, 2022 · 4 revisions

An "endpoint" is a command you can send to your car; there are two types of commands, for reading and for performing actions.

Reading commands

Working on Renault Captur Plugin e-tech

  • cockpit
  • battery-status
  • location
  • hvac-status

Not working

  • lock-status
  • trip-history
  • trips
  • energy-unit-cost
  • notification-settings
  • open-close-status
  • battery-inhibition-status

Actions commands (see PAYLOADS/HADERS section)

Working on Renault Captur Plugin e-tech

Sensors refresh

  • actions/refresh-hvac-status
  • actions/refresh-battery-status
  • actions/refresh-location

Actions on vehicle

  • actions/charging-start
  • actions/hvac-start

Not working

  • actions/refresh-lock-status (doors locking)
  • actions/lock-unlock
  • actions/horn-lights

Additional authentication for specific endpoints?

  • actions/srp-initiates
  • actions/srp-sets

How to use

To operate an endpoint, you must send a GET or POST request (depending on endpoint) to a specific server:

You shall use this kind of url:

Renault: https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/AAAAAAA/kamereon/kca/car-adapter/v1/cars/VVVVVVVV/EEEEEEEE/?country=CC

Nissan: https://alliance-platform-caradapter-prod.apps.eu.kamereon.io/car-adapter/v1/cars/VVVVVV/EEEEEE

  • AAAAAAA = accountId
  • VVVVVVVV = car VIN
  • EEEEEEEE = endpoint path
  • CC = Country code (IT, EN,...)

Programmatically:

kamereonurl + '/commerce/v1/accounts/' + 
accountId.value + 
"/kamereon/kca/car-adapter/v" + 
version + 
"/cars/" + 
MY_VIN.value + "/" + 
path +	
QUESTION_MARK +	
"country=" + 
country.value

Payloads/Headers

Just calling the url is not enough to query the API: you shall provide credentials in form of request header; example in pure Javascript for browser using Axios library:

axios.post(
url, // Described above, containing endpoint
payload, // Needed only for actions?
{
	headers: {
		'Content-type': 'application/vnd.api+json', // constant
		'x-gigya-id_token': JWT_TOKEN, // Temporary, depending on user credentials for MyRenault app
		'apikey': KAMEREON_API_KEY, // Constant, public and same for all users; currently = Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2
	}
})

.then(response => {
	// process response;
})

.catch((error) => {
	// process error
});

Generic payload for actions:

{
    'data': {
        'type': 'EndpointName',
        'attributes': attributes
    }
}     

Reading command results

After a command is sent, the server sends back a response containing an "id"; append such id to following url (POST) to get details on command execution status:

https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/PERSONID/notifications/kmr?country=IT&notificationId=NOTIFICATION_ID

Ore use this url to retrieve all notifications:

https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/PERSONID/notifications/

In case of empty response, repeat call until you get the response.

Example response for HVAC start:

[{
    "notificationId": "d47296c9-6ab6-4192-9db1-4712010538fb",
    "notifDate": "2022-04-28T14:36:17",
    "vin": "XXXXXXXXXXXXXXXX",
    "personId": "XXXXXXXXXXXXXXXX",
    "kmrUserId": "XXXXXXXXXXXXXXXX",
    "actionType": "COMMAND_RESPONSE",
    "commandResponse": {
        "status": "PENDING"
    },
    "commandType": "HVAC_START"
}, {
    "notificationId": "XXXXXXXXXXXXXXXX",
    "notifDate": "2022-04-28T14:36:24",
    "vin": "XXXXXXXXXXXXXXXX",
    "personId": "XXXXXXXXXXXXXXXX",
    "kmrUserId": "XXXXXXXXXXXXXXXX",
    "actionType": "COMMAND_RESPONSE",
    "commandResponse": {
        "status": "COMPLETED"
    },
    "commandType": "HVAC_START"
}]

Authentication through "SRP" (Secure Remote Password)