Adding Additional Services to Service Plan

The add-plan-item operation is used to add custom options of service plans (additional services) to service plans.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet adding a new additional service to a service plan includes the add-plan-item operation node:

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

 

The add-plan-item node is presented by type ServicePlanPlanItemInputType (domain_template.xsd). Its graphical representation is as follows:

ServicePLanPlanItemInput-add

  • The filter node is required. It serves to specify the criteria by which the necessary service plans will be selected from the database. Data type: DomainTemplateFilterType (domain_template.xsd). See the Available Filters section for details on this node.
  • The owner-id node is optional. It specifies the ID of the service plan owner. Data type: integer.
  • The owner-login node is optional. It specifies the login name of the service plan owner. Data type: string.
  • The plan-item node is required. It specifies what type of information about the additional service is requested.
  • The name node is required. It specifies the name of the additional service that will be added to the service plan. Data type: string.

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

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

 

Response Packet Structure

The add-plan-item node of the output XML packet is of complex type (domain_template.xsd)which has the following presentation:

ServicePLanPlanItemOutput-add

  • The result node is required. It wraps the response got from the server. Data type: DomainTemplatePlanItemResultType (domain_template.xsd).
  • The status node is required. Specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Returns the error code when the operation fails. Data type: unsignedInt.
  • The errtext node is optional. Returns the error message if the operation fails. Data type: string.
  • The id node is optional. Returns the identifier of the additional service in Plesk database. Data type: integer.
  • The name node is optional. Returns the name of the additional service added to the service plan. Data type: string.
  • The guid node is optional. Returns the GUID of the additional service added to the service plan. Data type: string.
  • The external-id node is optional. Returns the ID of the additional service which could be set by any external third-party integrator. Data type: string.
  • The item node is optional. Returns the the additional service added to the service plan. Data type: integer.

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

 

Samples

This packet adds an additional service Additional Service to the service plan with id 1234 owned by user with login name JDoe.

<packet>
<service-plan>
   <add-plan-item>
      <filter>
         <id>1234</id>
      </filter>
      <owner-login>JDoe</owner-login>
      <plan-item>
         <name>Additional Service</name>
      </plan-item>
   </add-plan-item>
</service-plan>
</packet>

Response:

<packet>
<service-plan>
   <add-plan-item>
      <result>
         <status>ok</status>
         <id>1234</id>
         <name>Additional Service</name>
         <guid>0ca04c13-55cc-2542-04b4-1f792a217a3e</guid>
         <external-id>456</external-id>
         <item>Additional Service</item>
      </result>
   </add-plan-item>
</service-plan>
</packet>

 

 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.