Listar solicitudes de sincronización recientes
curl --request GET \
--url https://api.tupana.ai/v1/sync-requests \
--header 'Authorization: <api-key>'import requests
url = "https://api.tupana.ai/v1/sync-requests"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tupana.ai/v1/sync-requests', 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.tupana.ai/v1/sync-requests",
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: <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://api.tupana.ai/v1/sync-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.tupana.ai/v1/sync-requests")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tupana.ai/v1/sync-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 2,
"page": 1,
"page_size": 50,
"results": [
{
"id": 1042,
"master_entity_id": 48213,
"requested_types": [
"ISSUED_DOCS",
"RECEIVED_DOCS"
],
"status": "completed",
"webhook_url": "",
"results": {
"ISSUED_DOCS": {
"success": true,
"new_documents": 3
},
"RECEIVED_DOCS": {
"success": true,
"new_documents": 0
}
},
"completed_at": "2026-07-20T14:34:12Z",
"created_at": "2026-07-20T14:30:00Z"
},
{
"id": 1039,
"master_entity_id": 48213,
"requested_types": [],
"status": "processing",
"webhook_url": "https://miapp.cl/webhooks/tupana-sync",
"results": {},
"completed_at": null,
"created_at": "2026-07-20T11:02:44Z"
}
]
}{
"error": "hours debe ser un entero."
}{
"detail": "No tienes acceso a esta entidad."
}Sincronización
Listar solicitudes de sincronización
Lista las solicitudes de sincronización de una entidad creadas en las últimas N horas (por defecto 24), ordenadas de la más nueva a la más antigua. Paginación simple con page y page_size.
GET
/
sync-requests
Listar solicitudes de sincronización recientes
curl --request GET \
--url https://api.tupana.ai/v1/sync-requests \
--header 'Authorization: <api-key>'import requests
url = "https://api.tupana.ai/v1/sync-requests"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tupana.ai/v1/sync-requests', 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.tupana.ai/v1/sync-requests",
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: <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://api.tupana.ai/v1/sync-requests"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.tupana.ai/v1/sync-requests")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tupana.ai/v1/sync-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 2,
"page": 1,
"page_size": 50,
"results": [
{
"id": 1042,
"master_entity_id": 48213,
"requested_types": [
"ISSUED_DOCS",
"RECEIVED_DOCS"
],
"status": "completed",
"webhook_url": "",
"results": {
"ISSUED_DOCS": {
"success": true,
"new_documents": 3
},
"RECEIVED_DOCS": {
"success": true,
"new_documents": 0
}
},
"completed_at": "2026-07-20T14:34:12Z",
"created_at": "2026-07-20T14:30:00Z"
},
{
"id": 1039,
"master_entity_id": 48213,
"requested_types": [],
"status": "processing",
"webhook_url": "https://miapp.cl/webhooks/tupana-sync",
"results": {},
"completed_at": null,
"created_at": "2026-07-20T11:02:44Z"
}
]
}{
"error": "hours debe ser un entero."
}{
"detail": "No tienes acceso a esta entidad."
}¿Para qué se usa?
Permite listar las solicitudes de sincronización recientes de una entidad, para auditar qué se ha pedido y en qué estado va cada una.Qué hace
- Devuelve las solicitudes creadas en las últimas
hourshoras (por defecto 24), de la más nueva a la más antigua. - Paginación simple con
page(parte en 1) ypage_size(por defecto 50, máximo 200). - La entidad se indica con el query param
master_entity_id. Acepta el id opaco (eid_..., campoopaque_idde/master-entities?rut=) o el id entero.
Ejemplos de uso
- Evitar duplicar trabajo: antes de crear una solicitud nueva, revisar si ya hay una
pendingoprocessingpara la entidad. - Panel de soporte: ver el historial de sincronizaciones a demanda del día y sus resultados.
Authorizations
API Key para autenticación. Debe proporcionarse en el header Authorization con el formato: 'Api-Key YOUR-API-KEY' (incluye el prefijo 'Api-Key ' seguido de tu API key)
Query Parameters
ID de la entidad maestra. Acepta el id opaco (eid_..., campo opaque_id de /master-entities?rut=) o el id entero.
Example:
"eid_NDgyMTM6c2lnbmF0dXJl"
Ventana hacia atrás, en horas, sobre la fecha de creación. Por defecto 24.
Example:
72
Página a consultar (parte en 1).
Tamaño de página. Por defecto 50, máximo 200.
Required range:
x <= 200