GET/contact

Function


The GET/contact method returns a list of personal contacts for a user based on the provided basic authorization credentials. 


The response has the following fields of information:


  • ID- the unique ID of the contact. 
  • fname -  the first name of the contact. 
  • lname - the last name of the contact. 
  • organization - the organization (company) of the contact. 
  • email - the email of the contact. 
  • number - the phone number (landline) of the contact.
  • mobile - the mobile phone number of the contact. 
  • fax - the fax number of the contact.
  • website - the website of the contact.
  • image - if an image of the contact has been uploaded by the user,  a path to the image will be detailed in this field.
  • public - a value of 1 indicates the contact is public. A public contact is made available to other users in the company on their own list of contacts.
  • owned - A value of 1 indicates the contact is owned by the user, that is it has been created and can be edited by him.


Parameters


All parameters go in the header.


Parameter
Type
Operation
id
string
Without this parameter all contacts for the user will be returned.

Include this parameter to request one specific contact. 
limit
integer
Specify the number of records to be returned by the request.
offset
Integer
Specify the first record to display. For example an offset of 3 will start the list on the 3rd record. If left empty the default will be the first record.


Examples


To get the record of a specific personal contact with use this syntax:


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/contact?id=9442


Response


The record for the contact will be returned, but if a wrong ID was provided the response will be this error -


{"error":{"code":444,"message":"Contact does not exist or does not belong to you"}}




To get the a list of a user's personal contacts with a limit of 3 records use this syntax:


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/contact?limit=3


Response:


{

    "error":null,

        "result":

        [{"id":"1592",

            "fname":"Nick",

            "lname":"Ramon",

            "organization":"GNV Consulting",

            "email":"N.ramon@gnvc.com",

            "number":"201-711-2400",

            "mobile":"201-483-5171",

            "fax":"201-711-2401",

            "website:"",

            "image":

            https:\/\/telebroad.com\/cdn\

            /avatar\/0f\/da\/c5c5ecf77f32ca541003

            b32e8b2d02hfa301.png",

            "public":"0",

            "owned":1},

        {"id":"6942",

            "fname":"Andy",

            "lname":"Klein",

            "organization":"National HS",

            "email":"andy.klein28@gmail.com",

            "number":"917-838-4128",

            "mobile":"917-383-4128",

            "fax":"",

            "website":"",

            "image":"",

            "public":"0",

            "owned":1}

        {"id":"10444",

            "fname":"Roger",

            "lname":"Smart",

            "organization":"",

            "email":"R.smart@onegoal.com",

            "number":"",

            "mobile":"672-542-3748",

            "fax":"",

            "website":"",

            "image":"",

            "public":"0",

            "owned":1}

        ]

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.