Skip to main content

Request for Data Sharing

[Preliminary Step]

To follow the procedures in this topic, you need to acquire the required parameters through authentication.

STEP 1. Retrieve Webview URL for Request for Data Sharing

To obtain data sharing agreement from the vehicle owner, a screen for vehicle selection and vehicle data sharing agreement must be provided.
Call Select Vehicles to retrieve the Webview URL for the Request for Data Sharing screen.

curl
curl -X GET "https://api.pleos.ai/v1/vehicles/selections" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-H "Brand: hyundai" \
-d '{
"state": "state",
"lang": "en"
}
  • On a successful call, a Webview URL is returned.
  • Calling the returned URL displays the Request for Data Sharing screen to the vehicle owner.

STEP 2. Vehicle Selection and Data Sharing Agreement

From the screen shown in STEP 1, the vehicle owner selects which vehicle’s data to share and agrees or declines agreement.
Regardless of the agreement decision, the process proceeds with the Data sharing agreement redirect URL to complete STEP 1.
If the vehicle owner agrees to share connected car data, the Data sharing agreement redirect URL will receive the VIN of the agreed vehicle as the vehicles parameter.

  • The Data sharing agreement redirect URL entered during the Vehicle Data API request will be triggered upon agreement completion.
  • The returned vehicles parameter is an array of VIN values, encoded in Base64.
  • Decode the vehicles parameter from Base64 and use the obtained VIN as a path parameter when calling the Vehicle Data API.
info
  • The Data sharing agreement redirect URL is the information entered during the API Access Request for the Pleos Playground project.
  • You can view or update this URL on the API Access Request History page.
caution

Developers must implement a feature that allows vehicle owners to revoke previously granted data sharing agreement. You can use Stop Data Sharing to implement this feature.

STEP 3. Retrieve Vehicle List

Retrieve the list of vehicles for which the vehicle owner has agreed to share data.
Call Get Vehicles to retrieve the vehicle list.

curl
curl -X GET "https://api.pleos.ai/v1/vehicles/consent" \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-H "Brand: hyundai" \
  • If no vehicles are returned, proceed to STEP 1.
  • If vehicles are returned, check the VIN and use it as a path parameter when calling the Vehicle Data API.