User Tools

Site Tools


api:pbx:phonebook:get

API : PBX : Phonebook Get

Request

This request will return a single contact from the phonebook.

URL https://api.telecomx.dk/pbx/phonebook/CONTACT_ID
Method GET
Access level PERSONAL if contact is personal or user has group right 'readPhonebook' or shared.
VIEWER, MANAGER, OWNER if contact is personal and user has group right 'readPhonebook' or contact is shared.
RESELLER, RESELLER_ADMIN or ADMIN if contact is shared.
Param CONTACT_ID Id of the contact (24 hex-char string).

Query examples

https://api.telecomx.dk/pbx/phonebook/12345678901234567890ABAB

Response

JSON object
_id Id Unique id of the phonebook entry.
customer Id Id of the customer the entry belongs to.
employee Id If the entry belongs to a single employee, this is the id of the employee, otherwise null for shared.
type String Type of contact: PERSON, COMPANY.
givenName String Given name.
familyName String Family name.
company String Company name.
title String Title of person.
department String Department of person.
addresses Array List of addresses.
addresses[].type String Type of address: HOME, WORK.
addresses[].street String Street, housenumber, floor, door.
addresses[].zip String Zip code.
addresses[].city String City.
addresses[].state String State.
adressses[].country String ISO3166-2 country code.
phoneNumbers Array Phone numbers
phoneNumbers[].type String Number type: HOME, WORK, MOBILE, MAIN, OTHER.
phoneNumbers[].number String Phone number in E.164 format.
emailAddresses Array E-mail addresses
emailAddresses[].type String Type: HOME, WORK, MAIN, OTHER.
emailAddresses[].address String E-mail address.
shortNumber String Optional short number, 1-7 digits, that will call this contact. Only available on shared contacts.
notes String Notes about the contact.
picture Id Id of picture of contact, null if none.
externalId String External ID, can be used to reference phonebook contacts from another system

Example

{
  "_id": "12345678901234567890ABCD",
  "customer": "12345678901234567890AAAA",
  "employee": "12345678901234567890BBBB",
  "type": "PERSON",
  "givenName": "Peter",
  "familyName": "Hansen",
  "company": "Acme Soap & Rope ApS",
  "title": "Generel manager",
  "department": "Sales",
  "addresses": [
    {
      "type": "WORK",
      "street": "Paradise Apple Road 23",
      "zip": "2450",
      "city": "Copenhagen",
      "country": "DK"
    }
  ],
  "phoneNumbers": [
    {
      "type": "WORK",
      "number": "+4588888888"
    },
    {
      "type": "MOBILE",
      "number": "+4580808080"
    }
  ],
  "emailAddresses": [
    {
      "type": "HOME",
      "address": "myself@gmail.com"
    },
    {
      "type": "WORK",
      "address": "ph@acmesoapandrope.com"
    }
  ],
  "notes": "Some note about the contact",
  "picture": null,
  "externalId": "42"
}

Errors

Error code Message Description
404 not_found Contact not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/phonebook/get.txt · Last modified: 2025/01/10 11:11 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki