Consulta o consumo do período para reconciliação de billing
curl --request GET \
--url https://api.googa.com.br/v1/billing-usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.googa.com.br/v1/billing-usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.googa.com.br/v1/billing-usage', 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://api.googa.com.br/v1/billing-usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.googa.com.br/v1/billing-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.googa.com.br/v1/billing-usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.googa.com.br/v1/billing-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"product": "<string>",
"period": "2026-07",
"active_count": 123,
"note": "<string>"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}Billing
Consulta o consumo do período para reconciliação de billing
Contagem de exemplares ativos do parceiro no produto, base para a Nota de Débito mensal.
Simplificação conhecida (v1): ainda não há histórico por período — a contagem reflete o estado atual de entitlements ativos, independente do period pedido (o campo note da resposta repete esse aviso). Uso real de billing por período exige uma tabela de snapshot/evento, planejada para quando houver parceiro reconciliando Nota de Débito mensal em produção.
GET
/
billing-usage
Consulta o consumo do período para reconciliação de billing
curl --request GET \
--url https://api.googa.com.br/v1/billing-usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.googa.com.br/v1/billing-usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.googa.com.br/v1/billing-usage', 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://api.googa.com.br/v1/billing-usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.googa.com.br/v1/billing-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.googa.com.br/v1/billing-usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.googa.com.br/v1/billing-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"product": "<string>",
"period": "2026-07",
"active_count": 123,
"note": "<string>"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}{
"error": "invalid_request",
"error_description": "Missing subscriber_id, product, or status"
}Authorizations
Client credentials — para Entitlements (escrita), Subscriber Status e Billing (leitura). Cada endpoint exige o escopo correspondente; um token sem o escopo recebe 403.
Query Parameters
Available options:
novelai, novelaudio, historinhai Período no formato YYYY-MM.
Example:
"2026-07"