rent

Get rent countries, free numbers and price

GEThttps://onlinesim.io/stubs/handler_api.php?action=getRentServicesAndCountries

Returns the IDs of the countries where numbers can be rented and, for the requested country, the number of free numbers and the lowest price per hour.

services is {} when the country has no rent. No key is needed.

Parameters

query2
NameTypeDescription
action*string

Method name: getRentServicesAndCountries

Enum:getRentServicesAndCountries
countryinteger
≥ 0

Country ID from getCountries (id) for services. Without it: Russia. Empty is Russia too; a non-numeric value gives BAD_COUNTRY

Default:0Example:16

Responses

200Rent countries and the offer of the requested country, or an error as text
text/plain
Schema
schemaoneOf
One Of
[0]string
Enum:BAD_COUNTRY
[1]string
Error answered as text by every action (also by the JSON ones):
  • BAD_KEY — the API key is wrong or missing
  • BANNED — the account is blocked
  • BAD_ACTION — unknown action or an error without its own code (for example a temporary error or too many concurrent requests); check the request and repeat it later
  • Too many requests. Please wait a moment before trying again. — the converter's limit of getNumber, getRentNumber, setStatus and setRentStatus (3 requests per second, 150 per 30 seconds)
Enum:BAD_KEYBANNEDBAD_ACTIONToo many requests. Please wait a moment before trying again.
application/json
Schema
schemaobject
countriesobjectRequiredIDs (getCountries numbering) of the countries with rent, keyed "0", "1", …
operatorsobjectRequiredAlways {"0":"any"}: the operator cannot be chosen
servicesobjectRequiredThe offer of the requested country; {} when it has no rent

Examples

rent17 lines

Rent offer of a country

{
  "countries": [
    0,
    16,
    187,
    2
  ],
  "operators": [
    "any"
  ],
  "services": {
    "full": {
      "quant": 1864,
      "cost": 0.06
    }
  }
}

Code Samples

Generating examples...