GEThttps://{ourserver.com}/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
schemaobject
numbersstring[]

Responses

200

Onlinesim server response

Content-Typeapplication/json
Schema
schemaobject
responseoneOf

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

[additionalProperties]object

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

Examples

Example response from Onlinesim server (successful retrieval with full details)example_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)example_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
schemastring
Enum:Unauthorized
403

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

Content-Typeapplication/json
Schema
schemaobject
errorobjectRequired
messagestringRequired
Enum:ERROR_DISABLEDERROR_IPERROR_RENT
detailsobject[]Required

Code Samples

Generating examples...