ListPhoneNumbers
You can invoke ListPhoneNumbers to obtain the phone number list under a specified instance.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID. |
ccc-test |
| SearchPattern |
string |
No |
Performs fuzzy matching based on the number. This parameter is optional and defaults to empty. An empty value indicates no filtering. |
0833 |
| Usage |
string |
No |
Usage of the number. This parameter is optional. The default value is empty, which means no filtering is applied. Valid values:
|
Bidirection |
| Active |
boolean |
No |
Indicates whether the number is active. This parameter is optional. The default value is empty, which means no filtering is applied. |
true |
| PageNumber |
integer |
Yes |
The paging ordinal number, ranging from 1 to 100. |
1 |
| PageSize |
integer |
Yes |
Page size, ranging from 1 to 100. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
BA03159C-E808-4FF1-B27E-A61B6E888D7F |
| Code |
string |
Response code. |
OK |
| Message |
string |
The response message. |
无 |
| Data |
object |
Data. |
|
| PageNumber |
integer |
The page number, ranging from 1 to 100. |
1 |
| PageSize |
integer |
The page size, ranging from 1 to 100. |
20 |
| TotalCount |
integer |
The total count. |
1 |
| List |
array<object> |
The phone number list. |
|
|
array<object> |
|||
| Active |
boolean |
Indicates whether the number is active. |
true |
| CreateTime |
string |
The number creation time, which is the time when the number was associated with the instance, in Unix timestamp format with millisecond precision. |
1617958538000 |
| UserId |
string |
Agent ID. If this parameter is not empty, the number is dedicated to the agent. |
agent@ccc-test |
| Tags |
string |
Business tags for the number, primarily used for labeling and extended business purposes. Ordinary customers do not need to concern themselves with this. |
M1 |
| City |
string |
The city where the number is registered. |
乐山 |
| InstanceId |
string |
The instance ID. |
ccc-test |
| Usage |
string |
The usage of the phone number. Valid values:
|
Bidirection |
| ContactFlowName |
string |
Name of the IVR contact flow associated with the number. |
默认联系流 |
| Provider |
string |
Number provider name. |
alicom |
| Number |
string |
Number. |
08330011**** |
| ContactFlowId |
string |
The IVR contact flow ID associated with the phone number. |
a3fb6c62-9b49-4942-ae5b-cf2abd4123ek |
| Province |
string |
The province where the number is registered. |
四川 |
| SkillGroups |
array<object> |
The list of skill groups associated with the number. |
|
|
object |
|||
| DisplayName |
string |
The display name of the skill group. |
测试技能组 |
| InstanceId |
string |
The instance ID. |
ccc-test |
| Name |
string |
The name of the skill group. |
skillgroup |
| SkillGroupId |
string |
The skill group ID. |
skillgroup@ccc-test |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "BA03159C-E808-4FF1-B27E-A61B6E888D7F",
"Code": "OK",
"Message": "无",
"Data": {
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 1,
"List": [
{
"Active": true,
"CreateTime": "1617958538000",
"UserId": "agent@ccc-test",
"Tags": "M1",
"City": "乐山",
"InstanceId": "ccc-test",
"Usage": "Bidirection",
"ContactFlowName": "默认联系流",
"Provider": "alicom",
"Number": "08330011****",
"ContactFlowId": "a3fb6c62-9b49-4942-ae5b-cf2abd4123ek",
"Province": "四川",
"SkillGroups": [
{
"DisplayName": "测试技能组",
"InstanceId": "ccc-test",
"Name": "skillgroup",
"SkillGroupId": "skillgroup@ccc-test"
}
]
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Parameter.Enumeration | The parameter %s must be one of the value of enumeration %s. | |
| 400 | Parameter.Maximum | The parameter %s must be less than or equal to %s. | |
| 400 | Parameter.Minimum | The parameter %s must be greater than or equal to %s. | |
| 400 | Parameter.Empty | The parameter %s may not be null or empty. | |
| 400 | Parameter.Null | The parameter %s may not be null. | |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.