Use the sync-subscription operation to roll reseller account settings back to values specified in an associated reseller plan. This operation is actual only for reseller accounts that were customized from their reseller plan.

Request Packet Structure

A request XML packet that syncs a subscription with a reseller plan includes the sync-subscription operation node:

<packet version="1.6.3.0">
<reseller>
   <sync-subscription>
   ...
   </sync-subscription>
</reseller>
</packet>

The sync-subscription node has the following graphical representation:

image 66525.gif

  • filter, required.

    It specifies the filtering rule. Data type: ResellerSelectionFilter (reseller.xsd) . For more information on filters, refer to the Available Filters section.

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 sync-subscription node of the output XML packet is structured as follows:

image 66404

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.

  • 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. It is required if the operation succeeds. Returns a filtering rule. For info on filters, refer to the Available Filters section. Data type: anySimple.
  • The id node is optional. It is required if the operation succeeds. Returns a reseller account ID. Data type: integer.
  • The problems node is optional. It outputs conflicts that occur on performing the operation. Data type: string.

Samples

To sync a subscription with a reseller account, specify its ID or login name:

<packet version="1.6.3.0">
<reseller>
<sync-subscription>
      <filter>
          <id>9</id>
      </filter>
<sync-subscription>
</reseller>
</packet>

The response packet that syncs a reseller account (ID 9) looks as follows:

<packet version="1.6.3.0">
  <webspace>
    <sync-subscription>
      <result>
        <status>ok</status>
        <filter-id>9</filter-id>
        <id>9</id>
      </result>
    </sync-subscription>
  </webspace>
</packet>

To sync multiple reseller accounts, add either reseller IDs or login names to the filtering rule:

<packet version="1.6.3.0">
<reseller>
<sync-subscription>
      <filter>
          <id>1324</id>
          <id>1325</id>
      </filter>
</sync-subscription>
</reseller>
</packet>