MAPI Manual

NAME

SEARCH_CONTACT

FUNCTION

Search contacts within a contact book

SYNOPSIS

contactbook_id, filter_id, extrafilter_xml, ctime_from, ctime_to, order_by, search_limit

DESCRIPTION

This function allows users to search contacts within a contact book.

Required Parameters

* action: SEARCH_CONTACT.
* contactbook_id: ID of the contact book.

Optional Parameters

* filter_id: ID of the filter.
* extrafilter_xml: XML representation of the extra filter. This value must be URL encoded.
* ctime_from: the beginning of time frame. It searches the contacts for timestamp within the given time frame. The format of timestamp is "YYYY-MM-DD HH:MM:SS". Special characters must be URL encoded.
* ctime_to: the end of time frame. The format of timestamp is "YYYY-MM-DD HH:MM:SS". Special characters must be URL encoded.
* order_by: specifies the order of the list results.
* search_limit: specifies a limit on the number of list results. It accepts two formats - either a number or two numbers separated by a comma. For example, if value is "5", the function will return the first five results to users; if value is "5,10", the function will return the results that are ordered within this range.

RETURN DATA

The response contains the following attributes:
* mcp_org_id: organisation ID.
* mcp_contactbook_id: ID of the contact book.
* mcp_contact_id: ID of the contact.
* name: name of the contact.
* mobile: mobile of the contact.
* email: email of the contact.

ROLE PERMITTED

Manager

EXAMPLES

The following example shows a successful HTTP GET request and response.

Request:
http://app02.yvntech.com/MapIHttpS/MapIS?action=SEARCH_CONTACT&contactbook_id=1&login_name=user@example.com&login_passwd=1111

Response:
<result tftype='1' infotype='0'>
    <resultset name='mcp_contacts' search_found_rows='19'>
        <row>
            <field name='mcp_org_id'>9000</field>
            <field name='mcp_contactbook_id'>1</field>
            <field name='mcp_contact_id'>2</field>
            <field name='name'>steven</field>
            <field name='mobile'>+61411111111</field>
            <field name='email'>steven@example.com</field>
        </row>
        
        ...
        ...
    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

GET_CONTACT

Mweb v2.0 YVNTECH 2014