The convert-to-reseller operation is used to upgrade customer accounts to reseller accounts.

Request Packet Structure

A request XML packet upgrading customer accounts to reseller accounts includes the convert-to-reseller node:

<packet>
    <customer>
        <convert-to-reseller>
            ...
        </convert-to-reseller>
    </customer>
</packet>

The convert-to-reseller node does not have a separate type, it is nested within the ClientTypeRequest complex type (client_input.xsd). Its graphical representation is as follows:

image 73480

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

  • The filter node is required. It specifies the filtering rule. Data type: clientSelectionFilterType. For more information on filters, refer to the Available Filters section.
  • The reseller-plan-name node is optional. If it is not specified, then the user is converted, but is not subscribed to a reseller plan. Instead, it is allocated the sum of resources and permissions that were available to the customer.

Response Packet Structure

The convert-to-reseller node of the output XML packet is structured as follows:

image 60571

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

  • The result node is required. It wraps the response retrieved from the server. Data type: ResultFilterType (plesk_common.xsd).
  • The status node is required. It specifies the execution status of the operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It is used to return the error code when the operation fails. Data type: unsignedInt.
  • The errtext node is optional. Can be used to return the error message if the operation fails. Data type: string.
  • The filter-id node is optional. Returns the filtering parameter. Data type: anySimple.
  • The id node is optional. It is required if the operation succeeds. Returns the unique identifier of the reseller account. Data type: integer.

Samples

A request packet converting a customer account into a reseller account looks as follows:

<packet>
    <customer>
        <convert-to-reseller>
            <filter>
                <login>JDoe</login>
            </filter>
        </convert-to-reseller>
    </customer>
</packet>

Response:

<packet>
    <customer>
        <convert-to-reseller>
            <result>
                <status>ok</status>
                <filter-id>JDoe</filter-id>
                <id>192</id>
            </result>
        </convert-to-reseller>
    </customer>
</packet>