gethttp://api-conserver.onlinesim.io/stubs/handler_api.php?action=getRentServicesAndCountries

GET /stubs/handler_api.php?action=getRentServicesAndCountries

Get list of countries and rent details for virtual number renting

This request returns a list of countries available for rent with rent details.

You might want to use it to check if the numbers of desired country are available for rent and if so, how many.

Security

OAuth2Scopes: rent-scope
rent-scope
grants access to renting phone numbers from Onlinesim

Parameters

query2
NameTypeDescription
action*string

Method name, in this case getRentServicesAndCountries

Enum:getRentServicesAndCountriesDefault:getRentServicesAndCountries
countryinteger

Country ID (according to getCountries)

Default:0

Responses

200

Successful getRentServicesAndCountries response from the server: either returns detailed information on available numbers for rent by country or throws an exception.

Content-Typeapplication/json
Schema
Responseobject
countriesobject
#country#integer

Number of phone numbers available for rent in this country

operatorsobject
0string

List of mobile operators available in this country

servicesobject
fullobject
quantinteger

Amount of available numbers for Russia (with prolongation option available)

costnumber

Prolongation cost for numbers of Russia (in USD)

Examples

Available numbers by country IDs30 lines
{
  "countries": {
    "0": 0,
    "1": 16,
    "2": 78,
    "3": 56,
    "4": 46,
    "5": 1045,
    "6": 1351,
    "7": 187,
    "8": 32,
    "9": 49,
    "10": 34,
    "11": 2,
    "12": 1057,
    "13": 1061,
    "14": 1358,
    "15": 1039,
    "16": 45
  },
  "operators": {
    "0": "any"
  },
  "services": {
    "full": {
      "quant": 1864,
      "cost": 1.5
    }
  }
}

Code Samples

Generating examples...