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

Request Packet Structure

A request XML packet removing a new additional service from a service plan includes the remove-plan-item operation node:

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

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

image 66834.gif

  • 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 removed from the service plan. Data type: string.

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 remove-plan-item node of the output XML packet is of complex type (domain_template.xsd) which has the following presentation:

image 66838.gif

  • 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 removed from 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 removes an additional service Additional Service from the service plan with id 1234 owned by user with login name JDoe.

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

Response:

<packet>
<service-plan>
   <remove-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>
   </remove-plan-item>
</service-plan>
</packet>