api:pbx:trunk:availablenumbers
Table of Contents
API : PBX : Trunk : Available numbers
Introduction
This request is used to get a list of numbers that can be used on a trunk.
The list will return numbers on Trunks and mobile phones that are marked for PBX usage and which has not been assigned to other extensions or trunks.
Request
| URL | https://api.telecomx.dk/pbx/trunk/availablenumbers | |
|---|---|---|
| Method | GET | |
| Access level | PERSONAL, VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Query | customer | [optional] Id of customer to lookup numbers for (24 char hex), defaults to user self. |
| offset | [optional] Index of the first item to return, default 0. |
|
| limit | [optional] The number of items to return, default 50, min 1, max 100. |
|
| filter | [optional] Search query that will match against searchable fields. |
|
Query examples
https://api.telecomx.dk/pbx/trunk/availablenumbers?customer=12345678901234567890ABCD
Response
| JSON object | ||
|---|---|---|
| offset | Number | Index of the first number returned. |
| limit | Number | Number of numbers to return. Note that the actual number of returned items may be lower. |
| total | Number | Number of numbers that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| numbers | Array | Array of numbers, see definition below. |
| Number object | ||
|---|---|---|
| number | String | The phone number. |
| voiceAccount | Id | Id of the voice accounts the number belongs to. |
| type | String | Type of voice account the number belongs to - SIP or MVNO. |
Example
{ offset: 0, limit: 50, total: 12, numbers: [ { number: '+4550802900', voiceAccount: '1234567890123457890AAAA', type: 'MVNO' }, { number: '+4570305055', voiceAccount: '12345789012457890BBBB', type: 'SIP' }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | customer | Not found |
| 500 | internal_error | <Unspecified> |
api/pbx/trunk/availablenumbers.txt · Last modified: 2019/05/27 05:58 by Per Møller