API Integration
Widgets
Calculate savings
The widget is designed to help you calculate the potential savings from switching to an electric vehicle
Installation
Step to step guide
1
Include the resources
Start by including the resources to your page. Include the Stylesheet inside the Head and the Javascript after the HTML
CSS
JS
2
Parameters
To get your widget to display data, there are some parameters that need to be filled in. The parameters are explained below. The parameters with a * must be filled in.
ID *
string
Insert the ID you have been sent.
Make *
string
Insert the name of the car brand.
Model *
string
Insert the name of the car model.
Battery *
string
Insert the size of the battery in Kwh.
HP *
string
Insert the number of horsepower of the car
Color *
Color
Define your brand color in HEX value without the #
carexchange *
If you accept exchange cars
Show two additional inputs - Reg.number and km. driven. Set it to "true"
Width *
string
Define the width of the widget in pixels. Minimum width is 320px. The width can also be defined as "100%" and will then fill the entire width
3
Insert widget to website
Place the widget on your website where you want it to be. It is important that you place it where you have access to the required data, such as: Make and model. In the ID field, enter the ID that was sent to you when you purchased access.