Get detailed information about phone number and it's status
GEThttps://{ourserver.com}/api/resellers/checkNumber
This request retrieves detailed information about the number.
You might need it to gather the data to analyse the statistics.
Parameters
query3
| Name | Type | Description |
|---|---|---|
number* | string | Phone number in international format (including country code) |
with_history | boolean | Detailed operation history flag (when |
test | string | Optional field for the request body of Reseller API v2. Allowed values are While being assigned, While being assigned, 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
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Responses
200Onlinesim server response
application/jsonschemaobject
responseoneOf1, if request was successful, otherwise error message will come up
[0]objectAn object with data about each number, where the key is the phone number
Examples
Example response from Onlinesim server (successful retrieval with full details)38 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)29 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"
}
}{
"response": "0"
}[
{
"response": "ERROR_WRONG_KEY"
}
]401Unauthorized. 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
text/plainUnauthorized403Forbidden. The request was understood but refused due to insufficient permissions
application/jsonschemaobject
errorobjectRequired
ERROR_DISABLEDERROR_IPERROR_RENT