Receiving a list of virtual numbers available for setting up an advertising campaign
| Method | get.campaign_available_phone_numbers |
|---|---|
| Description | Obtaining a list of all virtual numbers available for setting the phone_number_id parameter when creating/updating an advertising campaign |
| 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. This identifier must be used in the phone_number_id parameter of the create.campaign or update.campaign | method
||
prefix |
string | yes | yes | Number prefix | |
phone_number |
string | yes | Virtual number | ||
type |
enum |
|
yes | Virtual number type
|
JSON request structure```json
{ "jsonrpc":"2.0", "id":"number", "method":"get.campaign_available_phone_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",
"prefix": "string",
"phone_number": "string",
"type": "enum"
}
]
}
}
List of returned errors
See the section "List of errors for methods with the verb get"