Skip to content

Getting a list of available virtual numbers

Method get.available_virtual_numbers
Description Getting a list of available 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
phone_number string yes yes Virtual number
category enum usual - usual; bronze - bronze; silver - silver; gold - gold. yes yes Number category
location_mnemonic enum yes yes Location mnemonic
location_name string

yes Location
onetime_payment number

Number connection cost
monthly_charge number

Monthly charge
min_charge number

yes Minimal charge per month

JSON request structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "method": "get.available_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": [
      {
        "phone_number": "string",
        "category": "enum",
        "location_mnemonic": "enum",
        "location_name": "string",
        "onetime_payment": "number",
        "monthly_charge": "number",
        "min_charge":"number"
      }
    ]
  }
}

List of returning errors

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