Once you have acquired a license key, proceed to registering a new account. After which you can log in to your account and receive access to your API keys needed to send a valid request to our API.
Send a form request with your order information. After the payment has been processed, our system-manager will send you a license key with the ordered privileges.
shopping_cartOrder a license keyRegister your account here, you will need a license key to finish the registration.
Log in to your existing account here, this will lead you to the account page where you can find your api key, and all other information about your account.
To send a valid POST request, you must fill in these standard parameters to get a result, in the following JSON format. With each parameter defined below. Finally, including in the request, your own api key found on your account page. Be sure to set "Content-type: application/json" as a header or it might not work. Then, proceed to sending your request to: "http://wheelpope.com/API.php"
{
"width1": 28,
"width2": 245,
"aspect1": 10.5,
"aspect2": 40,
"diameter1": 16,
"diameter2": 20,
"wheelwidth1": 6.5,
"wheelwidth2": 9.5,
"offset1": 40,
"offset2": 30,
"key": "{YOUR_API_KEY_HERE}",
}
If you want to add options to this request, to get a more customized response, just extend the JSON with one or more of these option parameters, with a filled in value for each. Leaving out the options you wouldn't like to see changed.
You can find a reference to each option's definition, further down this page.
"tyrecolor1": "#828282",
"tyrecolor2": "black",
"wheelcolor1": "#cacaca",
"wheelcolor2": "#c4161c",
"wheelcolor1-fill": "rgba(0,0,0,0.1)",
"wheelcolor2-fill": "rgba(174,26,26,0.5)",
"textcolor1": "#acacac",
"textcolor2": "#c4161c",
"text1": "text_on_wheel_1",
"text2": "text_on_wheel_2"
To send a valid GET request, you must fill in these standard parameters to get a result. With each parameter defined in the previously mentioned definition list. Finally, including in the request, your own api key found on your account page.
https:/www.wheelpope.com/API.php?
width1=28
&aspect1=10.5
&diameter1=16
&wheelwidth1=6.5
&offset1=40
&width2=245
&aspect2=40
&diameter2=20
&wheelwidth2=9.5
&offset2=30
&key={YOUR_API_KEY_HERE}
If you want to add options to this request, to get a more customized response, just concatenate the url-string with more GET parameters, each having the name of the optional property you would like to change. Leaving out the options you wouldn't like to see changed.
You can find a reference to what each option means further down this page.
&tyrecolor1=%23828282
&tyrecolor2=%23cacaca
&wheelcolor1=black
&wheelcolor2=%23c4161c
&wheelcolor1-fill=rgba%280%2C0%2C0%2C0.1%29
&wheelcolor2-fill=rgba%28174%2C26%2C26%2C0.5%29
&textcolor1=%23acacac
&textcolor2=%23c4161c
&text1=text_on_wheel_1
&text2=text_on_wheel_2
Note, that for the GET request, the option parameters have to be url-encoded, as GET requests don't accept the following used characters: '(', ')', '#', ',' which can be used for setting custom colors.
Note, that you can use any css-recognisable color code as well, instead of the color names.
"tyrecolor1": "orange",
"tyrecolor2": "green"
Here you can see, that the tyre of wheel_1, has turned orange, and the other tyre of wheel_2 has turned green.
"wheelcolor1": "orange",
"wheelcolor2": "green"
Here you can see, that the wheem of wheel_1, has turned orange, and the other wheel of wheel_2 has turned green.
Now, because the previous example didn't look great, with only the outline changing, we will add the wheelcolor-fill options.
"wheelcolor1": "orange",
"wheelcolor2": "green",
"wheelcolor1-fill": "rgba(255, 166, 0, 0.6)",
"wheelcolor2-fill": "rgba(0, 128, 0, 0.6)"
The resulting wheels now look much better for a orange-green colored website. Let's proceed to change the text colors to make it workable result.
It is also possible to change the color of each individual text next to each wheel, This makes it easier to differentiate between each wheel. So let's change the text colors to the appropriate colors.
"textcolor1": "orange",
"textcolor2": "green",
"wheelcolor1-fill": "rgba(255, 166, 0, 0.6)",
"wheelcolor2-fill": "rgba(0, 128, 0, 0.6)",
"textcolor1": "orange",
"textcolor2": "green"
Now we have a deliverable svg result to be used for a reference in a orange-green themed website.
{
"status": 200,
"status_message": "Result Found, total api call count this month: 50",
"data": {
"firstIsMetric": true,
"secondIsMetric": true,
"calculation": {
"Width": "205",
"Aspect": "55",
"Width2": "245",
"Aspect2": "40",
"ExistingDiameter": 640.92,
"NewDiameter": 635.64,
"ExistingCircumference": 2013.5095635387702,
"NewCircumference": 1996.9219543278161,
"Poke": 42.55,
"Poke2": 100.64999999999999,
"Inset": 122.55,
"Inset2": 140.64999999999998,
"Speederror": 0.8306588635076384,
"Reading30": 30.249197659052292,
"Reading100": 100.83065886350764,
"HeightLoss": -2.6399999999999864,
"EU_reg": -0.008238157648380429
},
"svg": " <svg>...</svg> "
}
}
There are results found on multiple levels of the JSON result. The first ones being status, and status_message. Both of which will give the same result as this example for when your input was correct. Also giving the amount of api calls you have done this month, counted from registration. In case that your output is different, status_message will tell you what is wrong, please refer to the input references section in case of this happening.
We will be focusing more on the data tag, as it contains all the results that can be worked with later.
This tells if the measurements of the first wheel have been interpreted as being in ISO Metric units i.e. 205/55-16, or in LT High Flotation units i.e. 25x8-16.
Similarly for secondIsMetric, but for the second wheel.
This is the converted width of the tyre, in millimeters.
Similarly for Width2, but for the second wheel.
This is the converted aspect-ratio of the tyre, in percent. When multiplied by it's width, you get the height of the tyre wall.
Similarly for Aspect2, but for the second wheel.
This is the total diameter of the wheel, including the tyre, noted in centimeters.
Similarly for NewDiameter, but for the second wheel.
This is the total circumference of the wheel, including the tyre, noted in centimeters.
Similarly for NewCircumference, but for the second wheel.
This is how much the wheel sticks in from the center line, towards the brake side.
Similarly for Inset2, but for the second wheel.
Here the speed error is applied on both 30 and 100, giving the resulting new actual speeds a car would be going at given no change to the speedometer.
If this value goes below -1.5%, or over 2%, noted it is not allowed by EU law to change to this new set of wheels.
This is how much the wheel sticks out from the center line, going away from the brake side.
Similarly for Poke2, but for the second wheel.
This is the speed error in percentage between the old wheels and the new wheels. This is used to calculate the new speed-readings for 30 and 100 km/h or mph.
This is the difference in height towards the fender.
Note, that widths below 50, will currently make the API consider the aspect value to be the tyre wall-height in LT High Flotation units, instead of the ratio for ISO Metric units.
There are multiple different possibilities for errors, if you encounter a different one, please report it to one of our system-mangers through our contact page.
Response message | Possible solution |
---|---|
JSON format is incorrect. | See if your JSON input has as an exact make-up to the examples above. |
Key not registered in our system: 'bad_key' | Look if your copied your API key correctly or if you haven't accidentally added whitespace to your api string. If this doesn't work, try generating a new API key on your account page. |
Some inputs are empty: "argument-name", ... | Check if all your basic inputs are filled in. |
Some inputs are invalid, and not found in the valid input choices list: "argument-name", ... | Check if these inputs are possible by looking at the allowable inputs section. If you are sure we missed some inputs, let us know by contacting our system-managers on the contact page. |
Monthly api call count has been exceeded. Next monthly limit reset in: _____ seconds | You have exceeded your api-call limit linked to your account license. Increase your request limit by upgrading your license, or you can choose to wait the specified time. |
This zip file contains PHP and Javascript examples for making both GET and POST requests correctly. These are available for reference, and for saving you some development time. If something still doesn't work in your tests, don't hesitate to contact us.
file_downloadDownload (2Kb)