Use the add operation to create plans. When creating a plan, it is enough to specify a plan name. If you are authorized as the Administrator but want to add a plan to a reseller's plan list, specify the reseller ID or username. Additionally, you can specify add-on plan settings.
A request XML packet adding a new add-on plan includes the add operation node:
<packet>
<service-plan-addon>
<add>
...
</add>
</service-plan-addon>
</packet>
The add node is presented by type DomainAddonTemplateAddInputType (domain_addon_template.xsd
). Its graphical representation is as follows:
domain_addon_template.xsd
). See the structure of this node in the Limits section.domain_addon_template.xsd
). See the structure of this node in the Hosting Settings section. plesk_domain.xsd
). See the structure of this node in the Performance Settings section.plesk_domain.xsd
). See the structure of this node in the Permissions section. domain_addon_template.xsd
). See the section PHP Settings for details.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
The add node of the output XML packet is of type DomainAddonTemplateAddOutputType (domain_addon_template.xsd
) which has the following presentation:
common.xsd
). To create a plan that enables the SSL support on behalf of the reseller with ID 1, issue the following packet.
<packet>
<service-plan-addon>
<add>
<name>base_plan</name>
<owner-id>1</owner-id>
<hosting>
<property>
<name>ssl</name>
<value>true</value>
</property>
</hosting>
</add>
</service-plan-addon>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<service-plan-addon>
<add>
<result>
<status>ok</status>
<id>11</id>
<guid>befbe7ca-1c78-cfbb-2eaf-debf4cce4896</guid>
</result>
</add>
</service-plan-addon>
</packet>
When creating an add-on plan for the Administrator, omit the reseller identifiers:
<packet>
<service-plan-addon>
<add>
<name>base_plan</name>
<hosting>
<property>
<name>ssl</name>
<value>true</value>
</property>
</hosting>
</add>
</service-plan-addon>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<service-plan-addon>
<add>
<result>
<status>ok</status>
<id>12</id>
<guid>31afe559-7999-ce3d-1e87-71dc6d83ea41</guid>
</result>
</add>
</service-plan-addon>
</packet>
To create two add-on plans with a single packet, include two different add blocks:
<packet>
<service-plan-addon>
<add>
<name>first_plan</name>
<hosting>
<property>
<name>ssl</name>
<value>true</value>
</property>
</hosting>
</add>
<add>
<name>second_plan</name>
<hosting>
<property>
<name>ssl</name>
<value>true</value>
</property>
</hosting>
</add>
</service-plan-addon>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<service-plan-addon>
<add>
<result>
<status>ok</status>
<id>13</id>
<guid>a2c68e48-982a-1807-c2fb-3708bca41836</guid>
</result>
</add>
<add>
<result>
<status>ok</status>
<id>14</id>
<guid>ccede5cd-3ca3-1db9-f46d-aca67beea2b5</guid>
</result>
</add>
</service-plan-addon>
</packet>
Here is the sample packet that creates an add-on plan with specific physical hosting settings.
<packet>
<service-plan-addon>
<add>
<name>base_plan</name>
<hosting>
<property>
<name>ssl</name>
<value>true</value>
</property>
</hosting>
</add>
</service-plan-addon>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<service-plan-addon>
<add>
<result>
<status>ok</status>
<id>15</id>
<guid>40c9f531-12c6-d5a2-d70b-4779dc64ee9b</guid>
</result>
</add>
</service-plan-addon>
</packet>
Here is the sample packet that creates an add-on plan with specific performance settings.
<packet>
<service-plan-addon>
<add>
<name>base_plan6</name>
<performance>
<bandwidth>1000</bandwidth>
<max_connections>20</max_connections>
</performance>
</add>
</service-plan-addon>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
<service-plan-addon>
<add>
<result>
<status>ok</status>
<id>17</id>
<guid>05c8c722-f58f-bf0d-7a13-d533f20143cb</guid>
</result>
</add>
</service-plan-addon>
</packet>