Adding an Additional Service

The add operation is used to register a custom option of service plans (additional service) in Panel database.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet registering a new additional service includes the add operation node:

<packet>
<plan-item>
   <add>
   ...
   </add>
</plan-item>
</packet>

 

The add node does not have a separate data type, it is nested within the complex type (plan_item.xsd). The add node has the following graphics representation:

planItemAddInput

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The add node of the output XML packet is structured as follows:

addOutput

 

Samples

Adding an additional service with attaching a custom button

This packet registers a new additional service in Plesk. The additional service is called New Service, its description is Additional service description, the additional service is available for adding to subscriptions, the URL attached to a custom button created for this additional service is http://domain.com, site ID and name, FTP user name and password is included into HTTP request when a customer clicks the custom button, the filename.png file is used as a background image for the custom button.

<packet>
<plan-item>
   <add>
      <visible>true</visible>
      <label>New Service</label>
      <tooltip>Additional service description.</tooltip>
      <url>http://domain.com</url>
      <internal>true</internal>
      <url-components>
         <dom-id>true</dom-id>
         <dom-name>true</dom-name>
         <ftp-user>true</ftp-user>
         <ftp-pass>true</ftp-pass>
         <cl-id>false</cl-id>
         <cname>false</cname>
         <pname>false</pname>
         <email>false</email>
      </url-components>
      <image-file>filename.png</image-file>
   </add>
</plan-item>
</packet>

Response:

<packet>
<plan-item>
   <add>
      <result>
         <status>ok</status>
         <name>plan-item</name>
      </result>
   </add>
</plan-item>
</packet>