Purpose

Upgrades an existing Key with several upgrade plans defined in the method call.

Signature

Method name: partner10.upgradeKey

Parameters

# Type Description
1 struct AuthInfo client authentication information
2 string number of a key to upgrade
3 array Upgrade plan names to apply
4 string server license type: “billing” or “purchase” (optional)

Note: All supported identifiers for base keytypes, feature upgrade plans and additional Keytypes are documented in Supported Identifiers and Additional Keytypes chapters.

Returns

 Field Type Description
resultCode int code for command execution result (see below)
resultDesc string textual description of command execution result (see below)
keyNumber string number of the upgraded key
expirationDate dateTime.iso8601 key expiration date
updateDate dateTime.iso8601 key update date. If there is no update date for the license - will absent
productKey string Product activation code. If there is no product activation code for the license - will absent
susDate dateTime.iso8601 SUS date (optional. Display only for renewal and reinstatement upgrade plans)

Result Codes

resultCode resultDesc
100 <upgrade plan name>” has been successfully added to <key number>
110 <key number> already has <feature name> feature
200 Client authorization failed
201 Access to this method is denied
202 Access to this object is denied
220 Key <key number> is not found
221 License key <key number> is marked as problem
222 License key <key number> is terminated
246 Operation is forbidden because key type <key type name> conflicts with key <key number>
260 No “<upgrade plan name>” entry in the client’s price list
266 This upgrade is not acceptable
268 Software Update Service (SUS) is not found for the given license key. Automatic upgrade is not possible
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
410 Incorrect key number format: “<key number>
416 Unknown feature: <feature name>
421 Incorrect server license details format
452 Incorrect object type for this operation

XML Examples

Request message

<?xml version='1.0'?>
<methodCall>
  <methodName>partner10.upgradeKey</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>
        <string>PLSK.01304242.0000</string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>
              PLESK_95_FOR_WIN_FOR_XEN_TO_PLESK_10_AND_LATER_FOR_WIN_FOR_XEN</string>
            </value>
            <value>
              <string>100_DOMAINS_TO_UNLIMITED_DOMAINS</string>
            </value>
          </data>
        </array>
      </value>
    </param>
    <param>
      <value>
        <string>billing</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>expirationDate</name>
            <value>
              <dateTime.iso8601>
              20101212T00:00:00</dateTime.iso8601>
            </value>
          </member>
          <member>
            <name>resultDesc</name>
            <value>"Plesk 9.5 for Windows for Xen
            (Lease) to Plesk 10.x/11.x and Later for
            Windows for Xen (Lease)", "100 Domains w/1 yr SUS
            (Lease) to Unlimited Domains w/1 yr SUS (Lease)" has
            been successfully added to PLSK.01304242.0001</value>
          </member>
          <member>
            <name>keyNumber</name>
            <value>PLSK.01304242.0001</value>
          </member>
          <member>
            <name>updateDate</name>
            <value>
              <dateTime.iso8601>
              20101202T00:00:00</dateTime.iso8601>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>