Métricas custom por CUIT
curl --request GET \
--url http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics', 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 => "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics",
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 := "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics"
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("http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyReferencia API
Métricas custom por CUIT
Métricas incrementales CBU y CVU para un CUIT Argentina con lookback calendario 1–180 (o preset window) — cobro por request cuando tiene precio.
GET
/
integration-services
/
ar_gueno_holder_intelligence_service
/
cuits
/
:cuit
/
metrics
Métricas custom por CUIT
curl --request GET \
--url http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics', 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 => "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics",
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 := "http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics"
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("http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/integration-services/ar_gueno_holder_intelligence_service/cuits/:cuit/metrics")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOverview
Devuelve métricas densificadas de un lookback calendario: deltas, % cambio, aceleración (si hay historial suficiente) y completeness. Un request cobrable por llamada exitosa cuando tiene precio. Indicálookback (entero 1–180) o un preset window (w_1d … w_180d). Si enviás ambos, gana lookback.
Ventana
ventana = [date − (lookback − 1) … date] // días calendario inclusive
lookback=4&date=2026-07-14 → 2026-07-11 … 2026-07-14. El date está incluido.
Días quietos pueden no persistirse upstream; en HTTP 200 la serie ya viene densa (forward-fill: totales previos + delta diario 0). Serie plana con delta 0 = sin movimiento, no “sin dato”. Evaluá umbrales solo si complete === true.
Endpoint
GET https://api.gu1.ai/api/integration-services/ar_gueno_holder_intelligence_service/cuits/{cuit}/metrics
Query
Al menos uno delookback o window es obligatorio.
integer
Días calendario (1–180). Opcional si hay
window.string
Preset de lookback → días:
window | Días |
|---|---|
w_1d | 1 |
w_3d | 3 |
w_7d | 7 |
w_14d | 14 |
w_21d | 21 |
w_30d | 30 |
w_90d | 90 |
w_180d | 180 |
string
Opcional. Fin inclusive de ventana (
YYYY-MM-DD). Default: último snapshot.Éxito (HTTP 200)
Aliases de stock:cbuCount,cvuCount,totalAccounts— último día densificado (windowEnd/referenceDate)cbuCountAtStart,cvuCountAtStart— primer día densificado (windowStart)
data.metrics incluye deltas por canal y totales (totalDelta = CBU+CVU, totalPctChange sobre stock total al inicio — null si start total = 0), aceleración solo si accelerationAvailable, varianzas y totales start/end (totalAccountsStart / totalAccountsEnd). daily[] (si viene) tiene exactamente lookbackDays filas densas.
Cómo leer: no trates null en % ni HTTP 422 como “cambio 0”. Gateá con data.complete === true.
Ventana incompleta (HTTP 422)
No se pudo densificar al menos un día (falta piso, día nocomplete en el corpus, o sin estado incremental). No aplicar umbrales — es “dato no listo”, no score 0.
error.code | Significado |
|---|---|
INCOMPLETE_WINDOW | Al menos un día no densificable (missingDates opcional) |
NO_INCREMENTAL_STATE | Sin historial incremental / daily vacío |
Otros errores
| HTTP | error.code |
|---|---|
| 400 | LOOKBACK_REQUIRED, INVALID_LOOKBACK, INVALID_WINDOW, INVALID_DATE |
| 404 | CUIT_NOT_FOUND |
| 402 | INSUFFICIENT_BALANCE |
| 503 | SERVICE_UNAVAILABLE |
Ejemplo
curl -s \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://api.gu1.ai/api/integration-services/ar_gueno_holder_intelligence_service/cuits/20384648798/metrics?window=w_7d"
{
"success": true,
"data": {
"integrationCode": "ar_gueno_holder_intelligence_service",
"cuit": "20384648798",
"complete": true,
"referenceDate": "2026-06-24",
"lookbackDays": 7,
"windowStart": "2026-06-18",
"windowEnd": "2026-06-24",
"cbuCount": 3,
"cvuCount": 2,
"totalAccounts": 5,
"cbuCountAtStart": 2,
"cvuCountAtStart": 1,
"metrics": {
"cbuTotalStart": 2,
"cbuTotalEnd": 3,
"cvuTotalStart": 1,
"cvuTotalEnd": 2,
"totalAccountsStart": 3,
"totalAccountsEnd": 5,
"cbuDelta": 1,
"cvuDelta": 1,
"totalDelta": 2,
"cbuPctChange": 50.0,
"cvuPctChange": 100.0,
"totalPctChange": 66.66666666666666,
"daysWithChanges": 2,
"cbuDailyDeltaVariance": 0.1,
"cvuDailyDeltaVariance": 0.05,
"cbuAcceleration": 0.5,
"cvuAcceleration": 0.3,
"totalAcceleration": 0.8,
"accelerationAvailable": true
}
}
}
Motor de reglas
RequiereholderIntelligenceLookbackDays en la condición. No hace falta agregar metrics.complete == true: una ventana incompleta expone las métricas como null y el motor las evalúa como non-match. Para aceleración, agregá metrics.acceleration_available == true. En reglas transaccionales, fecha de referencia por defecto: transactedAt (calendario AR).
Campos útiles de totales: services.holder_intelligence.metrics.total_delta, total_pct_change, total_acceleration. Ver Condiciones.Was this page helpful?