• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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