curl --request POST \
--url https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"months": [
"2026-09",
"2026-10"
]
}
'import requests
url = "https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}"
payload = { "months": ["2026-09", "2026-10"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({months: ['2026-09', '2026-10']})
};
fetch('https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}', 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.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}",
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([
'months' => [
'2026-09',
'2026-10'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}"
payload := strings.NewReader("{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Scraping executed"
}Sincronizar cliente
Pide sincronizar a un cliente enrolado de tu empresa con el SII o la TGR para obtener su información más actualizada.
Este endpoint es asíncrono: la respuesta 200 solo confirma que la sincronización quedó en curso, no que terminó. Para saber si se actualizó, revisa isUpdated en el endpoint “Listar últimas sincronizaciones” (en tgr, compara además lastScrapedAt con date) o las fechas del endpoint “Obtener estado de sincronización”.
Antes de iniciar, Pruff valida las credenciales del cliente. Si la clave del SII ya no es válida, el cliente deja de figurar como enrolado en tu cuenta y debes enrolarlo de nuevo.
Cada tipo de sincronización tiene un tiempo de espera entre solicitudes para el mismo cliente. Si vuelves a pedirla antes de que pase, recibes un 429 que indica cuántos minutos esperar. El 429 también puede deberse al límite de solicitudes de tu empresa, que incluye el header Retry-After.
Si recibes un 500, un 503 o un 504, antes de reintentar consulta “Obtener estado de sincronización”; un reintento inmediato puede responder 429. Si el 504 indica que el inicio quedó sin confirmar, esa sincronización no aparece en “Listar últimas sincronizaciones”: usa “Obtener estado de sincronización”.
En el body puedes enviar months para acotar la sincronización de documentos del SII a meses específicos. Para tgr no se usa, pero si lo envías se valida igual (por ejemplo, una lista vacía responde 400). El body es opcional.
curl --request POST \
--url https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"months": [
"2026-09",
"2026-10"
]
}
'import requests
url = "https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}"
payload = { "months": ["2026-09", "2026-10"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({months: ['2026-09', '2026-10']})
};
fetch('https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}', 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.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}",
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([
'months' => [
'2026-09',
'2026-10'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}"
payload := strings.NewReader("{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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("https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/syncronizations/execute/{scrapingType}/{businessIdentifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"months\": [\n \"2026-09\",\n \"2026-10\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Scraping executed"
}Parámetros de ruta
Cuerpo
Meses de documentos del SII que quieres sincronizar, en formato YYYY-MM. Entre 1 y 6 meses, sin repetir y sin meses futuros. Solo aplica a sii; en tgr no se usa, pero si lo envías se valida igual. Si no lo envías, se sincroniza el período por defecto.
1 - 6 elements^\d{4}-(0[1-9]|1[0-2])$