gethttps://{ourserver.com}/api/resellers/checkNumbers

GET /api/resellers/checkNumbers

Get detailed information about specified phone numbers in your profile and their statuses

This request is similar to checkNumber request, with exception that it allows you to check numbers on the Onlinesim server in bulk. It provides a detailed information about specified numbers, or about all numbers on your account if no specific numbers are passed.

Parameters

query2
NameTypeDescription
with_historyboolean

Detailed operation history flag (when true returns a list of completed operations for the specified numbers)

teststring

Optional field for the request body of Reseller API v2. Allowed values are test1, test2.

While being assigned, test1 value will allow the request to be passed, however the data won't be saved by our server (the function will not be executed by this request).

While being assigned, test2 value will print out your request's payload in response.

Can be passed as query parameter (for GET) or as a field in request's body (for POST). Both ways are equivalent, but using them simultaneously is not recommended.

Enum:test1test2
header1
NameTypeDescription
Authorization*string

see more here

Request Body

Content-Typeapplication/json
Schema
Bodyobject
numbersstring[]
itemsstring

Number in international format (with + sign)

Responses

200

Onlinesim server response

Content-Typeapplication/json
Schema
Responseobject
responseoneOf

1, if request was successful, otherwise error message will come up

One Of
[0]string
[1]integer
[additionalProperties]object

An object with data about each number, where the key is the phone number

idinteger

Number ID

balanceinteger

Number balance

country_idinteger

Country code (according to the countries list)

errorsinteger

How many failed operation current number has

numberstring

Phone number in international format

port_idstring

Unique port name, this name will be displayed in our interface on your personal web-page.

Unless specified defaults to phone number value (value of number parameter)

maxLen: 100
suminteger

Total income earned by this number, in RUB

used_serviceobject

An object where the keys are the slugs of services that have been used on the current number, according to the services list. For the “Rent” service, the key is rent

[additionalProperties]string

Short service name (slug)

banned_serviceobject

An object where the keys are the slugs of services that are banned on the current number, according to the services list. For the “Rent” service, the key is rent

[additionalProperties]string

Short service name (slug)

historyobject[]
itemsobject
numberinteger

Phone number in international format

servicestring

Service name (for rental operation the value is always rent)

sumnumber

The income amount for this operation in RUB (0 if the operation was canceled by the client or SMS was not received)

created_atstring

Date and time the operation started (when the client ordered the number).

updated_atstring

Date and time of the last update for this operation (if the operation is already closed, it matches the closing date and time).

historyboolean

Operation closure marker (if true, the operation is closed at the time of the request)

bannedboolean

If true the number is banned (ban is applied after 3 failed operations).

It is lifted automatically every 24 hours or upon clicking Reset bans/Clean all banned services button on your personal webpage.

reseller_idinteger

Partner's account ID

rentboolean

If true, your account is eligible for providing long term rent service

statusinteger

Current status of the number, enum:

1 - number is working

2 - number is queued up/loading (after the placement)

3 - (deprecated)

4 - such number does not exist on your account (invalid entry)

5 - (deprecated)

6 - null, rent error: this number was successfully used for long term rent and won't generate the profit anymore. You need to replace the number with a new one.

7 - (deprecated)

Enum:123467
status_textstring

Current status of the number, textual description

clearableboolean

Reset bans/Clean all banned services function availability (available once in 24 hours)

created_atobject
datestring

Date and time of placement

timezone_typeinteger

Server timezone

timezonestring

Server timezone (text)

Examples

Example response from Onlinesim server (successful retrieval with full details)39 lines
{
  "response": "1",
  "234112233445": {
    "id": 110251,
    "balance": 250,
    "country_id": 46,
    "errors": 0,
    "number": "4605091080",
    "port_id": "Port1",
    "sum": 76.25,
    "used_service": {
      "wa": "wa",
      "tg": "tg"
    },
    "banned_service": {
      "fb": "fb"
    },
    "history": [
      {
        "number": 46777666555,
        "service": "rent",
        "sum": 26.6,
        "created_at": "2024-06-11 17:33:26",
        "updated_at": "2024-06-11 17:48:37"
      }
    ],
    "banned": false,
    "reseller_id": 12345,
    "rent": true,
    "status": 1,
    "status_text": "work",
    "clearable": true,
    "created_at": {
      "date": "2024-05-01T12:00:00",
      "timezone_type": 1,
      "timezone": "UTC"
    }
  }
}
Example response from Onlinesim server (successful retrieval with empty history as `with_history` is not passed)31 lines
{
  "response": "1",
  "234112233446": {
    "id": 110252,
    "balance": 100,
    "country_id": 1,
    "errors": 4,
    "number": "15555555555",
    "port_id": "Port2",
    "sum": 0,
    "used_service": {
      "in": "in"
    },
    "banned_service": {
      "wa": "wa",
      "tg": "tg"
    },
    "history": [],
    "banned": true,
    "reseller_id": 12346,
    "rent": false,
    "status": 6,
    "status_text": "rent_error",
    "clearable": false,
    "created_at": {
      "date": "2024-06-01T12:00:00",
      "timezone_type": 1,
      "timezone": "UTC"
    }
  }
}
Example response from Onlinesim server (failed retrieval)
{
  "response": "0"
}
Incorrect key passed
[
  {
    "response": "ERROR_WRONG_KEY"
  }
]
401

Unauthorized. The request is missing or uses an invalid API key. Some endpoints may return a 200 status with an ERROR_WRONG_KEY message instead of 401 — check the response body

Content-Typetext/plain
Schema
Responsestring
Enum:Unauthorized
403

Forbidden. The request was understood but refused due to insufficient permissions

Content-Typeapplication/json
Schema
Responseobject
errorobjectRequired
statusinteger

HTTP response code in text format

codestring
messagestring

Possible error codes: - ERROR_DISABLED - partner account is not activated - ERROR_IP - IP address is not in the list of allowed addresses - allowlist (see Access from IP field) - ERROR_RENT - account has no access to rent

Enum:ERROR_DISABLEDERROR_IPERROR_RENT
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENT
detailsobject[]Required
itemsobject

Code Samples

Generating examples...