URL
https://onlinesim.io/api/proxy/tariffs.php?apikey=APIKEY
A list of available tariffs for the rent
Example
- javascript
var settings = {
"async": true,
"crossDomain": true,
"url": "https://onlinesim.io/api/proxy/tariffs.php?apikey=APIKEY",
"method": "GET",
"headers": {"accept": "application/json"}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
- php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://onlinesim.io/api/proxy/tariffs.php?apikey=APIKEY",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
]
));
$response = curl_exec($curl);
curl_close($curl);
var_dump(json_decode($response, true));
After successful execution, a response will be received in JSON format, as follows:
json {"days":{"config":{"type": {"type","enabled","days":{...}}}, "operators: [...], "connect": [...]}, "traffic": {"config":{"country_code":{"name","cities":{"city_code":"city_name"...},"operators":["operator_code":"operator_name"]}}, "response":1}