Converting Resellers into Customers
The convert-to-customer operation is used to convert a reseller into a customer.
Resellers without subscriptions are converted to customers without subscriptions. Only contact information and login credentials are preserved; all resource allotments are reset.
Each subscription of the newly converted customer account is either subscribed to a specified service plan, or becomes a custom subscription inheriting all settings of a reseller subscription, except in cases when a subscription had unlimited resources but they were limited for the reseller account. In such cases, each subscription is allocated the amount of resources that remain unused by the reseller account.
A request XML packet that switches a reseller account to a different reseller plan includes the convert-to-customer operation node:
<packet> <reseller> <convert-to-customer> ... </convert-to-customer> </reseller> </packet>
The convert-to-customer node has the following graphical representation:
- The filter node is required. It specifies a filtering rule.
Data type: ResellerSelectionFilter (
reseller.xsd) . For more information on filters, refer to the Available Filters section.
- The plan-name node is optional. It specifies the plan name. Data type: string.
A request packet that converts a reseller account with ID 5 into a customer looks as follows:
<packet> <reseller> <convert-to-customer> <filter> <login>reseller1</login> </filter> <plan-name>Default Domain</plan-name> </convert-to-customer> </reseller> </packet>
The convert-to-customer node of the output XML packet is structured as follows:
- The result node is required. It wraps the response retrieved
from the server. Data type: ResultFilterType
- 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. It is required if the operation succeeds. Returns a filtering rule. For information about filters, refer to the Available Filters section. Data type: anySimple.
- The id node is optional. It is required if the operation succeeds. Returns the unique identifier of a reseller account. Data type: integer.
A positive response can look as follows:
<packet version="126.96.36.199"> <reseller> <convert-to-customer> <result> <status>ok</status> <filter-id>reseller1</filter-id> <id>5</id> </result> </convert-to-customer> </reseller> </packet>