Query Phonebook List

Query the Phonebook list.

Request URL

GET {base_url}/{api_path}/phonebook/list?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.

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 number of 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/list?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": 2,
    "data": [
        {
            "id": 3,
            "name": "All Company Contacts_Phonebook",
            "total": 7,
            "member_select": "sel_all"
        },
        {
            "id": 5,
            "name": "Vendor",
            "total": 6,
            "member_select": "sel_specific"
        }
    ]
}