curl --request POST \
--url https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"resize_disk": true
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/quote"
payload = {
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"resize_disk": True
}
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: '84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc',
resize_disk: true
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/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/{server}/upgrades/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' => '84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc',
'resize_disk' => true
]),
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/{server}/upgrades/quote"
payload := strings.NewReader("{\n \"plan_key\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\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/{server}/upgrades/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_key\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/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\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\n}"
response = http.request(request)
puts response.read_body{
"amount": "6.00",
"refund_amount": "0.00",
"location_change_fee": "0.00",
"currency": "USD",
"days_remaining": 18,
"total_days": 30,
"billing_cycle": "Monthly",
"current_recurring_amount": "12.00",
"target_recurring_amount": "22.00",
"quote_token": "eyJpdiI6InZVUENaRU81VXMyL1psak9tNS8xTGc9PSIsInZhbHVlIjoib2JiS0ZkbXVmREY0OXBHeXorZEx5Wi81Z3F1UzF0L3RENFBnNTFIZHJ6YUl3RGZYclUrbWoydFpOYkkyT1Q2SklmbVlYdGU4WEVHaWlPRHBQbExSUnp4VkdZbk1ZY0JRZ0U4d0NNbDB1eFVSbVFIZ0xkdkxLdDZzZTZodkFZdEFqV3dBTk1HaTVPNWRpTmpJdjlQSEVNNjZjYWV1UnhGUW1pTEovY2VSQUdPMEg3MDRldWxEN2tBc0Rzd1VEK2pNa01uNEx1bXlLSExZUldobUw0ODVWbWlNZjlKRWIvTFJlaThQd1A0S2kwY3dFejgrZ2NmczZlWGdLVENRL1VoelBJczJ0LzgxMTBXZnlOaFRHSEplRk0zWTQ5cXZHRXhlUGFyV292ZGRHN0FpaWtVVzZhUnFBOGRLcm40TUx3TFIiLCJtYWMiOiJhNmViM2NiYTY0OWI5ZTUxMDkzNGQxYjBkMjRmMWIzZTg2NWE4MWMzYjk2YjIxZDc1NTAyMThjMTliYWQzZGM2IiwidGFnIjoiIn0=",
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"plan_name": "Standard 8 GB",
"source_location_id": 3,
"target_location_id": 3,
"source_location": "Kansas City, MO",
"target_location": "Kansas City, MO",
"requires_migration": false,
"requires_ip_replacement": false,
"resize_disk": true
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Get a quote for a plan change
Overview
Calculates the price of a plan change. Send plan_key from the catalogue and resize_disk.
The response includes the price, any location change fee, currency, remaining and total days in the current billing period, destination, migration requirements, IP replacement requirements and a signed quote_token. Use this token to purchase the change at the quoted price. A quote does not charge the account or reserve capacity. If the plan has no available capacity, the response explains why a quote cannot be provided. A plan the catalogue listed as available in the last ten minutes is quoted even if that capacity has since been taken, and purchasing with the resulting quote_token honors it the same way.
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/{server}/upgrades/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"resize_disk": true
}
'import requests
url = "https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/quote"
payload = {
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"resize_disk": True
}
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: '84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc',
resize_disk: true
})
};
fetch('https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/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/{server}/upgrades/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' => '84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc',
'resize_disk' => true
]),
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/{server}/upgrades/quote"
payload := strings.NewReader("{\n \"plan_key\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\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/{server}/upgrades/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_key\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/servers/{server}/upgrades/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\": \"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc\",\n \"resize_disk\": true\n}"
response = http.request(request)
puts response.read_body{
"amount": "6.00",
"refund_amount": "0.00",
"location_change_fee": "0.00",
"currency": "USD",
"days_remaining": 18,
"total_days": 30,
"billing_cycle": "Monthly",
"current_recurring_amount": "12.00",
"target_recurring_amount": "22.00",
"quote_token": "eyJpdiI6InZVUENaRU81VXMyL1psak9tNS8xTGc9PSIsInZhbHVlIjoib2JiS0ZkbXVmREY0OXBHeXorZEx5Wi81Z3F1UzF0L3RENFBnNTFIZHJ6YUl3RGZYclUrbWoydFpOYkkyT1Q2SklmbVlYdGU4WEVHaWlPRHBQbExSUnp4VkdZbk1ZY0JRZ0U4d0NNbDB1eFVSbVFIZ0xkdkxLdDZzZTZodkFZdEFqV3dBTk1HaTVPNWRpTmpJdjlQSEVNNjZjYWV1UnhGUW1pTEovY2VSQUdPMEg3MDRldWxEN2tBc0Rzd1VEK2pNa01uNEx1bXlLSExZUldobUw0ODVWbWlNZjlKRWIvTFJlaThQd1A0S2kwY3dFejgrZ2NmczZlWGdLVENRL1VoelBJczJ0LzgxMTBXZnlOaFRHSEplRk0zWTQ5cXZHRXhlUGFyV292ZGRHN0FpaWtVVzZhUnFBOGRLcm40TUx3TFIiLCJtYWMiOiJhNmViM2NiYTY0OWI5ZTUxMDkzNGQxYjBkMjRmMWIzZTg2NWE4MWMzYjk2YjIxZDc1NTAyMThjMTliYWQzZGM2IiwidGFnIjoiIn0=",
"plan_key": "84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc",
"plan_name": "Standard 8 GB",
"source_location_id": 3,
"target_location_id": 3,
"source_location": "Kansas City, MO",
"target_location": "Kansas City, MO",
"requires_migration": false,
"requires_ip_replacement": false,
"resize_disk": true
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"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.
Path Parameters
The server UUID
"ecc6f4f1"
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 amount in the currency shown by currency.
"6.00"
The value of refund_amount.
"0.00"
The value of location_change_fee.
"0.00"
The three-letter currency code used for monetary amounts.
"USD"
The value of days_remaining.
18
The value of total_days.
30
How often the service renews and is billed.
"Monthly"
The value of current_recurring_amount.
"12.00"
The value of target_recurring_amount.
"22.00"
The value of quote_token.
"eyJpdiI6InZVUENaRU81VXMyL1psak9tNS8xTGc9PSIsInZhbHVlIjoib2JiS0ZkbXVmREY0OXBHeXorZEx5Wi81Z3F1UzF0L3RENFBnNTFIZHJ6YUl3RGZYclUrbWoydFpOYkkyT1Q2SklmbVlYdGU4WEVHaWlPRHBQbExSUnp4VkdZbk1ZY0JRZ0U4d0NNbDB1eFVSbVFIZ0xkdkxLdDZzZTZodkFZdEFqV3dBTk1HaTVPNWRpTmpJdjlQSEVNNjZjYWV1UnhGUW1pTEovY2VSQUdPMEg3MDRldWxEN2tBc0Rzd1VEK2pNa01uNEx1bXlLSExZUldobUw0ODVWbWlNZjlKRWIvTFJlaThQd1A0S2kwY3dFejgrZ2NmczZlWGdLVENRL1VoelBJczJ0LzgxMTBXZnlOaFRHSEplRk0zWTQ5cXZHRXhlUGFyV292ZGRHN0FpaWtVVzZhUnFBOGRLcm40TUx3TFIiLCJtYWMiOiJhNmViM2NiYTY0OWI5ZTUxMDkzNGQxYjBkMjRmMWIzZTg2NWE4MWMzYjk2YjIxZDc1NTAyMThjMTliYWQzZGM2IiwidGFnIjoiIn0="
The value of plan_key.
"84ee2bf7fc22f495e76aead064154e1d5ae66fee1ac71cda7cf48d9e607a60bc"
The value of plan_name.
"Standard 8 GB"
The source location id ID.
3
The target location id ID.
3
The value of source_location.
"Kansas City, MO"
The value of target_location.
"Kansas City, MO"
Whether this action requires migration.
false
Whether this action requires ip replacement.
false
The value of resize_disk.
true