Obtener F22
curl --request GET \
--url https://api.pruff.com/api/clients/datahub/{identifier}/f22 \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/datahub/{identifier}/f22"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/datahub/{identifier}/f22', 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/datahub/{identifier}/f22",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/datahub/{identifier}/f22"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.pruff.com/api/clients/datahub/{identifier}/f22")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/datahub/{identifier}/f22")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"values": [
{
"2023": "CLIENTE EJEMPLO SPA",
"2024": "CLIENTE EJEMPLO SPA",
"code": "01",
"name": "Razón Social o Apellido paterno",
"nameCode": "[01] Razón Social o Apellido paterno"
},
{
"2023": "76111111-6",
"2024": "76111111-6",
"code": "03",
"name": "Rut",
"nameCode": "[03] Rut"
},
{
"2023": "98543210",
"2024": "112345678",
"code": "36",
"name": "Pagos provisionales",
"nameCode": "[36] Pagos provisionales"
},
{
"2024": "84567231",
"code": "85",
"name": "SALDO A FAVOR",
"nameCode": "[85] SALDO A FAVOR"
}
],
"years": [
"2023",
"2024"
]
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "Business not found"
}{
"message": "Rate limit exceeded: 501 requests in the current 60s window, limit is 500. Retry in 12s.",
"displayMessage": "Superaste el límite de 500 solicitudes cada 60 segundos. Vuelve a intentarlo en 12 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 500,
"used": 501,
"windowSeconds": 60,
"retryAfterSeconds": 12,
"resetAt": "2026-11-04T15:00:12.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}Datahub
Obtener F22
Devuelve el Formulario 22 (declaración anual de impuesto a la renta) del cliente, con los valores declarados por año y organizados por código oficial del SII. Cada elemento de values es un campo del formulario y trae un valor por cada año en que fue declarado. Si el cliente existe pero Pruff no tiene F22 para él, responde 200 con values y years vacíos. Es un endpoint de solo lectura: no gatilla nuevas extracciones. El ejemplo se recortó a unos pocos campos.
GET
/
datahub
/
{identifier}
/
f22
Obtener F22
curl --request GET \
--url https://api.pruff.com/api/clients/datahub/{identifier}/f22 \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/datahub/{identifier}/f22"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/datahub/{identifier}/f22', 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/datahub/{identifier}/f22",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/datahub/{identifier}/f22"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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.pruff.com/api/clients/datahub/{identifier}/f22")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/datahub/{identifier}/f22")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"values": [
{
"2023": "CLIENTE EJEMPLO SPA",
"2024": "CLIENTE EJEMPLO SPA",
"code": "01",
"name": "Razón Social o Apellido paterno",
"nameCode": "[01] Razón Social o Apellido paterno"
},
{
"2023": "76111111-6",
"2024": "76111111-6",
"code": "03",
"name": "Rut",
"nameCode": "[03] Rut"
},
{
"2023": "98543210",
"2024": "112345678",
"code": "36",
"name": "Pagos provisionales",
"nameCode": "[36] Pagos provisionales"
},
{
"2024": "84567231",
"code": "85",
"name": "SALDO A FAVOR",
"nameCode": "[85] SALDO A FAVOR"
}
],
"years": [
"2023",
"2024"
]
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "Business not found"
}{
"message": "Rate limit exceeded: 501 requests in the current 60s window, limit is 500. Retry in 12s.",
"displayMessage": "Superaste el límite de 500 solicitudes cada 60 segundos. Vuelve a intentarlo en 12 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 500,
"used": 501,
"windowSeconds": 60,
"retryAfterSeconds": 12,
"resetAt": "2026-11-04T15:00:12.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}