Adding an Additional Service to a Subscription
The add-plan-item operation is used to add custom options of service plans (additional services) to subscriptions.
Request Packet Structure
A request XML packet adding a new additional service to a subscription includes the add-plan-item operation node:
<packet version="1.6.3.1">
<webspace>
<add-plan-item>
...
</add-plan-item>
</webspace>
</packet>
The add-plan-item node is presented by type
WebspacePlanItemInputType (webspace.xsd
). Its graphical
representation is as follows:
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.
- The filter node is required. It specifies the subscription to
be updated with the specified information. Data type:
DomainFilterType (
domain_input.xsd
). To see the structure of this node, proceed to topic Available Filters. - 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 subscription. Data type: string.
Response Packet Structure
The remove-package node of the response packet is structured as follows:
- The result node is required. It wraps the response got from the
server. Data type: WebspacePlanItemResultType (
common.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 filter-id node is optional. Returns the parameter by which the subscription was filtered by in the request packet. Data type: anySimple.
- The id node is optional. Returns the identifier of the service
plan to which the additional service was added. Data type: id_type
(
common.xsd
). - The item node is optional. Returns the name of the additional
service added to the subscription Data type: id_type
(
common.xsd
).
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
A packet that adds an additional service Additional Service to the subscription with ID 1234 looks as follows:
<packet>
<webspace>
<add-plan-item>
<filter>
<id>1234</id>
</filter>
<plan-item>
<name>Additional Service</name>
</plan-item>
</add-plan-item>
</webspace>
</packet>
Response:
<packet>
<webspace>
<add-plan-item>
<result>
<status>ok</status>
<filter-id>1234</filter-id>
<id>1234</id>
<item>Additional Service</item>
</result>
</add-plan-item>
</webspace>
</packet>