api:pbx:group:lookup
Table of Contents
API : PBX : Group Lookup
Introduction
This API is used to validate that one or more numbers are valid and the extension using it can be added to the members or controllers collection on a group.
Request
This request finds user names by extension phone numbers.
| URL | https://api.telecomx.dk/pbx/group/lookup | ||
|---|---|---|---|
| Method | GET, POST | ||
| Access level | MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Body/Query | customer | Id | Id of the customer the group belongs to, defaults to users customer. |
| numbers | Array | List of extension numbers to lookup. | |
Request body example
{ customer: '12345678901234567890ABCD', numbers: ['200', '201', '210'] }
Response
| JSON object | ||
|---|---|---|
| invalid | Array | List of numbers that are not found, and cannot be added. |
| valid | Array | List of numbers that are found and can be added. |
| valid[]._id | Id | Id of the extension. |
| valid[].number | String | Phone number. |
| valid[].name | String | Name. |
Example
{ valid: [ { _id: '12345678901234567890ABCD', number: '210', name: 'Jon Snow' }, { ... } ], invalid: [ '200', '209' ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | customer | Customer not found or not active |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/pbx/group/lookup.txt · Last modified: 2018/09/06 10:37 by Per Møller