curl --request POST \
--url https://console.advinservers.com/api/v1/client/floating-ips/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 3,
"type": "ipv4"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/floating-ips/quote"
payload = {
"location_id": 3,
"type": "ipv4"
}
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({location_id: 3, type: 'ipv4'})
};
fetch('https://console.advinservers.com/api/v1/client/floating-ips/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/floating-ips/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([
'location_id' => 3,
'type' => 'ipv4'
]),
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/floating-ips/quote"
payload := strings.NewReader("{\n \"location_id\": 3,\n \"type\": \"ipv4\"\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/floating-ips/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 3,\n \"type\": \"ipv4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/floating-ips/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 \"location_id\": 3,\n \"type\": \"ipv4\"\n}"
response = http.request(request)
puts response.read_body{
"type": "ipv4",
"location_id": 3,
"location": "Kansas City, MO",
"product_name": "Floating IPv4 Address",
"recurring_amount": "3.00",
"currency": "USD",
"billing_cycle": "monthly",
"quote_token": "eyJpdiI6InlCb3ZvTkV4NFJwQnpSMHVPNkpMXC9RPT0iLCJ2YWx1ZSI6InF6V2ZzTnIrd3hQcUJMNFZPSlF1MU9IZ0FnWXh1UVhXNm5zSlZBQjk3SHRYZVNVRFFXcGtrUnkxQjBOUXZpaXhPWGJNUzRhSEZxZ0g2dmhpZXkyWXQ5MFwvVVQrU0ViM1lnMTR1bnFPWkJCb0NWVUI1RFdcL1dORkRJSXloK2pyM3EiLCJtYWMiOiJhMTBjM2NmZDNlNWI4NTg3ODQ4ODk2YjFmODMxZGY2NTA5ZTIwMjViMzJhMjljODdlOTdjZDM2NDM2NzljOWQ4IiwidGFnIjoiIn0="
}{
"message": "The request could not be carried out."
}{
"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 floating IP
Overview
Returns a price and a signed quote_token valid for five minutes. Send location_id and type. Use the token when buying the address. This request does not reserve an address or charge the account.
Permissions
Requires the network.read (View networking) permission for the selected team. Resources outside that team return 404.
curl --request POST \
--url https://console.advinservers.com/api/v1/client/floating-ips/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location_id": 3,
"type": "ipv4"
}
'import requests
url = "https://console.advinservers.com/api/v1/client/floating-ips/quote"
payload = {
"location_id": 3,
"type": "ipv4"
}
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({location_id: 3, type: 'ipv4'})
};
fetch('https://console.advinservers.com/api/v1/client/floating-ips/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/floating-ips/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([
'location_id' => 3,
'type' => 'ipv4'
]),
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/floating-ips/quote"
payload := strings.NewReader("{\n \"location_id\": 3,\n \"type\": \"ipv4\"\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/floating-ips/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": 3,\n \"type\": \"ipv4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/floating-ips/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 \"location_id\": 3,\n \"type\": \"ipv4\"\n}"
response = http.request(request)
puts response.read_body{
"type": "ipv4",
"location_id": 3,
"location": "Kansas City, MO",
"product_name": "Floating IPv4 Address",
"recurring_amount": "3.00",
"currency": "USD",
"billing_cycle": "monthly",
"quote_token": "eyJpdiI6InlCb3ZvTkV4NFJwQnpSMHVPNkpMXC9RPT0iLCJ2YWx1ZSI6InF6V2ZzTnIrd3hQcUJMNFZPSlF1MU9IZ0FnWXh1UVhXNm5zSlZBQjk3SHRYZVNVRFFXcGtrUnkxQjBOUXZpaXhPWGJNUzRhSEZxZ0g2dmhpZXkyWXQ5MFwvVVQrU0ViM1lnMTR1bnFPWkJCb0NWVUI1RFdcL1dORkRJSXloK2pyM3EiLCJtYWMiOiJhMTBjM2NmZDNlNWI4NTg3ODQ4ODk2YjFmODMxZGY2NTA5ZTIwMjViMzJhMjljODdlOTdjZDM2NDM2NzljOWQ4IiwidGFnIjoiIn0="
}{
"message": "The request could not be carried out."
}{
"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.
What a floating address in one city would cost, signed so the same figure can be charged for the next five minutes and no longer.
The type of operation or resource.
ipv4, ipv6 "ipv4"
The location id ID.
3
The value of location.
"Kansas City, MO"
The value of product_name.
"Floating IPv4 Address"
The amount charged each billing cycle.
"3.00"
The three-letter currency code used for monetary amounts.
"USD"
How often the service renews and is billed.
"monthly"
The signed offer, handed back at checkout.
"eyJpdiI6InlCb3ZvTkV4NFJwQnpSMHVPNkpMXC9RPT0iLCJ2YWx1ZSI6InF6V2ZzTnIrd3hQcUJMNFZPSlF1MU9IZ0FnWXh1UVhXNm5zSlZBQjk3SHRYZVNVRFFXcGtrUnkxQjBOUXZpaXhPWGJNUzRhSEZxZ0g2dmhpZXkyWXQ5MFwvVVQrU0ViM1lnMTR1bnFPWkJCb0NWVUI1RFdcL1dORkRJSXloK2pyM3EiLCJtYWMiOiJhMTBjM2NmZDNlNWI4NTg3ODQ4ODk2YjFmODMxZGY2NTA5ZTIwMjViMzJhMjljODdlOTdjZDM2NDM2NzljOWQ4IiwidGFnIjoiIn0="