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.
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. | |
{ customer: '12345678901234567890ABCD', numbers: ['200', '201', '210'] }
| 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. |
{ valid: [ { _id: '12345678901234567890ABCD', number: '210', name: 'Jon Snow' }, { ... } ], invalid: [ '200', '209' ] }
| Error code | Message | Description |
|---|---|---|
| 404 | customer | Customer not found or not active |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |