| Method | get.virtual_numbers |
|---|---|
| Description | Getting a list of connected virtual numbers |
| Available to | Agent, Client |
Request parameters
| Title | Type | Required | Description |
|---|---|---|---|
access_token |
string | yes | Authentication session key |
user_id |
number | no | Unique user identifier of the client agent on behalf of which the request is made Is required for the agentTo obtain a list of client users, you must use the method "get.customer_users" |
limit |
number | no | Number of records returned. See section "Paging" |
offset |
number | no | Shift determines from which record number to return "limit" records. Default is "0". See section "Paging" |
filter |
object | no | See section "Filtering criteria" |
fields |
array | no | See section "View of returned data" |
sort |
array | no | See section "Sorting data" |
Response parameters
| Name | Type | Valid values | Filtering | Sorting | Description |
|---|---|---|---|---|---|
id |
number | yes | Unique identifier of the virtual number | ||
child_customer_id |
number | yes | yes | Unique agent client identifier | |
virtual_phone_number |
string | yes | Virtual number | ||
redirection_phone_number |
string | yes |
Associated number
Often used for 800 numbers |
||
activation_date |
iso8601 | YYYY-MM-DD hh:mm:ss | yes | Number activation date | |
status |
enum |
|
yes | yes | Number status |
category |
enum |
|
yes | yes | Room category |
type | enum |
|
yes | yes | Number type |
comment |
string | yes | yes | Comment to the number | |
name |
string | yes | yes | Name | |
| Advertising campaigns that use a virtual number | |||||
campaigns |
array | yes | List of advertising campaigns that use a virtual number | ||
campaign_id |
number | Unique identifier of the advertising campaign | |||
campaign_name |
string | Advertising campaign name | |||
site_id |
number | Unique identifier of the site with which the advertising campaign is associated | |||
site_domain_name |
string | The address of the website on the Internet with which the advertising campaign is associated. Without specifying the protocol - "http://" or "https://" | |||
| Blocks of advertising campaign numbers in which the number is used | |||||
site_blocks |
array | List of site number blocks that use the virtual number | |||
site_block_id |
number | Unique number block identifier | |||
site_block_name |
string | Name of the block of numbers | |||
| Call processing rules: | |||||
| Scripts | |||||
scenarios |
array | yes | List of scripts that are associated with a virtual number | ||
scenario_id |
number | Scenario unique identifier | |||
scenario_name |
string | Scenario name | |||
call_processing_rule_id |
number | Unique identifier of the call processing rule | |||
is_active |
boolean | Is the rule active | |||
JSON request structure```json
{ "jsonrpc":"2.0", "id":"number", "method":"get.virtual_numbers", "params":{ "access_token":"string", "user_id":"number", "offset":"number", "limit":"number", "filter":{
},
"sort":[
{
"field":"string",
"order":"string"
}
],
"fields":[
"string"
]
} }
### JSON response structure```json
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"metadata": {},
"data": [
{
"id": "number",
"child_customer_id": "number",
"virtual_phone_number": "string",
"redirection_phone_number": "string",
"activation_date": "iso8601",
"status": "enum",
"category": "enum",
"type": "enum",
"comment": "string",
"name": "string",
"campaigns": [
{
"campaign_id": "number",
"site_id": "number",
"site_domain_name": "string",
"campaign_name": "string",
"site_blocks": [
{
"site_block_id": "number",
"site_block_name": "string",
"is_tracking": "boolean"
}
]
}
],
"scenarios": [
{
"scenario_id": "number",
"scenario_name": "string",
"call_processing_rule_id": "number",
"is_active": "boolean"
}
]
}
]
}
}
List of returned errors
See the section "List of errors for methods with the verb get"