vserver_order ()
This function places new order of a VPS. The order will be placed under the account that is logged in using /api/login.
HTTP Method: | GET | |
---|---|---|
Parameters: | sid | session id* |
vserver_id | unique id of VPS* | |
plan_id | unique VPS plan identifier* | |
iso_id | id of ISO that should be attached to the VPS after start** | |
managed | creates VPS from a template (value of image_id)** | |
license_name[...] | requested license name (parameter is array, write index into brackets. To order one license, use value without brackets. | |
disk_size | disk size in GB, parameter of type integer. Must be between 10 and VPS plan disk size. | |
billing_period | billing period, possible setting: 'day', 'month', 'halfy' or 'year' | |
backup | count of daily backups: 0 - disable, 3 - default, 7 | |
Returns: | HTTP code | 200 (OK) |
The order has been accepted. Reply portion reply contains ordered service overview. |
Parameters marked with * are mandatory
One and only one of parameters marked with ** must be submited. These parameters are mutually exclusive.
One and only one of parameters marked with ** must be submited. These parameters are mutually exclusive.
If disk_size parameter is set the disk size will be fixed for this VPS. That means that consequent upgrade/downgrade function call without this parameter will not change disk size of the VPS.
Return errors
Error code | HTTP response code | Description |
---|---|---|
1 | 400 (Bad request) | Function was not performed, because all required parameters were not entered. Reply portion reply is empty. |
3 | 403 (Forbidden) | Function call failed, invalid sid parameter. Create new sid using /api/login function. Reply portion reply is empty. |
4 | 400 (Bad request) | Function call failed, some parameter(s) have invalid value (e.g. contains invalid characters. Reply portion reply specifies invalid parameters. |
CURL
curl "https://admin.hosting90.eu/api/vserver_order?sid=%sid%&plan_id=%plan_id%&iso_id=%iso_id%"
PHP Library
$api->vserver_order(array(
'plan_id' => %plan_id%,
'iso_id' => %iso_id%,
));
Example of data output
<?xml version="1.0" encoding="UTF-8"?>
<reply>
<status>
<code>0</code>
<text>Order sent</text>
</status>
<overview>
<plan_id>572</plan_id>
<order_id>202634</order_id>
<vserver_id>100148</vserver_id>
<iso_id>635</iso_id>
</overview>
</reply>