Skip to content

Getting a list of connected virtual numbers

Method get.virtual_numbers
Description Getting a list of connected virtual numbers
Who has access Agent, Customer

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique ID of an agent's customer user who makes request
Is required for agent
To access a list of customer users, use the method "get.customer_users"
limit number no Returning entries count. Refer to "Paging"
offset number no Offset that defines from which number to return the entries "limit". Default value is "0". Refer to "Paging"
filter object no Refer to "Filters"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"

Parameters of a reply

Title Type Valid values Filtering Sorting Description
id number yes Virtual number unique ID
virtual_phone_number string yes Virtual number
redirection_phone_number string yes Redirection phone number
Is often used for the 800 numbers
activation_date iso8601 YYYY-MM-DD hh:mm:ss yes Date when a number was activated
status enum
  • active
  • waiting
  • cleaning
  • prereserved
  • reserved
  • manual_lock
  • limit_lock
yes yes Phone number status
category enum
  • usual
  • bronze
  • silver
  • gold
  • platinum
yes yes Phone number category
type enum
  • va
  • call_tracking
  • dynamic_call_tracking
yes yes Phone number type
Advertising campaigns that use a virtual number
campaigns array yes List of advertising campaigns that use a virtual number
campaign_id number Advertising campaign unique ID
campaign_name string Advertising campaign name
site_id number A unique ID of a website that's connevted to an advertising campaign
site_domain_name string An address on the internet of a website, connected to an advertising campaign. Without procotol - "http://" or "https://"
Blocks of advertising campaigns numbers, that use a virtual number
site_blocks array List of website numbers blocks, that use a virtual number
site_block_id number Numbers block unique ID
site_block_name string Numbers block unique ID name
Scenarios
scenarios array yes List of scenarios, connected to a virtual number
scenario_id number Scenario unique ID
scenario_name string Scenario name

JSON request structure

{
  "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 reply structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "metadata": {

    },
    "data": [
      {
        "id": "number",
        "virtual_phone_number": "string",
        "redirection_phone_number": "string",
        "activation_date": "iso8601",
        "status": "enum",
        "category": "enum",
        "type": "enum",
        "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"
          }
        ]
      }
    ]
  }
}

List of returning errors

Refer to the section "List of errors for the methods with the verb get"