Actualizar entidad (refresh)
curl --request POST \
--url http://api.gu1.ai/entities/{entityId}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"forceRefresh": true,
"skipRulesEngine": true,
"depth": 123,
"autoExecuteIntegrations": {},
"autoExecuteIntegrationsShareholders": {},
"refreshScope": "<string>",
"providerCodes": [
{}
],
"preserveName": true,
"preserveEntityData": true
}
'import requests
url = "http://api.gu1.ai/entities/{entityId}/refresh"
payload = {
"forceRefresh": True,
"skipRulesEngine": True,
"depth": 123,
"autoExecuteIntegrations": {},
"autoExecuteIntegrationsShareholders": {},
"refreshScope": "<string>",
"providerCodes": [{}],
"preserveName": True,
"preserveEntityData": True
}
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({
forceRefresh: true,
skipRulesEngine: true,
depth: 123,
autoExecuteIntegrations: {},
autoExecuteIntegrationsShareholders: {},
refreshScope: '<string>',
providerCodes: [{}],
preserveName: true,
preserveEntityData: true
})
};
fetch('http://api.gu1.ai/entities/{entityId}/refresh', 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/entities/{entityId}/refresh",
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([
'forceRefresh' => true,
'skipRulesEngine' => true,
'depth' => 123,
'autoExecuteIntegrations' => [
],
'autoExecuteIntegrationsShareholders' => [
],
'refreshScope' => '<string>',
'providerCodes' => [
[
]
],
'preserveName' => true,
'preserveEntityData' => true
]),
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 := "http://api.gu1.ai/entities/{entityId}/refresh"
payload := strings.NewReader("{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\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("http://api.gu1.ai/entities/{entityId}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{entityId}/refresh")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\n}"
response = http.request(request)
puts response.read_bodyReferencia API
Actualizar entidad (refresh)
Re-ejecutar enrichments en una entidad existente con recursión opcional de socios y motor de reglas — scope unificado y flags preserve para nombre y ficha.
POST
/
entities
/
{entityId}
/
refresh
Actualizar entidad (refresh)
curl --request POST \
--url http://api.gu1.ai/entities/{entityId}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"forceRefresh": true,
"skipRulesEngine": true,
"depth": 123,
"autoExecuteIntegrations": {},
"autoExecuteIntegrationsShareholders": {},
"refreshScope": "<string>",
"providerCodes": [
{}
],
"preserveName": true,
"preserveEntityData": true
}
'import requests
url = "http://api.gu1.ai/entities/{entityId}/refresh"
payload = {
"forceRefresh": True,
"skipRulesEngine": True,
"depth": 123,
"autoExecuteIntegrations": {},
"autoExecuteIntegrationsShareholders": {},
"refreshScope": "<string>",
"providerCodes": [{}],
"preserveName": True,
"preserveEntityData": True
}
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({
forceRefresh: true,
skipRulesEngine: true,
depth: 123,
autoExecuteIntegrations: {},
autoExecuteIntegrationsShareholders: {},
refreshScope: '<string>',
providerCodes: [{}],
preserveName: true,
preserveEntityData: true
})
};
fetch('http://api.gu1.ai/entities/{entityId}/refresh', 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/entities/{entityId}/refresh",
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([
'forceRefresh' => true,
'skipRulesEngine' => true,
'depth' => 123,
'autoExecuteIntegrations' => [
],
'autoExecuteIntegrationsShareholders' => [
],
'refreshScope' => '<string>',
'providerCodes' => [
[
]
],
'preserveName' => true,
'preserveEntityData' => true
]),
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 := "http://api.gu1.ai/entities/{entityId}/refresh"
payload := strings.NewReader("{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\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("http://api.gu1.ai/entities/{entityId}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/entities/{entityId}/refresh")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"forceRefresh\": true,\n \"skipRulesEngine\": true,\n \"depth\": 123,\n \"autoExecuteIntegrations\": {},\n \"autoExecuteIntegrationsShareholders\": {},\n \"refreshScope\": \"<string>\",\n \"providerCodes\": [\n {}\n ],\n \"preserveName\": true,\n \"preserveEntityData\": true\n}"
response = http.request(request)
puts response.read_bodyDescripción
Re-ejecuta enrichments del marketplace para una persona o empresa existente, opcionalmente:- Actualiza el nombre y/o
entityData(solo si lo indicás con los nuevos flags) - Crea o re-enriquece socios (empresas,
depth> 0) - Ejecuta el motor de reglas al finalizar
Retrocompatibilidad: Si omitís
refreshScope, preserveName y preserveEntityData, el comportamiento es el de siempre: la selección de proveedores sigue autoExecuteIntegrations y el nombre se sincroniza desde fullName normalizado cuando cambia. entityData no se modifica salvo refreshScope: "basic_data" con preserveEntityData.Endpoint
POST http://api.gu1.ai/entities/{entityId}/refresh
Autenticación
Requiere permiso para ejecutar enrichments (igual quePOST /entities/{entityId}/enrich).
Parámetros de ruta
string
required
UUID de la entidad a actualizar.
Cuerpo
boolean
default:"true"
Si es
true, omite caché y vuelve a llamar a los proveedores.boolean
default:"false"
Si es
true, no ejecuta reglas después del enrichment.integer
default:"1"
Profundidad de socios (0–5). Ignorado con
refreshScope: "basic_data" (siempre 0).object
Selección legacy de proveedores (cuando
refreshScope se omite). Misma forma que POST /entities/automatic.object
Pipeline de socios (empresas,
depth > 0). Misma forma que creación automática.string
Scope unificado opcional. Si está presente, reemplaza
autoExecuteIntegrations en la entidad raíz:| Valor | Comportamiento |
|---|---|
basic_data | Un solo proveedor de datos básicos del país (llamada fresh). Sin socios. |
all_active | Todos los enrichments activos para tipo y país. |
selected | Lista explícita en providerCodes (obligatorio, no vacío). |
array
Obligatorio cuando
refreshScope es selected.boolean
true: conservar el nombre actual.false: sincronizar desde mapeo (basic_data) ofullNamenormalizado.- Omitido (legacy): sincronizar nombre si
fullNamecambió (comportamiento anterior).
boolean
Solo con
refreshScope: "basic_data" y enrichment exitoso:- Omitido: no tocar
entityData. true: completar solo campos vacíos (gap-fill).false: reemplazarentityDatadesde datos básicos.
all_active, selected o bodies legacy sin basic_data.Ejemplos
Refresh legacy (sin cambios)
curl -X POST http://api.gu1.ai/entities/{entityId}/refresh \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"skipRulesEngine": false,
"depth": 1,
"forceRefresh": true,
"autoExecuteIntegrations": { "executeAllActiveEnrichments": true },
"autoExecuteIntegrationsShareholders": { "executeAllActiveEnrichments": true }
}'
Solo datos básicos (seguro)
curl -X POST http://api.gu1.ai/entities/{entityId}/refresh \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"refreshScope": "basic_data",
"preserveName": true,
"skipRulesEngine": true,
"forceRefresh": true
}'
Respuesta
Incluyedata.entity, data.enrichmentResult, contadores de socios y errors. Con skipRulesEngine: false, también rulesExecutionSummary en la raíz (igual que Analyze).
Eventos Socket.IO
entity:refresh-started, entity:refreshed, entity:refresh-failed.
Endpoints relacionados
Analyze
Motor de reglas (enrichment opcional).
Materializar relaciones
Cadena de socios desde normalized.
Was this page helpful?