Generating and storing a unique Bike Identification Number has never been so easy in three steps!
You authenticate all your requests by simply sending an X-AUTH-TOKEN.
Second step is to create a BIN pattern – template used to generate a set of Bike Identification Numbers. You pass a simple bike specification and get a BIN pattern.
Last but not least, you pass a pattern generated in the second step and get a set of Bike Identification Numbrs
You have received two access tokens when you became a partner.
Dev API key is the access token that allows you to access to our sanbdox at:
https://dev.api.bikeidnumber.org/api2
Production API key allows you to access the production API at:
https://api.bikeidnumber.org/api2
<?php
$url = „http://api.bikeidnumber.org/api2”;
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
„Authorization: Bearer your-token-here”,
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
?>
const url = 'http://api.bikeidnumber.org/api2′;
const response = await fetch(url, {
headers: {
’Authorization’: 'Bearer your-token-here’,
},
});
const text = await response.text();
console.log(text);
import requests
from requests.structures import CaseInsensitiveDict
url = „http://api.bikeidnumber.org/api2”
headers = CaseInsensitiveDict()
headers[„Authorization”] = „Bearer your-token-here”
resp = requests.get(url, headers=headers)
print(resp.status_code)
var url = „http://api.bikeidnumber.org/api2”;
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
httpRequest.Headers[„Authorization”] = „Bearer your-token-here”;
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
}
Console.WriteLine(httpResponse.StatusCode);
POST https://api.bikeidnumber.org/api2/bin_pattern
Endpoint allows you to create a BIN pattern – a template storing bike specification but not a sequential number of a particular bike.
POST https://api.bikeidnumber.org/api2/bin
Endpoint allows you to create a set of Bike Identification Numbers based on a previously generated pattern.
Headquarter:
Ratajczaka 26/6
61-815 Poznan
POLAND