• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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