• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Adding subscription to customer

P

PeterPP

Guest
API RPC adding subscription to customer.

Dear parallels community,

Does anyone know how to assign a subscription for the customer ?
Which particular operation could allow me to do this action ?

Thank you,
Waiting for your replies,
PP
 
Last edited by a moderator:
Just click "Add New Subscription" button on customer's page.
 
API RPC adding subscription to customer.

Dear IgorG, thank you for your quick answer, but I am afraid this doesn't really answer my question, I have explained my question in more detail below:

If I would use the interface it would be that easy, the problem is that I am using the API RPC using the PHP client. I have found how to create a customer using the RPC calls, how to delete and edit that user, but I cannot find a way how to add a subscription to the client via the API RPC calls. If you could give me some sample or just a hint it would be very beneficial!

Thank you,
Waiting for your replies,
PP
 
Last edited by a moderator:
Did you read API-RPC documentation?
http://download1.parallels.net/Plesk/PP10/10.2.0/Doc/en-US/online/plesk-api-rpc/33895.htm

The following packet creates a subscription for customer with ID 1234:

<packet version="1.6.3.0">

<webspace>

<add>

<gen_setup>

<name>example.com</name>

<owner-id>1234</owner-id>

<htype>vrt_hst</htype>

<ip_address>192.0.2.123</ip_address>

<status>0</status>

</gen_setup>

<hosting>

<vrt_hst>

<property>

<name>ftp_login</name>

<value>ftp16se4fdf0</value>

</property>

<property>

<name>ftp_password</name>

<value>qweqwe</value>

</property>

<ip_address>192.0.2.54</ip_address>

</vrt_hst>

</hosting>

</add>

</webspace>

</packet>
 
This answer doesn't really clarify our question:

More specifically, we would like to assign different Service plans to different customers via the API. Can we do it using the API ?

Waiting for your reply,
PP
 
Try this:


<packet version="1.6.3.0">
<webspace>
<add>
<gen_setup>
<name>example.com</name>
<htype>vrt_hst</htype>
<ip_address>192.0.2.123</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ssl</name>
<value>false</value>
</property>
<ip_address>192.0.2.123</ip_address>
</vrt_hst>
</hosting>
<plan-name>base_template</plan-name>
</add>
</webspace>
</packet>
 
Back
Top