Retrieving List of LP's

Use the get operation in the following cases:

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving info on LP's includes the get operation node:

<packet version="1.5.0.0">
<locale>
   <get>
   …
   </get>
</locale>
</packet>

 

The get node is presented by type LocaleGetInput (locale.xsd), and its graphical representation is as follows:

 

 

Response Packet Structure

The get node of the output XML packet is presented by type LocaleGetOutput (locale.xsd) and structured as follows:

Remarks

In API RPC v.1.5.0.0, the result node also contains the message node.

GetLP1500

 

 

Samples

Retrieving info on a single LP

The following request packet retrieves info on US English LP:

<packet>
  <locale>
    <get>
        <filter>
        <id>en-US</id>
        </filter>
    </get>
  </locale>
</packet>

Response:

<packet>
  <locale>
    <get>
    <result>
        <status>ok</status>
        <info>
          <id>en-US</id>
          <lang>ENGLISH</lang>
          <country>United States</country>
          <used>17</used>
          <enabled>true</enabled>
        </info>
    </result>
    </get>
  </locale>
</packet>

 

If the LP was not found, the response from the server looks as follows:

<packet>
  <locale>
    <get>
      <result>
        <status>error</status>
        <errcode>1013</errcode>
        <errtext>Locale does not exist</errtext>
        <filter-id>en-US</filter-id>
        <id>en-US</id>
      </result>
    </get>
  </locale>
</packet> 
Retrieving info on multiple LP's

The following request packet retrieves info on US English and Russian LP's:

<packet>
  <locale>
    <get>
        <filter>
          <id>en-US</id>
          <id>ru-RU</id>
        </filter>
    </get>
  </locale>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <locale>
    <get>
      <result>
        <status>ok</status>
        <info>
          <id>en-US</id>
          <lang>ENGLISH</lang>
          <country>United States</country>
          <used>4</used>
          <enabled>true</enabled>
        </info>
      </result>
      <result>
        <status>ok</status>
        <info>
          <id>ru-RU</id>
          <lang>RUSSIAN</lang>
          <country>Russian Federation</country>
          <used>0</used>
          <enabled>true</enabled>
        </info>
      </result>
    </get>
  </locale>
</packet>