PBX API : GET /Contacts/

To get a contacts, make an HTTP GET request with basic authorization, resource URI:

http(s)://{PBX}/api/v1/Contacts/

GET Parameters

Required Parameters

NameDescription

Optional Parameters:

NameDefaultPossible valuesDescription

fields

All

id
name
email
extension
phone
office
home
home_mobile
fax
mobile
organization
picture
shortcut
phonebook_id
type
note
address
vat_id
name_prefix
document_type
document_id
pin
credit
hash
country
date_birth
born_in
postal_code
city
province
license_plate
document_released
document_from
last_update

A list of fields that should be returned

Maybe using with comma "," for listing all required fields

start0 Offset rows returned

count

100 How many rows to return

sort

nameid
name
email
extension
phone
office
home
home_mobile
fax
mobile
organization
picture
shortcut
phonebook_id
type
note
address
vat_id
name_prefix
document_type
document_id
pin
credit
hash
country
date_birth
born_in
postal_code
city
province
license_plate
document_released
document_from
last_update
Sort field
dir

ASC

ASC
DESC
Type of sorting

search

  Search words
If searchFields is not specify , searching by following fields:

name
email
extension
phone
fax
mobile
organization

searchFields

nameid
name
email
extension
phone
office
home
home_mobile
fax
mobile
organization
picture
shortcut
phonebook_id
type
note
address
vat_id
name_prefix
document_type
document_id
pin
credit
hash
country
date_birth
born_in
postal_code
city
province
license_plate
document_released
document_from
last_update

Field to be searched, there may be several.

Maybe using with comma "," for listing all required fields

filter[$key]empty

filter[id]
filter[name]
filter[email]
filter[extension]
filter[phone]
filter[office]
filter[home]
filter[home_mobile]
filter[fax]
filter[mobile]
filter[organization]
filter[picture]
filter[shortcut]
filter[phonebook_id]
filter[type]
filter[note]
filter[address]
filter[vat_id]
filter[name_prefix]
filter[document_type]
filter[document_id]
filter[pin]
filter[credit]
filter[hash]
filter[country]
filter[date_birth]
filter[born_in]
filter[postal_code]
filter[city]
filter[province]
filter[license_plate]
filter[document_released]
filter[document_from]
filter[last_update]

Filtering by any field also can use range [from][to] for filtering

Example:

GET http://{PBX}/api/v1/Contacts/?start=0&count=2&sort=id&dir=ASC
 {
    "type":"result",
    "result":{
        "total":112,
        "records":[{
            "id":8159,
            "name":"user2",
            "email":"email@gmail.com",
            "extension":"345",
            "phone":"",
            "office":"",
            "home":"",
            "home_mobile":"",
            "fax":"",
            "mobile":"+391234567890",
            "organization":"LDAP",
            "picture":"",
            "shortcut":"",
            "phonebook_id":2,
            "type":"",
            "note":"",
            "address":"",
            "vat_id":"",
            "name_prefix":"",
            "document_type":"",
            "document_id":"",
            "pin":"",
            "credit":"",
            "hash":"60e7e366c7a3af65258e7a3542d82d51",
            "country":"",
            "date_birth":"",
            "born_in":"",
            "postal_code":"",
            "city":"",
            "province":"",
            "license_plate":"",
            "document_released":"",
            "document_from":"",
            "last_update":"2013-06-07 11:50:02"
        },{
            "id":8160,
            "name":"user1",
            "email":"email2@gmail.com",
            "extension":"111",
            "phone":"",
            "office":"345854",
            "home":"",
            "home_mobile":"",
            "fax":"+391234567892",
            "mobile":"+391234567891",
            "organization":"LDAP",
            "picture":"\/cticonnect\/cticonnect_share\/user_avatar_9010198.png?36500",
            "shortcut":"",
            "phonebook_id":2,
            "type":"",
            "note":"",
            "address":"",
            "vat_id":"",
            "name_prefix":"",
            "document_type":"",
            "document_id":"",
            "pin":"",
            "credit":"",
            "hash":"798cfd49dd8a08d268a41469e8671ecd",
            "country":"",
            "date_birth":"",
            "born_in":"",
            "postal_code":"",
            "city":"",
            "province":"",
            "license_plate":"",
            "document_released":"",
            "document_from":"",
            "last_update":"2014-09-01 17:50:01"
        }]
    }
}