Subscription
Preview buying an extra number (On Demand)
Computes the cost of buying N extra number(s) without charging. Requires a TENANT-scoped key (403 for a number key). For Free-plan tenants it flags the On Demand conversion: the free number becomes paid/unlimited and the new one too (you pay per number/mo). On Demand = unlimited messages on every number.
Requires a tenant-scoped key.
GET
/
v1
/
subscription
/
extra-numbers
Preview buying an extra number (On Demand)
curl --request GET \
--url https://pilotstatus.com.br/v1/subscription/extra-numbers \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/subscription/extra-numbers"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/subscription/extra-numbers', 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://pilotstatus.com.br/v1/subscription/extra-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/subscription/extra-numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/subscription/extra-numbers")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/subscription/extra-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"plan": "FREE",
"requiresConversion": true,
"explanation": {
"pt": "Sua conta passa para o plano On Demand: mensagens ilimitadas e R$ 29,90/mês por número conectado. No On Demand todo número é pago — o número que você já usa deixa de ser gratuito. Com o novo, são 2 números a R$ 29,90: R$ 59,80/mês.",
"en": "Your account moves to the On Demand plan: unlimited messages and R$ 29.90/month per connected number. On On Demand every number is paid — the number you already use stops being free. With the new one, that is 2 numbers at R$ 29.90: R$ 59.80/month."
},
"currentNumbers": 1,
"requested": 1,
"billedQuantity": 2,
"currency": "BRL",
"unitPriceMonthly": 29.9,
"proratedUnitPrice": 14.95,
"proratedTotal": 29.9,
"remainingDays": 15,
"totalDaysInCycle": 30,
"walletBalance": 0,
"hasSavedCard": false,
"fundingSource": "none",
"canFund": false,
"unitPriceBRL": 29.9,
"monthlyTotalBRL": 59.8
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Number-scoped keys cannot call tenant endpoints",
"code": "NUMBER_SCOPE_NOT_ALLOWED"
}{
"error": "Too many requests"
}Was this page helpful?
⌘I
Preview buying an extra number (On Demand)
curl --request GET \
--url https://pilotstatus.com.br/v1/subscription/extra-numbers \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/subscription/extra-numbers"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/subscription/extra-numbers', 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://pilotstatus.com.br/v1/subscription/extra-numbers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/subscription/extra-numbers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pilotstatus.com.br/v1/subscription/extra-numbers")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/subscription/extra-numbers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"plan": "FREE",
"requiresConversion": true,
"explanation": {
"pt": "Sua conta passa para o plano On Demand: mensagens ilimitadas e R$ 29,90/mês por número conectado. No On Demand todo número é pago — o número que você já usa deixa de ser gratuito. Com o novo, são 2 números a R$ 29,90: R$ 59,80/mês.",
"en": "Your account moves to the On Demand plan: unlimited messages and R$ 29.90/month per connected number. On On Demand every number is paid — the number you already use stops being free. With the new one, that is 2 numbers at R$ 29.90: R$ 59.80/month."
},
"currentNumbers": 1,
"requested": 1,
"billedQuantity": 2,
"currency": "BRL",
"unitPriceMonthly": 29.9,
"proratedUnitPrice": 14.95,
"proratedTotal": 29.9,
"remainingDays": 15,
"totalDaysInCycle": 30,
"walletBalance": 0,
"hasSavedCard": false,
"fundingSource": "none",
"canFund": false,
"unitPriceBRL": 29.9,
"monthlyTotalBRL": 59.8
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Number-scoped keys cannot call tenant endpoints",
"code": "NUMBER_SCOPE_NOT_ALLOWED"
}{
"error": "Too many requests"
}