URL
https://onlinesim.io/api/rent/getRentState.php?apikey=APIKEY
List of rented numbers
Example
- javascript
var settings = {
"async": true,
"crossDomain": true,
"url": "https://onlinesim.io/api/rent/getRentState.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/rent/getRentState.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));
Options
Parameter Name | Parameter | Data type | Description |
---|---|---|---|
tzid | non-required | INT | id of the operation, if you do not pass id, then the method returns the entire list of available operations |
pagination | non-required | BOOLEAN | message pagination, if = false - disabled |
After successful execution, a response will be received in JSON format, as follows:
json {response:1, list => [..,]}
Result | Description |
---|---|
response | 1, if the request is successful, or an error message |
item | an array with all purchased operations, see the description in getRentNum |