MAPI Manual

NAME

LIST_BROADCAST_LATESTTALKS_GROUPBYCONTACT

FUNCTION

List most recent talks of a broadcast grouped by contact

SYNOPSIS

broadcast_id, io_type, time_from, time_to, order_type, search_limit

DESCRIPTION

This function allows users to list the talks of a broadcast. The results are grouped by contact. Note: For each contact, only the most recent message is shown.

Required Parameters
*action: LIST_BROADCAST_LATESTTALKS_GROUPBYCONTACT.
*broadcast_id: broadcast ID.

Optional Parameters
*io_type: specifies the type of messages to be listed, either inbound or outbound. Value is "MCPTYPE_IN" and "MCPTYPE_OUT" respectively.
*time_from: the beginning of time frame. This field is used to filter results based on the date and time the message is sent or received. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.
*time_to: the end of time frame. This field is used to filter results based on the date and time the message is sent or received. The date and time format is YYYY-MM-DD HH:MM:SS. Must be URL encoded.
*order_type: specifies the list order.
*search_limit: constrains the number of search results that are returned. It can also be used for pagination of search results. Value is a number or two numbers split by a comma. With one number, the value specifies the maximum number of results to return from the beginning of the search results. With two numbers, the first number specifies the offset of the first result to return, and the second specifies the maximum number of results to return. Note: The offset of the first result is 0 (not 1).  E.g., if value is "5", the first five search results will be returned; if value is "20,5", it will return maximum five results starting from the 21st result. Default value is 100.

RETURN DATA

The response contains the following attributes:
* mcp_talk_id: ID of the talk.
* mcp_channeltype_id: the channel type.
* sender: where the message appears to come from.
* recipient: the recipient that the message is sent to.
* contactbook_id: ID of the contact book.
* contact_id: ID of the contact.
* contact_name: name of the contact.
* content: message content which is encoded in hexadecimal format.
* task_io: specifies whether the message is inbound or outbound.
* status: status of the talk.
* talk_dt: the date and time of the talk.
* note: a note about the talk.
* msg_count: count of messages within the talk.

ROLE PERMITTED

Manager

EXAMPLES

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

Request:

http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_BROADCAST_LATESTTALKS_GROUPBYCONTACT&broadcast_id=393&login_name=user@example.com&login_passwd=1111

Response:

<result tftype='1' infotype='0'>
    <resultset name='mcp_butalk' search_found_rows='3'>
        <row>
            <field name='mcp_talk_id'>3052</field>
            <field name='mcp_channeltype_id'>sms</field>
            <field name='sender'></field>
            <field name='recipient'>+61411111111</field>
            <field name='contactbook_id'>0</field>
            <field name='contact_id'>0</field>
            <field name='contact_name'>+61411111111</field>
            <field name='content'>437573746f6d65722067617665207573206120676f6f6420726174652e</field>
            <field name='task_io'>MCPTYPE_OUT</field>
            <field name='talk_dt'>2014-05-02 12:33:46</field>
            <field name='msg_count'>3</field>
        </row>
        <row>
            <field name='mcp_talk_id'>3053</field>
            <field name='mcp_channeltype_id'>sms</field>
            <field name='sender'></field>
            <field name='recipient'>+61411111111</field>
            <field name='contactbook_id'>0</field>
            <field name='contact_id'>0</field>
            <field name='contact_name'>+61411111111</field>
            <field name='content'>5468657920736169642022546865207365727669636520697320657863656c6c656e74222e</field>
            <field name='task_io'>MCPTYPE_OUT</field>
            <field name='talk_dt'>2014-05-02 12:33:46</field>
            <field name='msg_count'>3</field>
        </row>
        ...
        ...
        
    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

LIST_BROADCAST_TALKS, LIST_CONTACTGROUP_TALKS

Mweb v2.0 YVNTECH 2014