Query Information of Multiple Company Contacts

Query the detailed information of multiple company contacts at the same time.

Request URL

GET {base_url}/{api_path}/company_contact/query?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
ids Yes String The unique ID(s) of the company contact(s).
Note:

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
data Array<Contact_DetailInfo> The detailed information of the company contact.
Contact_DetailInfo
Table 3.
Parameter Type Description
id Integer The unique ID of the company contact.
first_name String First name.
last_name String Last name.
company String Company.
email String Email address.
phonebook_list Array<Phonebook_List> The list of phonebook to which the company contact belongs.
remark String Remark.
number_list Array<Number_List> The list of contact's numbers.
zip_code String ZIP code.
street String Street.
city String City.
state String State.
country String Country.
Phonebook_List
Table 4.
Parameter Type Description
id Integer Phonebook ID.
name String Phonebook name.
Number_List
Table 5.
Parameter Type Description
num_type String Number type.
  • business_number
  • business_number2
  • business_fax
  • mobile_number
  • mobile_number2
  • home_number
  • home_number2
  • home_fax
  • other_number
number String Telephone number.

Examples

Request example

GET /openapi/v1.0/company_contact/query?id=3,4&access_token=6pAmpgdKOOCr1BtI9tCRJpjVXZPdgLYf HTTP/1.1  

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK

{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "first_name": "Joseph",
            "last_name": "Goffin",
            "email": "joseph@gmail.com",
            "company": "Ticketsales",
            "zip_code": "",
            "street": "",
            "city": "",
            "state": "",
            "country": "",
            "number_list": [
                {
                    "num_type": "business_number",
                    "number": "12354978652"
                }
            ],
            "id": 3,
            "phonebook_list": [
                {
                    "id": 5,
                    "name": "Vendor"
                },
                {
                    "id": 3,
                    "name": "All Company Contacts_Phonebook"
                }
            ],
            "remark": ""
        },
        {
            "first_name": "Jay",
            "last_name": "Prichett",
            "email": "jayprichett@icloud.com",
            "company": "Closet",
            "zip_code": "41007",
            "street": "",
            "city": "Baltimore",
            "state": "Kentucky (KY)",
            "country": "United States",
            "number_list": [
                {
                    "num_type": "business_number",
                    "number": "001-5503308"
                },
                {
                    "num_type": "mobile_number",
                    "number": "15735810000"
                },
                {
                    "num_type": "other_number",
                    "number": "001-5503301"
                }
            ],
            "id": 4,
            "phonebook_list": [
                {
                    "id": 5,
                    "name": "Vendor"
                },
                {
                    "id": 3,
                    "name": "All Company Contacts_Phonebook"
                }
            ],
            "remark": ""
        }
    ]
}