GEThttps://{ourserver.com}/api/resellers/checkNumber

Get detailed information about phone number and it's status

This request retrieves detailed information about the number.

You might need it to gather the data to analyse the statistics.

Parameters

query3
NameTypeDescription
number*string

Phone number in international format (including country code)

with_historyboolean

Detailed operation history flag (when true returns a list of 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

Responses

200

Onlinesim server response

Content-Typeapplication/json
Schema
schemaobject
responseoneOf

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

All Of
[0]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",
  "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",
      "history": true
    }
  ],
  "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",
  "id": 110252,
  "balance": 100,
  "country_id": 1,
  "errors": 3,
  "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...