MAPI Manual

NAME

LIST_USERACCOUNT_DAILYUSAGE

FUNCTION

List user account daily usage

SYNOPSIS

account_login_name, begin_dt, end_dt, order_type, search_limit

DESCRIPTION

This function allows users to list their account usage on a daily basis.  

Required Parameters

*action: LIST_USERACCOUNT_DAILYUSAGE.
*account_login_name: login name of the user.
*begin_dt: the beginning of time frame. It lists the account usage for timestamp within the given time frame. The format of timestamp is "YYYY-MM-DD HH:MM:SS". Special characters must be URL encoded.
*end_dt: the end of time frame. The format of timestamp is "YYYY-MM-DD HH:MM:SS". Special characters must be URL encoded.

Optional Parameters

*order_type: specifies the list order.
*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_user_id: user ID.
*report_date: the date to which the account summary refers.
*total_cost: cost in total.
*total_sms: the total amount of SMS sent.
*total_email: the total amount of emails sent.
*total_voice: the total amount of calls made.
*note: a note of the usage.

ROLE PERMITTED

All roles

EXAMPLES

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

Request:
http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_USERACCOUNT_DAILYUSAGE&account_login_name=name@example.com&begin_dt=2014-01-01+12%3A00%3A00&end_dt=2014-08-01+12%3A00%3A00&login_name=name@example.com&login_passwd=1111

Response:
<result tftype='1' infotype='0'>
    <resultset name='mcp_user_report' search_found_rows='6'>
        <row>
            <field name='mcp_user_id'>6009000</field>
            <field name='report_date'>2014-06-23</field>
            <field name='total_cost'>1.2000</field>
            <field name='total_sms'>12</field>
            <field name='total_email'>0</field>
            <field name='total_voice'>0</field>
            <field name='note'></field>
        </row>
        <row>
            <field name='mcp_user_id'>6009000</field>
            <field name='report_date'>2014-06-20</field>
            <field name='total_cost'>0.8000</field>
            <field name='total_sms'>8</field>
            <field name='total_email'>0</field>
            <field name='total_voice'>0</field>
            <field name='note'></field>
        </row>
        ...
        ...
        
    </resultset>
</result>

TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

Mweb v2.0 YVNTECH 2014