curl --request POST \
--url https://order.edisglobal.com/kvm/v2/add/order \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data email=yourwhmc_email \
--data pw=yourwhmcs_password \
--data 'order={
"billingcycle": "monthly",
"paymentmethod": "paypal",
"item": [
{
"pid": 1814,
"os": 92,
"hostname": "kvmtest",
"additional_ram": 467,
"additional_vcpu": 467,
"additional_ip": 467,
"additional_diskboost": 615,
"ssh_pubkey": "ssh-rsa. ..."
},
{
"pid": 1814,
"os": 88,
"hostname": "kvmtest2",
"additional_ram": "",
"additional_vcpu": "",
"additional_ip": "",
"additional_driveboost": "",
"ssh_pubkey": "ssh-rsa. ..."
}
]
}
'import requests
url = "https://order.edisglobal.com/kvm/v2/add/order"
payload = {
"email": "yourwhmc_email",
"pw": "yourwhmcs_password",
"order": "{
\"billingcycle\": \"monthly\",
\"paymentmethod\": \"paypal\",
\"item\": [
{
\"pid\": 1814,
\"os\": 92,
\"hostname\": \"kvmtest\",
\"additional_ram\": 467,
\"additional_vcpu\": 467,
\"additional_ip\": 467,
\"additional_diskboost\": 615,
\"ssh_pubkey\": \"ssh-rsa. ...\"
},
{
\"pid\": 1814,
\"os\": 88,
\"hostname\": \"kvmtest2\",
\"additional_ram\": \"\",
\"additional_vcpu\": \"\",
\"additional_ip\": \"\",
\"additional_driveboost\": \"\",
\"ssh_pubkey\": \"ssh-rsa. ...\"
}
]
}
"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
email: 'yourwhmc_email',
pw: 'yourwhmcs_password',
order: '{\n "billingcycle": "monthly",\n "paymentmethod": "paypal",\n "item": [\n {\n "pid": 1814,\n "os": 92,\n "hostname": "kvmtest",\n "additional_ram": 467,\n "additional_vcpu": 467,\n "additional_ip": 467,\n "additional_diskboost": 615,\n "ssh_pubkey": "ssh-rsa. ..."\n },\n {\n "pid": 1814,\n "os": 88,\n "hostname": "kvmtest2",\n "additional_ram": "",\n "additional_vcpu": "",\n "additional_ip": "",\n "additional_driveboost": "",\n "ssh_pubkey": "ssh-rsa. ..."\n }\n ]\n}\n'
})
};
fetch('https://order.edisglobal.com/kvm/v2/add/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://order.edisglobal.com/kvm/v2/add/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://order.edisglobal.com/kvm/v2/add/order"
payload := strings.NewReader("email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://order.edisglobal.com/kvm/v2/add/order")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A")
.asString();require 'uri'
require 'net/http'
url = URI("https://order.edisglobal.com/kvm/v2/add/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A"
response = http.request(request)
puts response.read_body{
"status": "success",
"orderid": 123456,
"serviceids": "123456,123457",
"invoiceid": 654321,
"invoicepaid": true
}{
"status": "error",
"message": "Invalid parameters or incorrect JSON format.",
"errors": [
"billingcycle is required",
"invalid JSON structure"
]
}{
"status": "error",
"message": "Invalid WHMCS credentials provided.",
"suggestion": "Please verify your username and password and try again."
}{
"status": "error",
"message": "An unexpected error occurred while processing the order.",
"support": "Please contact support with the order details for assistance."
}Order VPS
Place a new VPS order by authenticating with your WHMCS credentials and specifying the order details in JSON format.
Live ordering — no test environment
EDIS Global does not provide a sandbox or test environment. Submitting a valid order to this endpoint creates a real VPS order and invoice. If account credit is applied and covers the invoice, provisioning can begin automatically.
Setting
"applycredit": falseprevents account credit from being used for that order. It does not prevent the order from being created or make the request a test.
JSON Parameters:
- billingcycle: Specifies the billing cycle, e.g., ‘monthly’ or ‘yearly’.
- paymentmethod: Specifies the payment method, e.g., ‘paypal’.
- applycredit: Optional JSON boolean inside the
orderJSON. Omit it or set it totrueto apply available account credit automatically. Set it explicitly tofalseto prevent account credit from being applied to this order, regardless of the selected payment method. - item: An array of product configurations:
- pid: Product ID.
- os: Operating System ID.
- hostname: Hostname for the VPS.
- additional_ram: Additional RAM requested (optional).
- additional_vcpu: Additional vCPU requested (optional).
- additional_ip: Additional IPs requested (optional).
- additional_diskboost: Additional disk boost requested (optional).
- ssh_pubkey: Public SSH key for access.
Account credit behavior
applycredit | Behavior |
|---|---|
| Omitted | Available account credit is applied automatically. |
true | Available account credit is applied. |
false | Account credit is not applied to this order. |
Response Behavior:
invoicepaid reports whether the invoice has been paid. Order creation and payment are separate outcomes.
- If
applycreditis omitted or set totrue, available account credit is applied automatically. If it covers the invoice, the response includes:{ "invoicepaid": true } - If the invoice has not been paid, the response includes:
The invoice may remain unpaid because account credit was explicitly disabled or because available credit did not cover it. The{ "invoicepaid": false }invoicepaidflag alone does not mean the order failed; checkstatusand the returned order and invoice IDs as well.
Example JSON (automatic credit by default):
This example omits applycredit. Available account credit will therefore be applied automatically.
{
"billingcycle": "monthly",
"paymentmethod": "paypal",
"item": [
{
"pid": 1814,
"os": 92,
"hostname": "kvmtest",
"additional_ram": 467,
"additional_vcpu": 467,
"additional_ip": 467,
"additional_diskboost": 615,
"ssh_pubkey": "ssh-rsa. ..."
},
{
"pid": 1814,
"os": 88,
"hostname": "kvmtest2",
"additional_ram": "",
"additional_vcpu": "",
"additional_ip": "",
"additional_driveboost": "",
"ssh_pubkey": "ssh-rsa. ..."
}
]
}
⚠️ Note:
If you receive a response like "status": "failed" along with an orderid, it may indicate that the VPS could not be provisioned due to the product being out of stock in the selected location.
Example Failed Response:
{
"status": "failed",
"orderid": 241158
}
curl --request POST \
--url https://order.edisglobal.com/kvm/v2/add/order \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data email=yourwhmc_email \
--data pw=yourwhmcs_password \
--data 'order={
"billingcycle": "monthly",
"paymentmethod": "paypal",
"item": [
{
"pid": 1814,
"os": 92,
"hostname": "kvmtest",
"additional_ram": 467,
"additional_vcpu": 467,
"additional_ip": 467,
"additional_diskboost": 615,
"ssh_pubkey": "ssh-rsa. ..."
},
{
"pid": 1814,
"os": 88,
"hostname": "kvmtest2",
"additional_ram": "",
"additional_vcpu": "",
"additional_ip": "",
"additional_driveboost": "",
"ssh_pubkey": "ssh-rsa. ..."
}
]
}
'import requests
url = "https://order.edisglobal.com/kvm/v2/add/order"
payload = {
"email": "yourwhmc_email",
"pw": "yourwhmcs_password",
"order": "{
\"billingcycle\": \"monthly\",
\"paymentmethod\": \"paypal\",
\"item\": [
{
\"pid\": 1814,
\"os\": 92,
\"hostname\": \"kvmtest\",
\"additional_ram\": 467,
\"additional_vcpu\": 467,
\"additional_ip\": 467,
\"additional_diskboost\": 615,
\"ssh_pubkey\": \"ssh-rsa. ...\"
},
{
\"pid\": 1814,
\"os\": 88,
\"hostname\": \"kvmtest2\",
\"additional_ram\": \"\",
\"additional_vcpu\": \"\",
\"additional_ip\": \"\",
\"additional_driveboost\": \"\",
\"ssh_pubkey\": \"ssh-rsa. ...\"
}
]
}
"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
email: 'yourwhmc_email',
pw: 'yourwhmcs_password',
order: '{\n "billingcycle": "monthly",\n "paymentmethod": "paypal",\n "item": [\n {\n "pid": 1814,\n "os": 92,\n "hostname": "kvmtest",\n "additional_ram": 467,\n "additional_vcpu": 467,\n "additional_ip": 467,\n "additional_diskboost": 615,\n "ssh_pubkey": "ssh-rsa. ..."\n },\n {\n "pid": 1814,\n "os": 88,\n "hostname": "kvmtest2",\n "additional_ram": "",\n "additional_vcpu": "",\n "additional_ip": "",\n "additional_driveboost": "",\n "ssh_pubkey": "ssh-rsa. ..."\n }\n ]\n}\n'
})
};
fetch('https://order.edisglobal.com/kvm/v2/add/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://order.edisglobal.com/kvm/v2/add/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://order.edisglobal.com/kvm/v2/add/order"
payload := strings.NewReader("email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://order.edisglobal.com/kvm/v2/add/order")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A")
.asString();require 'uri'
require 'net/http'
url = URI("https://order.edisglobal.com/kvm/v2/add/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "email=yourwhmc_email&pw=yourwhmcs_password&order=%7B%0A%20%20%22billingcycle%22%3A%20%22monthly%22%2C%0A%20%20%22paymentmethod%22%3A%20%22paypal%22%2C%0A%20%20%22item%22%3A%20%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2092%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20467%2C%0A%20%20%20%20%20%20%22additional_diskboost%22%3A%20615%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22pid%22%3A%201814%2C%0A%20%20%20%20%20%20%22os%22%3A%2088%2C%0A%20%20%20%20%20%20%22hostname%22%3A%20%22kvmtest2%22%2C%0A%20%20%20%20%20%20%22additional_ram%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_vcpu%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_ip%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22additional_driveboost%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%22ssh_pubkey%22%3A%20%22ssh-rsa.%20...%22%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D%0A"
response = http.request(request)
puts response.read_body{
"status": "success",
"orderid": 123456,
"serviceids": "123456,123457",
"invoiceid": 654321,
"invoicepaid": true
}{
"status": "error",
"message": "Invalid parameters or incorrect JSON format.",
"errors": [
"billingcycle is required",
"invalid JSON structure"
]
}{
"status": "error",
"message": "Invalid WHMCS credentials provided.",
"suggestion": "Please verify your username and password and try again."
}{
"status": "error",
"message": "An unexpected error occurred while processing the order.",
"support": "Please contact support with the order details for assistance."
}Body
Your WHMCS email address.
"yourwhmc_email"
Your WHMCS password.
"yourwhmcs_password"
JSON-encoded string that includes order details such as billing cycle, payment method, apply credit, and VPS item configurations. Each item specifies properties like product ID (pid), operating system (os), hostname, additional resources (RAM, vCPU, IP), and an optional SSH public key. The optional applycredit field belongs inside this JSON and accepts a JSON boolean: omit it or set it to true to apply available account credit automatically; explicitly set it to false to prevent credit from being applied to this order. This endpoint creates real orders; disabling account credit does not make the request a test.
"{\n \"billingcycle\": \"monthly\",\n \"paymentmethod\": \"paypal\",\n \"item\": [\n {\n \"pid\": 1814,\n \"os\": 92,\n \"hostname\": \"kvmtest\",\n \"additional_ram\": 467,\n \"additional_vcpu\": 467,\n \"additional_ip\": 467,\n \"additional_diskboost\": 615,\n \"ssh_pubkey\": \"ssh-rsa. ...\"\n },\n {\n \"pid\": 1814,\n \"os\": 88,\n \"hostname\": \"kvmtest2\",\n \"additional_ram\": \"\",\n \"additional_vcpu\": \"\",\n \"additional_ip\": \"\",\n \"additional_driveboost\": \"\",\n \"ssh_pubkey\": \"ssh-rsa. ...\"\n }\n ]\n}\n"
Response
Successfully added a new VPS order.
"success"
123456
"123456,123457"
654321
Indicates whether the invoice was paid successfully using available credit or another payment method. A value of false means the invoice remains unpaid; it does not by itself mean that order creation failed.
true
Was this page helpful?