API Module License searchProductLicenseRequest

From Openprovider API documentation

Jump to: navigation, search

Contents

Module Licenses > Search Product

Module Licenses
Command name searchProductLicenseRequest
Use Returns a list of license types matching search criteria
Input
  • limit default value: 100
  • offset default value: 0
  • category array of one or more of those categories: plesk, virtuozzo, sitebuilder
  • withOptions default value: 0
Output Result set of license product details:
  • id
  • title
  • options

Examples

Using PHP class

$request = new OP_Request;
$request->setCommand('searchProductLicenseRequest')
  ->setAuth(array('username' => 'username', 'password' => 'password'))
  ->setArgs(array(
    'withOptions' => 1,
    'category' => 'virtuozzo'
  ));

Raw XML

Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.

<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <credentials>
    <username>username</username>
    <password>password</password>
  </credentials>
  <searchProductLicenseRequest>
    <withOptions>1</withOptions>
    <category>virtuozzo</category>
  </searchProductLicenseRequest>
</openXML>
<?xml version="1.0" encoding="UTF-8"?>
<openXML>
  <reply>
    < code>0</code>
    <desc />
    <data>
      <results>
        <array>
          <item>
            <id>9</id>
            <title>Parallels Virtuozzo 4.0 for Linux/Unix</title>
            <category>virtuozzo</category>
            <minimalPrice>
              <product>
                <price>12.00</price>
                <currency>EUR</currency>
              </product>
              <reseller>
                <price>12.00</price>
                <currency>EUR</currency>
              </reseller>
            </minimalPrice>
            <options>
              <keyType>
                <title>Key type</title>
                <options>
                  <array>
                    <item>
                      <id>VIRTUOZZO4</id>
                      <title>Parallels Virtuozzo 4.0 for Linux/Unix</title>
                    </item>
                  </array>
                </options>
              </keyType>
              <containers>
                <title>Containers</title>
                <options>
                  <array>
                    <item>
                      <id>1</id>
                      <title>1</title>
                    </item>
                    <item>
                      <id>3</id>
                      <title>3</title>
                    </item>
                    <item>
                      <id>10</id>
                      <title>10</title>
                    </item>
                    <item>
                      <id>20</id>
                      <title>20</title>
                    </item>
                    <item>
                      <id>30</id>
                      <title>30</title>
                    </item>
                    <item>
                      <id>50</id>
                      <title>50</title>
                    </item>
                    <item>
                      <id>60</id>
                      <title>60</title>
                    </item>
                    <item>
                      <id>70</id>
                      <title>70</title>
                    </item>
                    <item>
                      <id>100</id>
                      <title>100</title>
                    </item>
                    <item>
                      <id>300</id>
                      <title>300</title>
                    </item>
                  </array>
                </options>
              </containers>
              <features>
                <title>Application(s)</title>
                <options>
                </options>
              </features>
              <periods>
                <options>
                  <array>
                    <item>
                      <id>1</id>
                      <title>1 month</title>
                    </item>
                    <item>
                      <id>3</id>
                      <title>3 months</title>
                    </item>
                    <item>
                      <id>6</id>
                      <title>6 months</title>
                    </item>
                    <item>
                      <id>12</id>
                      <title>1 year</title>
                    </item>
                    <item>
                      <id>24</id>
                      <title>2 years</title>
                    </item>
                  </array>
                </options>
              </periods>
            </options>
          </item>
          <item>
            <id>10</id>
            <title>Parallels Virtuozzo 4.0 for Windows</title>
            <category>virtuozzo</category>
            <minimalPrice>
              <product>
                <price>12.00</price>
                <currency>EUR</currency>
              </product>
              <reseller>
                <price>12.00</price>
                <currency>EUR</currency>
              </reseller>
            </minimalPrice>
            <options>
              <keyType>
                <title>Key type</title>
                <options>
                  <array>
                    <item>
                      <id>VIRTUOZZO4WIN</id>
                      <title>Parallels Virtuozzo 4.0 for Windows</title>
                    </item>
                  </array>
                </options>
              </keyType>
              <containers>
                <title>Containers</title>
                <options>
                  <array>
                    <item>
                      <id>1</id>
                      <title>1</title>
                    </item>
                    <item>
                      <id>3</id>
                      <title>3</title>
                    </item>
                    <item>
                      <id>10</id>
                      <title>10</title>
                    </item>
                    <item>
                      <id>20</id>
                      <title>20</title>
                    </item>
                    <item>
                      <id>30</id>
                      <title>30</title>
                    </item>
                    <item>
                      <id>50</id>
                      <title>50</title>
                    </item>
                    <item>
                      <id>60</id>
                      <title>60</title>
                    </item>
                    <item>
                      <id>70</id>
                      <title>70</title>
                    </item>
                    <item>
                      <id>100</id>
                      <title>100</title>
                    </item>
                  </array>
                </options>
              </containers>
              <features>
                <title>Application(s)</title>
                <options>
                </options>
              </features>
              <periods>
                <options>
                  <array>
                    <item>
                      <id>1</id>
                      <title>1 month</title>
                    </item>
                    <item>
                      <id>3</id>
                      <title>3 months</title>
                    </item>
                    <item>
                      <id>6</id>
                      <title>6 months</title>
                    </item>
                    <item>
                      <id>12</id>
                      <title>1 year</title>
                    </item>
                    <item>
                      <id>24</id>
                      <title>2 years</title>
                    </item>
                  </array>
                </options>
              </periods>
            </options>
          </item>
        </array>
      </results>
      <total>2</total>
    </data>
  </reply>
</openXML>
Views
Personal tools