Creating Reseller Plan

The add operation is used to create reseller plans.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet creating a reseller plan includes the add operation node:

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

 

The add node is presented by the ResellerTemplateAddInputType complex type (reseller_template.xsd). Its graphical representation is as follows:

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 response packet is structured as follows:

 

 

Samples

The following packet creates a reseller plan called sample_plan and defines that resellers created with the plan should automatically have in their IP pools two exclusive IP addresses:

<packet version="1.6.3.0">
<reseller-plan>
<add>
   <name>sample_plan</name>
   <ip-pool>
      <allocate-ip>2</allocate-ip>
   </ip-pool>
</add>
</reseller-plan>
</packet>

Response:

<packet version="1.6.3.0">
  <reseller-plan>
    <add>
      <result>
        <status>ok</status>
        <id>20</id>
        <guid>5dc5a4d7-7449-127f-f694-a0233af4e09f</guid>
      </result>
    </add>
  </reseller-plan>
</packet>

To create two reseller plans within a single packet, include two add operation nodes:

<packet version="1.6.3.0">
<reseller-plan>
<add>
   <name>sample_plan</name>
   <ip-pool>
      <allocate-ip>2</allocate-ip>
   </ip-pool>
</add>
<add>
   <name>base_plan</name>
   <ip-pool>
      <ip-address>192.0.2.121</ip-address>
      <ip-address>192.0.2.122</ip-address>
   </ip-pool>
</add>
</reseller-plan>
</packet>