1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - GET Requests
Open navigation

GET/contacts/export

The GET/pbx/contacts/export request will return the a detailed list of the user's private TeleConsole contacts in the form of a downloadable CSV or VCF file. 

If you need to get company contacts use the GET/people request instead (see this explanation about the difference between personal and company contacts.)

The top row of the CSV file contains the names of the fields and the following rows contain the contact data itself. An empty data field is represented by a comma.

In the VCF each row has both the name of the field and the relevant contact data. It also contains font informtion in the CHARSET field, supporting multiple languages. The name of the fields are shortened (e.g. ORG=Organization) and there are only a handful of fields, resulting in a much cleaner look. 

The API response includes a "file" field. It is the URL for the CSV or VCF file. Copy-paste it into a web browser to download the CSV file and open it with any program or app the supports the format.


Parameters


ParameterTypeOperation
type
stringSpecify your preference for exported contact file - "csv" or "vcf".

The parameter must be in lower case or you will get a "Type not supported" error.
category
stringSpecify the category for the exported contacts - "private", "shared", "owned".

private - all of the user's TeleConsole's business personal contacts including shared and and owned contacts.

shared - also known as public contacts. These are personal contacts that the user shared with other users or vice versa.

owned - contacts created and owned by the user (basically excluding contacts shared from other users.) This is the default option.


Example


To export all the private contacts of a user as a CSV file use this syntax:


HTTPS method: GET


webserv.telebroad.com/api/teleconsole/rest/contacts/export?type=csv&category=private


Response:

{ "error": null,

     "result": { "file":             

                    "http:\/\/webserv.telebroad.com\/tmp\

                    /contacts_13690i5wSlE42CGVfDrtpgZ6T.csv" 



When downloaded the CSV file will look something like this - 


"First Name","Middle Name","Last Name",Title,Suffix,Initials,"Web Page",Gender,Birthday,Anniversary,Location,Language,"Internet Free Busy",Notes,"E-mail Address","E-mail 2 Address","E-mail 3 Address","Primary Phone","Home Phone","Home Phone 2","Mobile Phone",Pager,"Home Fax","Home Address","Home Street","Home Street 2","Home Street 3","Home Address PO Box","Home City","Home State","Home Postal Code","Home Country",Spouse,Children,"Manager's Name","Assistant's Name","Referred By","Company Main Phone","Business Phone","Business Phone 2","Business Fax","Assistant's Phone",Company,"Job Title",Department,"Office Location","Organizational ID Number",Profession,Account,"Business Address","Business Street","Business Street 2","Business Street 3","Business Address PO Box","Business City","Business State","Business Postal Code","Business Country","Other Phone","Other Fax","Other Address","Other Street","Other Street 2","Other Street 3","Other Address PO Box","Other City","Other State","Other Postal Code","Other Country",Callback,"Car Phone",ISDN,"Radio Phone","TTY/TDD Phone",Telex,"User 1","User 2","User 3","User 4",Keywords,Mileage,Hobby,"Billing Information","Directory Server",Sensitivity,Priority,Private,Categories,Shared

Kenneth,,Nolting,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,16032289025,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

David,,Garner,,,,,,,,,,,,[email protected],,,,,,17138104682,,,,,,,,,,,,,,,,,,13102265278,,,,"Plan Smart Partner",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Adam,,Simmons,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,17855708543,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Andy,,Cooper,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,18153577909,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Clayton,,Bradely,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,13109275923,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Chris,,Jenkins,,,,,,,,,,,,[email protected],,,,,,,,,,,,,,,,,,,,,,,,17471990336,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,



While a VCF version of the same file will look like this -


BEGIN:VCARD

VERSION:3.0

REV:2019-06-14T05:16:52Z

N;CHARSET=utf-8:Nolting;Kenneth;;;

FN;CHARSET=utf-8:Kenneth Nolting

ORG;CHARSET=utf-8:

EMAIL;INTERNET:

URL:

TEL;WORK:16032289025

END:VCARD

BEGIN:VCARD

VERSION:3.0

REV:2019-06-14T05:16:52Z

N;CHARSET=utf-8:Garner;David;;;

FN;CHARSET=utf-8:David Garner

ORG;CHARSET=utf-8:Plan Smart Partner

EMAIL;INTERNET:[email protected]

URL:

TEL;WORK:13102265278

TEL;MOBILE:17138104682

END:VCARD

BEGIN:VCARD

VERSION:3.0

REV:2019-06-14T05:16:52Z

N;CHARSET=utf-8:Simmons;Adam;;;

FN;CHARSET=utf-8:Adam Simmons

ORG;CHARSET=utf-8:

EMAIL;INTERNET:

URL:

TEL;WORK:17855708543

END:VCARD

BEGIN:VCARD

VERSION:3.0

REV:2019-06-14T05:16:52Z

N;CHARSET=utf-8:Cooper;Andy;;;

FN;CHARSET=utf-8:Andy Cooper

ORG;CHARSET=utf-8:

EMAIL;INTERNET:

URL:

TEL;WORK:18153577909

END:VCARD

BEGIN:VCARD

VERSION:3.0

REV:2019-06-14T05:16:52Z

N;CHARSET=utf-8:Bradely;Clayton;;;

FN;CHARSET=utf-8:Clayton Bradely

ORG;CHARSET=utf-8:

EMAIL;INTERNET:

URL:

TEL;WORK:13109275923

END:VCARD