Search Contacts from Dialpad
Search for internal users, personal contacts, and company contacts from the dialpad.
Request URL
POST {base_url}/uc-ccontact/api/v1/personal-contacts/dial-search
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description pageNumber Yes Integer The page number to retrieve. pageSize Yes Integer The number of records to retrieve per page. query No String The keyword used to search for contacts. contactTypes Yes Array<String> The types of contacts to query.
Valid value:
CONTACT_TYPE_USER: Internal users.CONTACT_TYPE_PERSONAL: Personal contacts.CONTACT_TYPE_COMPANY: Company contacts.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Search_Result> | The search result. |
- Search_Result
-
Parameter Type Description items Array<Matching_Contact> The list of matching contacts. hasNext Boolean Whether more records exist on the next page.
true: More records exist.false: No more records.
preference Object<Tenant_Preference> The tenant's display preferences.
- Tenant_Preference
-
Parameter Type Description nameDisplayFormat String The format used to display a contact name. fls: First Name Last Name with Space Inbetweenlfs: Last Name First Name with Space Inbetweenlf: Last Name First Name without Space Inbetween
phoneFormat String The format used to display a phone number. local: Display numbers in domestic format, using the area code and local number without the country code.international: Display numbers in international format, starting with a plus sign (+) followed by the country code, area code, and local number.
- Matching_Contact
-
Parameter Type Description contactType String The type of the contact.
CONTACT_TYPE_USER: Internal users.CONTACT_TYPE_PERSONAL: Personal contacts.CONTACT_TYPE_COMPANY: Company contacts.
user Object<Internal_User> The details of internal user. Note: This parameter is returned with values when the contact type isCONTACT_TYPE_USER.personalContact Object<Contact> The details of personal contact. Note: This parameter is returned with values when the contact type isCONTACT_TYPE_PERSONAL.companyContact Object<Contact> The details of company contact. Note: This parameter is returned with values when the contact type isCONTACT_TYPE_COMPANY.
- Internal_User
-
Parameter Type Description userId String The unique identifier of the user. firstName String The user's first name. lastName String The user's last name. email String The user's email address. avatarUrl String The URL of the user's avatar. presenceStatus String The user's presence status.
AVAILABLEAWAYDNDLUNCHBUSINESS_TRIPOFF_WORK
extension String The user's extension number. mobilePhone String The user's mobile phone number. contactName String The user's display name. isFavorited Boolean Whether the current user has added the contact to favorites. online Boolean Whether the user is online.
- Contact
-
Parameter Type Description id String The unique identifier of the contact. firstName String The contact's first name. lastName String The contact's last name. company String The name of the company. phones Array<Phone_Item> The contact's phone numbers. contactName String The display name of the contact. isFavorited Boolean Whether the current user has added the contact to favorites. - Phone_Item
-
Parameter Type Description type String The type of the phone number.
MOBILE_PHONEBUSINESS_PHONEHOME_PHONEBUSINESS_FAXHOME_FAXMOBILE2_PHONEBUSINESS2_PHONEHOME2_PHONEOTHER_PHONE
number String The phone number.
Example
Request example
POST /uc-ccontact/api/v1/personal-contacts/dial-search HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTY0MjQyMiwiaWF0IjoxNzkxNjIwODIyLCJqdGkiOiIyOGE3MmE2YS00N2RkLTQ1MTQtOGI0MC1kNTkzNGI2N2I4NmYiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.W0_22hu-nAYYmB_5evw8lmqlKsYChzcVHH7ZDz4GC0eA2AH6mGu--3v4tnYilWRJGIMQtHVlCe0eGRaBjuwYNEETX7sJOjX8-86qm34eJmgWfjbNGu9wDWA1C-RyFc39Re0AFMXl7Uw5RjhhbdEWLj6QKCKxgUfSZHD-4icUTByZHQ7HhRxwmbGFhV97S6W8fyVGFTuEnf5pIPNfn-nZiHu-z-238gPyKeueDOg_7zKxyGuibzrBthtmrjmYaZzZ2viu-kllZW51UEXAofSOGfbtYmwLEZ4MRMR3-TOPK1ZcBvghKiqGF3zS0sH99THVdhro-LqG7rY-jxW6LhS6Mw
Content-Type: application/json
x-tenant-code: jint
{
"pageNumber": 1,
"pageSize": 3
}
Response example
HTTP/1.1 200 OK { "requestId": "b4a3852d9060ea68637fcd4a2389e026", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "items": [ { "contactType": "CONTACT_TYPE_USER", "user": { "userId": "345860923599089664", "firstName": "Example", "lastName": "Lee", "email": "color@yeastar.com", "avatarUrl": "https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/public/platform/jint/user_avatar/1786586631523/8.png", "presenceStatus": "AVAILABLE", "extension": "1004", "mobilePhone": "", "contactName": "Example Lee", "isFavorited": false, "online": true }, "personalContact": null, "companyContact": null }, { "contactType": "CONTACT_TYPE_USER", "user": { "userId": "338136731335409664", "firstName": "Leo", "lastName": "Ball", "email": "leo@sample.com", "avatarUrl": "https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/public/platform/jint/user_avatar/1786586611608/1.png", "presenceStatus": "AVAILABLE", "extension": "1000", "mobilePhone": "+8615880123456", "contactName": "Leo Ball", "isFavorited": false, "online": true }, "personalContact": null, "companyContact": null } ], "hasNext": true, "preference": { "nameDisplayFormat": "fls", "phoneFormat": "international" } } }