Skip to content

Retrieves virtual numbers connected to the account

Method get.virtual_numbers
Description Retrieves virtual numbers connected to the account
Who has access Agents and clients

Request parameters

Name Type Required Description
access_token string yes Session key used to authenticate the request
user_id number no Unique ID of the client user on whose behalf the request is made. Required when an agent makes the request. To retrieve a list of client users, call "get.customer_users".
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Number of records to skip before returning results. Default: 0. See the "Paging" section.
filter object no Filtering criteria. See the "Filters" section.
fields array no Fields to include in the response. See the "Viewing returned data" section.
sort array no Sorting criteria. See the "Data sorting" section.

Response parameters

Name Type Valid values Filtering Sorting Description
id number yes Unique virtual number ID
child_customer_id number yes yes Unique ID of the agent's client account
virtual_phone_number string yes Virtual phone number
redirection_phone_number string yes Destination number associated with the virtual number. Commonly used for toll-free numbers.
activation_date iso8601 YYYY-MM-DD hh:mm:ss yes Date and time the number was activated
status enum
  • active
  • waiting
  • cleaning
  • prereserved
  • reserved
  • manual_lock
  • limit_lock
yes yes Current status of the virtual number
category enum
  • usual
  • bronze
  • silver
  • gold
  • platinum
yes yes Number category
typeenum
  • va
  • call_tracking
  • dynamic_call_tracking
yes yes Virtual number type
comment string yes yes Comment associated with the virtual number
name string yes yes Display name of the virtual number
Advertising campaigns
campaigns array yes Advertising campaigns that use the virtual number
campaign_id number Unique advertising campaign ID
campaign_name string Advertising campaign name
site_id number Unique ID of the site associated with the advertising campaign
site_domain_name string Domain name of the site associated with the advertising campaign, without the http:// or https:// scheme
Site number blocks
site_blocks array Site number blocks that use the virtual number
site_block_id number Unique site number block ID
site_block_name string Site number block name
Call processing rules
scenarios array yes Scenarios associated with the virtual number
scenario_id number Unique scenario ID
scenario_name string Scenario name
call_processing_rule_id number Unique call processing rule ID
is_active boolean Indicates whether the rule is active

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 response structure

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

For errors common to all methods, see the Data API — General documentation.