How to Integrate a Vehicle QR Code
QR codes enable users to start a ride with the spotted Dott vehicle.
How does it work:
- A user scans a QR code on a Dott vehicle.
- You decode the QR code. Its value contains a
https://v.ridedott.com/{pathname}
URI. The pathname is a unique vehicle identifier consisting of 6 alphanumeric characters. - You make a call to the
SearchVehicle
API in the Vehicles service. It requires the
uri
query parameter which is the URI obtained in the previous step. The API returns theVehicle
resource or an error in case of an invalid request. - You retrieve the
vehicleId
from the Vehiclename
property. Its value has the following format:vehicles/{vehicleId}
. The second segment is the 20-charactervehicleId
that is required for starting a trip.