MAPI Manual

NAME

LIST_LOCATIONS

FUNCTION

List countries

SYNOPSIS

action: LIST_LOCATIONS

login_name
login_passwd
or  
login_name
session_id
or  
device_id        

DESCRIPTION

This function allows users to get a list of countries provided by the system. Both GET and POST methods can be used to perform
the request.

Required Parameters

* action: specifies the requested function. Sets to LIST_LOCATIONS.

* login_name: the login name for authenticating the user.
* login_passwd: the login password for authenticating the user.
or
* login_name: the login name for authenticating the user.
* session_id: the session ID for authenticating the user.
or
* device_id: a unique ID of the device. The system can use it as a key to identify users. 

RETURN DATA

For each valid request, the server provides a response in XML format, wrapped within a <result> tag.
The response contains the following attributes:
* mcp_location_id: ID of the country.
* country: name of the country.
* country_code: the country calling code.
* mcp_mlang_id: ID of the language of the location.

For an invalid request, the response XML contains the following attribute:
* msg: a string containing the error message. 

ROLE PERMITTED

EXAMPLES

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

Request:
http://app02.yvntech.com/MapIHttpS/MapIS?action=LIST_LOCATIONS&device_id=mytestid

Response:
<result tftype='1' infotype='0'>
    <resultset name='mcp_location'>
        <row>
            <field name='mcp_location_id'>1</field>
            <field name='country'>Amercia</field>
            <field name='country_code'>1</field>
            <field name='mcp_mlang_id'>1</field>
        </row>
        <row>
            <field name='mcp_location_id'>44</field>
            <field name='country'>United Kingdom</field>
            <field name='country_code'>44</field>
            <field name='mcp_mlang_id'>44</field>
        </row>
        <row>
            <field name='mcp_location_id'>61</field>
            <field name='country'>Australia</field>
            <field name='country_code'>61</field>
            <field name='mcp_mlang_id'>61</field>
        </row>
        <row>
            <field name='mcp_location_id'>86</field>
            <field name='country'>China</field>
            <field name='country_code'>86</field>
            <field name='mcp_mlang_id'>86</field>
        </row>
    </resultset>
</result>


TIPS

ENVIRONMENT

AUTHOR

YVN Tech

SEE ALSO

Mweb v2.0 YVNTECH 2014