curl --request POST \
--url https://console.advinservers.com/api/v1/client/servers/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"billing_cycle": "monthly"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/quote"
payload = {
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"billing_cycle": "monthly"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan_key: '032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4',
billing_cycle: 'monthly'
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/quote', 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://console.advinservers.com/api/v1/client/servers/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_key' => '032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4',
'billing_cycle' => 'monthly'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://console.advinservers.com/api/v1/client/servers/quote"
payload := strings.NewReader("{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/servers/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}"
response = http.request(request)
puts response.read_body{
"plan": {
"key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"id": "standard-4gb",
"name": "Standard 4 GB",
"vcpu_cores": 4,
"memory": 4000,
"disk": 80,
"bandwidth": 5000,
"hdd": false,
"primary_disk": 80,
"hdd_disk": 0,
"price": "12.00",
"deployment_time": "Instant",
"whmcs_id": "48"
},
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"group": {
"id": "2",
"name": "Standard VPS"
},
"location": {
"id": "2-3",
"display_name": "Kansas City, MO",
"name": "Kansas City, MO",
"flag_url": null,
"cid": 3,
"group_name": "Standard VPS"
},
"location_id": 3,
"product_group_id": 2,
"amount": "12.00",
"currency": "USD",
"billing_cycle": "monthly",
"billing_cycle_months": 1,
"payment_window_minutes": 30,
"quote_token": "eyJ2ZXJzaW9uIjoxLCJub25jZSI6IjNmYWRiNjgyM2ZmZTkyY2Q0ZDkwYzRkNjg4YTdjZWY5ZjBiYjBjZDE1YjVhM2VlMGE2MzMyZmU1YmQ4Njg1YWYiLCJvd25lcl9pZCI6MTg3Mywib3duZXJfZW1haWwiOiJnb3Jkb24uZnJlZW1hbkBibGFja21lc2EuZXhhbXBsZS5jb20iLCJleHBpcmVzX2F0IjoxNzg5NDA0NzI5LCJ3aG1jc19jb25maWd1cmF0aW9uX2ZpbmdlcnByaW50IjoiZTY3ZDIzZTc4MjBjNDlhOCJ9.f84ed5bfb2e3e24710926d5ccf5902fc93d0c9a0a45365dd784e1aa72d4083f0"
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Get a quote for a server order
Overview
Calculates a server price and returns a signed quote_token. Send plan_key from the catalogue. Optionally send billing_cycle to use a cycle other than the default.
The response includes the plan, product group, location, price, currency, billing cycle, cycle length in months and payment window. Use the token to place the order at the quoted price. Requesting a quote does not charge the account or reserve capacity.
Permissions
Requires the server.read (View servers) permission for the selected team. Resources outside that team return 404.
curl --request POST \
--url https://console.advinservers.com/api/v1/client/servers/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"billing_cycle": "monthly"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/quote"
payload = {
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"billing_cycle": "monthly"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
plan_key: '032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4',
billing_cycle: 'monthly'
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/quote', 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://console.advinservers.com/api/v1/client/servers/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_key' => '032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4',
'billing_cycle' => 'monthly'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://console.advinservers.com/api/v1/client/servers/quote"
payload := strings.NewReader("{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/servers/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_key\": \"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4\",\n \"billing_cycle\": \"monthly\"\n}"
response = http.request(request)
puts response.read_body{
"plan": {
"key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"id": "standard-4gb",
"name": "Standard 4 GB",
"vcpu_cores": 4,
"memory": 4000,
"disk": 80,
"bandwidth": 5000,
"hdd": false,
"primary_disk": 80,
"hdd_disk": 0,
"price": "12.00",
"deployment_time": "Instant",
"whmcs_id": "48"
},
"plan_key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"group": {
"id": "2",
"name": "Standard VPS"
},
"location": {
"id": "2-3",
"display_name": "Kansas City, MO",
"name": "Kansas City, MO",
"flag_url": null,
"cid": 3,
"group_name": "Standard VPS"
},
"location_id": 3,
"product_group_id": 2,
"amount": "12.00",
"currency": "USD",
"billing_cycle": "monthly",
"billing_cycle_months": 1,
"payment_window_minutes": 30,
"quote_token": "eyJ2ZXJzaW9uIjoxLCJub25jZSI6IjNmYWRiNjgyM2ZmZTkyY2Q0ZDkwYzRkNjg4YTdjZWY5ZjBiYjBjZDE1YjVhM2VlMGE2MzMyZmU1YmQ4Njg1YWYiLCJvd25lcl9pZCI6MTg3Mywib3duZXJfZW1haWwiOiJnb3Jkb24uZnJlZW1hbkBibGFja21lc2EuZXhhbXBsZS5jb20iLCJleHBpcmVzX2F0IjoxNzg5NDA0NzI5LCJ3aG1jc19jb25maWd1cmF0aW9uX2ZpbmdlcnByaW50IjoiZTY3ZDIzZTc4MjBjNDlhOCJ9.f84ed5bfb2e3e24710926d5ccf5902fc93d0c9a0a45365dd784e1aa72d4083f0"
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Body
Send a JSON object containing the fields below. Required fields are marked in the schema.
Response
The record, as a JSON object. There is no envelope.
The value of plan.
Show child attributes
Show child attributes
{
"key": "032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4",
"id": "standard-4gb",
"name": "Standard 4 GB",
"vcpu_cores": 4,
"memory": 4000,
"disk": 80,
"bandwidth": 5000,
"hdd": false,
"primary_disk": 80,
"hdd_disk": 0,
"price": "12.00",
"deployment_time": "Instant",
"whmcs_id": "48"
}
The value of plan_key.
"032f97c3b0f718ae9a2edfba83d5adf321025b5d9af1e90d397e79b8667bb3a4"
The value of group.
Show child attributes
Show child attributes
{ "id": "2", "name": "Standard VPS" }
The value of location.
Show child attributes
Show child attributes
{
"id": "2-3",
"display_name": "Kansas City, MO",
"name": "Kansas City, MO",
"flag_url": null,
"cid": 3,
"group_name": "Standard VPS"
}
The location id ID.
3
The product group id ID.
2
The amount in the currency shown by currency.
"12.00"
The three-letter currency code used for monetary amounts.
"USD"
How often the service renews and is billed.
"monthly"
The value of billing_cycle_months.
1
How many minutes the original payment window allowed.
30
The value of quote_token.
"eyJ2ZXJzaW9uIjoxLCJub25jZSI6IjNmYWRiNjgyM2ZmZTkyY2Q0ZDkwYzRkNjg4YTdjZWY5ZjBiYjBjZDE1YjVhM2VlMGE2MzMyZmU1YmQ4Njg1YWYiLCJvd25lcl9pZCI6MTg3Mywib3duZXJfZW1haWwiOiJnb3Jkb24uZnJlZW1hbkBibGFja21lc2EuZXhhbXBsZS5jb20iLCJleHBpcmVzX2F0IjoxNzg5NDA0NzI5LCJ3aG1jc19jb25maWd1cmF0aW9uX2ZpbmdlcnByaW50IjoiZTY3ZDIzZTc4MjBjNDlhOCJ9.f84ed5bfb2e3e24710926d5ccf5902fc93d0c9a0a45365dd784e1aa72d4083f0"