partner10.createKey(struct, struct, string, string, array, string)

Purpose

Creates a Key with specified parameters and specified billing type (purchase or billing).

Signature

Method name: partner10.createKey

# Type Description

1

struct AuthInfo

client authentication information

2

struct ServerAddress

server addresses

3

string

ID of the client who will own the created key

4

string

identifier of a keytype for new key

5

array(string)

array of identifiers of upgrade plans, which will be applied to new key

6

string

server license type for key type and features, may be "purchase" or "billing"

Returns

Field Type Description

resultCode

int

code for command execution result (see below)

resultDesc

string

textual description of command execution result (see below)

mainKeyNumber

string

number for the created key if format PLSK.XXXXXXXX.XXXX

expirationDate

dateTime.iso8601

key expiration date

updateDate

dateTime.iso8601

key update date. If there is no update date for the license - will be absent

productKey

string

Product activation code. If there are no product activation code for the license - will be absent

additionalKeysNumbers

array(string)

numbers for additional keys in same format

susDate

dateTime.iso8601

SUS date (optional. Display only when SUS is available)

Result Codes

resultCode resultDesc

100

<key number> has been successfully created. Following additional keys were attached: <additional key number #1>, <additional key number #2>, ...

101

Additional key <additional key number> has been successfully created and attached to <main key number>

200

Client authorization failed

201

Access to this method is denied

202

Access to this object is denied

203

Not enough permissions to create feature keys

220

Key <key number> is not found

221

License key <key number> is marked as problem

222

License key <key number> is terminated

226

Another license is already active with the same HWID.

244

Feature is not applicable.

245

Additional keytype "<name of additional key type>" not applicable to main key's keytype "name of main key type"

250

Client with ID <ID> is not found

252

This customer account is detected as problem. No further actions for this customer are allowed.

253

This customer account is unconfirmed. No further actions for this customer are allowed.

257

Given parent key <key number> is master key

260

No "UPGRADE_PLAN_NAME" entry in the client's pricelist

261

Key type "<name of key type>" not found in client's pricelist

272

Another license is bound to given IP address.

280

Operation is not supported for this account type

284

Operation with N/A price is not allowed for this client

287

Failed to complete remote operation with product <product family>.

300

Internal error, please try after some time

400

Incorrect authorization info format

401

Incorrect server info format

410

Incorrect key number format: "<key number>"

412

Unknown base keytype: <name>

414

Incorrect HWID format

416

Unknown feature: <FEATURE NAME>

419

Unknown additional keytype: <name>

420

Unable to find keytype with <LICENSE_DETAILS> type for <CONSTANT_NAME> constant.

421

Incorrect server license details format

453

Duplicate feature: <feature>

XML Examples

Request message

<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
  <methodName>partner10.createKey</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>login</name>
            <value>
              <string><em>API_LOGIN</em></string>
            </value>
          </member>
          <member>
            <name>password</name>
            <value>
              <string><em>API_PASSWORD</em></string>
            </value>
          </member>
        </struct>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>ips</name>
            <value>
              <array>
                <data>
                  <value>
                    <string>192.168.0.1</string>
                  </value>
                </data>
              </array>
            </value>
          </member>
          <member>
            <name>macs</name>
            <value>
              <array>
                <data>
                  <value>
                    <string>1E:81:9E:63:65:09</string>
                  </value>
                </data>
              </array>
            </value>
          </member>
        </struct>
      </value>
    </param>
    <param>
      <value>
        <string><em>CLIENT_ID</em></string>
      </value>
    </param>
    <param>
      <value>
        <string><em>PLESK_BATTLEFIELD</em></string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string></string>
            </value>
          </data>
        </array>
      </value>
    </param>
    <param>
      <value>
        <string>purchase</string>
      </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>mainKeyNumber</name>
            <value>PLSK.00123456.0000</value>
          </member>
          <member>
            <name>resultDesc</name>
            <value>PLSK.00123456.0000 has been successfully created.</value>
          </member>
          <member>
            <name>additionalKeysNumbers</name>
            <value>
              <array>
                <data/>
              </array>
            </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.