Get the data and status of several numbers
GEThttps://{ourserver.com}/api/resellers/checkNumbers
Like checkNumber, but for several numbers. The answer has one of two shapes:
- without
numbers— all your numbers (including those connected through equipment): an object keyed by phone number, plus"response": "1"; - with
numbers— an object keyed by each requested number (as digits): the data of the number with"response": "1", or{"response": "0"}if you have no such number. There is no top-levelresponse. Withwith_history, history entries here carry all fields of the operation, including the received SMS (messages).
The request also confirms that your server is up.
Parameters
query4
| Name | Type | Description |
|---|---|---|
numbers[] | string[] | Numbers to check, with the country code (an optional leading |
with_history | boolean | Adds your completed operations on each number to |
as_text | boolean | Returns |
test | string | Test mode. It can also be passed in the request body.
A request with any non-empty Enum: test1test2 |
header1
| Name | Type | Description |
|---|---|---|
Authorization* | string | see more here |
Responses
200The data of the numbers, keyed by phone number
application/jsonschemaobject
numbersEnum:1Example:1[additionalProperties]oneOf
Examples
allNumbers25 lines
Without numbers: all your numbers
{
"4605091080": {
"id": 110251,
"balance": 0,
"country_id": 46,
"errors": 0,
"number": "4605091080",
"port_id": "Port1",
"equipment_id": "2130706433",
"sum": 26,
"used_service": {
"telegram": "tg"
},
"banned_service": {},
"history": [],
"banned": false,
"reseller_id": 12345,
"rent": "no",
"status": 1,
"status_text": "work",
"clearable": true,
"created_at": "2024-06-11T14:33:26.000000Z"
},
"response": "1"
}requestedNumbers29 lines
With numbers: one number found, one not
{
"15555555555": {
"id": 110252,
"balance": 0,
"country_id": 1,
"errors": 4,
"number": "15555555555",
"port_id": "Port2",
"equipment_id": "2130706433",
"sum": 0,
"used_service": {},
"banned_service": {
"whatsapp": "wa",
"telegram": "tg"
},
"history": [],
"banned": true,
"reseller_id": 12345,
"rent": null,
"status": 1,
"status_text": "work",
"clearable": false,
"created_at": "2024-06-01T09:00:00.000000Z",
"response": "1"
},
"15555555556": {
"response": "0"
}
}401No API key, or the key does not exist. The body is the plain text Unauthorized.
A request with Accept: application/json gets HTTP 200 with {"response":"ERROR_WRONG_KEY"} instead.
text/htmlUnauthorized.Example:Unauthorized.403Forbidden: the API key is valid, but the request is refused. Error codes:
ERROR_DISABLED — the partner account is not activated;
ERROR_BANNED — the partner account is blocked;
ERROR_IP — the request comes from an IP address that is not in the account's allowlist;
ERROR_RENT — rent is requested, but the account has no rent access (addNumber only).
ERROR_DISABLED — the partner account is not activated;ERROR_BANNED — the partner account is blocked;ERROR_IP — the request comes from an IP address that is not in the account's allowlist;ERROR_RENT — rent is requested, but the account has no rent access (addNumber only).application/jsonschemaobject
ERROR_DISABLEDERROR_BANNEDERROR_IPERROR_RENTExamples
Request from an IP address outside the allowlist
{
"response": "ERROR_IP",
"message": "ERROR_IP"
}