• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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