Tariffs for single-service activations
GEThttps://onlinesim.io/api/getTariffs.php
Countries and, for the selected country, the services with their price and the number of available numbers — the
service list of the "Buy a number" section of the dashboard. POST with the same parameters works too.
Public method: no key is needed. A key that is sent is still checked (an invalid one gives HTTP 456); an OAuth token,
if sent, must carry sms-scope.
- Services are split into pages:
countper page,pagefrom 1. - Prices are in USD. With
locale_pricethey are converted to the currency of thelanglanguage (ru— RUB,zh— CNY,frandde— EUR,en— USD), not to the currency of your balance. - With a key, the favourite countries and services of the profile come in
favorite_countriesandfavorite_servicesand are removed fromcountriesandservices. - The lists are cached for 60 seconds.


Parameters
query8
| Name | Type | Description |
|---|---|---|
country | integer | Country whose services are listed. An unknown code gives an empty Default: 1 |
count | integer≥ 1 | Services per page. Values below 1 become 1 Default: 30 |
page | integer≥ 1 | Page of the service list, from 1. Values below 1 become 1 Default: 1 |
filter_country | string | Keeps only the countries whose name or code starts with this value. The value is lowercased and a leading |
filter_service | string | Keeps only the services whose slug or name contains this value (case-insensitive). It also filters the
favourite services and leaves in |
filter | string | Default for both |
locale_price | integer |
Enum: 01Default:0 |
lang | string | Language of the texts in the answer (country and service names, status texts): Enum: frderuenzh |
Responses
200Tariffs or an error
application/jsonschemaoneOf
[0]object
[1]object
[2]object
Examples
success34 lines
Tariffs for Russia, no key
favorite_countries and favorite_services are {} here and are left out of the example
{
"response": "1",
"countries": {
"_7": {
"name": "Russia",
"original": "russia",
"code": 7,
"pos": 0,
"other": false,
"new": false,
"enable": true
}
},
"services": {
"_vkcom": {
"id": 1,
"count": 3721,
"price": "0.55",
"service": "VKontakte",
"slug": "vkcom"
},
"_telegram": {
"id": 2,
"count": "?",
"price": "1.20",
"service": "Telegram",
"slug": "telegram"
}
},
"page": 1,
"country": 7,
"filter": "",
"end": false
}Too many requests
{
"response": "INTERVAL_CONCURRENT_REQUESTS_ERROR"
}429HTTP 429: more than 400 requests per minute from one profile (from one IP for requests without a key), or more than 200 requests per minute from one profile to getNum, getPrice, getState and setOperationOk together
application/jsonschemaobject
Examples
Request rate limit exceeded
{
"response": "TRY_AGAIN_LATER"
}456HTTP 456: the API key is invalid or the OAuth token has expired. Public methods answer the same way when an invalid key is sent
application/jsonschemaobject
Examples
Invalid API key or expired token
{
"response": "ERROR_WRONG_KEY"
}