Search Specific Phonebooks

Search specific phonebooks from the phonebook list.

Request URL

GET {base_url}/{api_path}/phonebook/search?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
page No Integer Define which page is displayed.
page_size No Integer Define how many records per page.
sort_by No String Define the sorting field.

Valid value:

  • name
  • total
  • id
order_by No String Define the display order.

Valid value:

  • asc: Ascending order.
  • desc: Descending order.
search_value No String Search keyword.

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.
total_number Integer The total of the searched phonebooks.
data Array<Phonebook_Info> The list of the Phonebook's information.
Phonebook_Info
Table 3.
Parameter Type Description
id Integer Phonebook ID.
name String Phonebook name.
total Integer The total of company contacts contained in the phonebook.
member_select String The member selection method.
  • sel_all: All company contacts are selected.
  • sel_specific: Specific company contacts are selected.

Examples

Request example

GET /openapi/v1.0/phonebook/search?search_value=vendor&access_token=go18MODkNUAOReyKCnKzm6HEr6qTD1Pq HTTP/1.1 
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 1,
    "data": [
        {
            "id": 5,
            "name": "Vendor",
            "total": 6,
            "member_select": "sel_specific"
        }
    ]
}