Purpose

Creates a Key with specified parameters.

Note: This version of the method call does not define a key/feature billing type. Thus, a key/feature of the client default billing type (defined with Partner API constant) will be created.

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 that will be applied to the new key

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 in 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 omitted
productKey string Product activation code. If there is no product activation code for the license, this parameter will be omitted.
additionalKeysNumbers array(string) numbers for additional keys in the 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. The 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 price list
261 Key type “<name of key type>” not found in client’s price list
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>API_LOGIN</string>
                  </value>
               </member>
               <member>
                  <name>password</name>
                  <value>
                     <string>API_PASSWORD</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>A5:97:F2:FE:44:E7</string>
                           </value>
                        </data>
                     </array>
                  </value>
               </member>
            </struct>
         </value>
      </param>
      <param>
         <value>
            <string>CLIENT_ID</string>
         </value>
      </param>
      <param>
         <value>
            <string>PLESK_8</string>
         </value>
      </param>
      <param>
         <value>
            <array>
               <data>
                  <value>
                     <string>100_DOMAINS</string>
                  </value>
               </data>
            </array>
         </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>
                        </data>
                     </array>
                  </value>
               </member>
               <member>
                  <name>susDate</name>
                  <value>
                     <dateTime.iso8601>20081212T00:00:00</dateTime.iso8601>
                  </value>
               </member>
            </struct>
         </value>
      </param>
   </params>
</methodResponse>