Obter taxas de faturamento
curl --request GET \
--url https://api.truthlocks.com/v1/billing/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/rates"
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))
}{
"rates": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Faturamento
Obter taxas
Retorna as taxas efetivas por uso para o locatário autenticado, incluindo ajustes de preços regionais.
GET
/
v1
/
billing
/
rates
Obter taxas de faturamento
curl --request GET \
--url https://api.truthlocks.com/v1/billing/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/rates"
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))
}{
"rates": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/rates
Resposta
Itens da tabela de preços com preços por uso.
true se o cartão de tarifa padrão estiver em uso, false se um cartão personalizado foi atribuído.Para preços públicos sem autenticação, use
GET /v1/billing/public/rates. Para estimar uma fatura mensal, use o endpoint fatura projetada.
