GEThttps://onlinesim.io/api/rent/tariffsRent.php

Get information on tariffs for rent numbers

Returnes information on available for rent numbers of specified country (or all of countries, if not specified): rental plans and other parameters of rent.

Unlike regular SMS receiving, rental implies a longer period of use. Also, unlike regular receiving, you can receive any number of SMS messages during the entire rental period from various senders: from websites and applications to SMS sent from regular mobile numbers.

If you initially chose a number with the extention option, you can extend the rental at any time before it expires.

Security

OAuth2
rent-scope
grants access to renting phone numbers from Onlinesim

Parameters

query2
NameTypeDescription
countrystring

Country code (according to countries list)

langstring

Response language:

fr - French,

de - German,

ru - Russian,

en - English,

zh - Chinese.

Please note that the translation applies only to string field values, such as service names or country names. Field names themselves, error messages, and standard values (for example, true/false for boolean fields) remain in English

Enum:frderuenzhDefault:ru

Responses

200

Successful response for tariffsRent request: the server returns information on available rental plans or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf

Successful response (all countries, a single country, or an empty array) or an error (method-specific or common)

One Of
[0]object

Map of countries. Keys are country codes as strings (e.g. "7", "46", "373"), values are rentCountryTariff objects

[1]object
[2]object[]

Empty array returned when the specified country is unknown

maxItems: 0
[3]object
[4]object

Examples

List of number rental tariffs for all countriesexample_lines

List of rental and renewal terms and tariffs for all countries

{
  "7": {
    "code": 7,
    "enabled": true,
    "name": "russia",
    "new": false,
    "position": 7,
    "count": {
      "1": 1153,
      "3": 1153,
      "7": 1153,
      "15": 1153,
      "30": 1153
    },
    "days": {
      "1": 121,
      "3": 215.5,
      "7": 400,
      "15": 700,
      "30": 1078.5
    },
    "extend": 1153,
    "confirm": false
  }
}
List of number rental tariffs for one countryexample_lines

List of rental and renewal terms and tariffs for the specified country

{
  "code": 7,
  "enabled": true,
  "name": "russia",
  "new": false,
  "position": 7,
  "count": {
    "1": 1153,
    "3": 1153,
    "7": 1153,
    "15": 1153,
    "30": 1153
  },
  "days": {
    "1": 121,
    "3": 215.5,
    "7": 400,
    "15": 700,
    "30": 1078.5
  },
  "extend": 1153,
  "confirm": false
}

Code Samples

Generating examples...