partner10.searchClients

Purpose

Finds Clients by specified parameters.

Note: Search will be performed only under subordinate Clients.

 

Signature

Method name: partner10.searchClients

 

Parameters

# Type Description

1

struct AuthInfo

requesting party authentication information

2

struct ClientInfo

client search information

 

Returns

Field Type Description

resultCode

int

code for command execution result (see below)

resultDesc

string

textual description of command execution result (see below)

clientInfos

array (struct ClientsResultInfo)

collection of data about the customers found

Used Structures

Structure ClientInfo is used to search:

Field Type Description

firstName

string

max chars 64 including wildcards (optional)

lastName

string

max chars 64 including wildcards (optional)

companyName

string

max chars 64 including wildcards (optional)

email

string

max chars 256 including wildcards (optional)

keyNumber

string

key number with dots, allow with version and without version, version ignore per search (optional)

Note: At least one field in ClientInfo should be present.

Structure ClientsResultInfo:

Field Type Description

login

String

username of the client

ID

String

ID of the client

reseller

String

<firstName lastName (companyName)> of reseller

firstName

String

first name of the client

lastName

String

last name of the client

companyName

String

company name of the client

email

String

e-mail of the client

country

String

country of the client

address

String

address of the client

hasKeys

boolean

indicates that the client has at least one key

 

Result Codes

resultCode resultDesc

100

Found <count> client(s)

101

No clients found

200

Client authorization failed

201

Access to this method is denied

300

Internal error, please try after some time

400

Incorrect authorization info format

410

Incorrect key number format

447

firstName is too long

448

lastName is too long

449

companyName is too long

450

e-mail is too long

451

No search parameters defined. Set at least one search parameter.

 

XML Examples

Request message

<?xml version="1.0"?>
<methodCall>
  <methodName>partner10.searchClients</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>login</name>
            <value>
              <string>API_LOGIN</string>
            </value>
          </member>
          <member>
            <name>password</name>
            <value>
              <string>API_PASSWORD</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>firstName</name>
            <value>
              <string>John</string>
            </value>
          </member>
          <member>
            <name>lastName</name>
            <value>
              <string>Doe</string>
            </value>
          </member>
          <member>
            <name>companyName</name>
            <value>
              <string>Example, Inc.</string>
            </value>
          </member>
          <member>
            <name>email</name>
            <value>
              <string>jdoe@example.com</string>
            </value>
          </member>
          <member>
            <name>keyNumber</name>
            <value>
              <string>PLSK.00123456.0000</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

 

Response message

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>resultCode</name>
            <value>
              <int>100</int>
            </value>
          </member>
          <member>
            <name>clientInfos</name>
            <value>
              <array>
                <data>
                  <value>
                    <struct>
                      <member>
                        <name>lastName</name>
                        <value>Doe</value>
                      </member>
                      <member>
                        <name>reseller</name>
                        <value>John Doe (My Reseller)</value>
                      </member>
                      <member>
                        <name>hasKeys</name>
                        <value>
                          <boolean>1</boolean>
                        </value>
                      </member>
                      <member>
                        <name>country</name>
                        <value>US</value>
                      </member>
                      <member>
                        <name>firstName</name>
                        <value>John</value>
                      </member>
                      <member>
                        <name>email</name>
                        <value>jdoe@example.com</value>
                      </member>
                      <member>
                        <name>companyName</name>
                        <value>Example, Inc.</value>
                      </member>
                      <member>
                        <name>login</name>
                        <value><em>CLIENT_LOGIN</em></value>
                      </member>
                      <member>
                        <name>ID</name>
                        <value><em>CLIENT_ID</em></value>
                      </member>
                      <member>
                        <name>address</name>
                        <value>Example City</value>
                      </member>
                    </struct>
                  </value>
                </data>
              </array>
            </value>
          </member>
          <member>
            <name>resultDesc</name>
            <value>Found 1 client(s)</value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.