Obtener documentos
curl --request GET \
--url https://api.pruff.com/api/clients/documents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/documents"
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/documents', 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/documents",
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/documents"
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/documents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/documents")
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{
"data": [
{
"id": "c1d2e3f4-5678-4abc-8def-1234567890ab",
"folio": "1333",
"type": "electronic-invoice",
"subType": "33",
"businessIdentifier": "76000000-0",
"businessName": "Cliente Ejemplo SpA",
"stakeholderIdentifier": "77777777-7",
"stakeholderName": "Pagador Ejemplo SpA",
"clientIdentifier": "76000000-0",
"clientName": "Cliente Ejemplo SpA",
"amount": 4123123,
"currency": "CLP",
"issuedDate": "2025-07-09T00:00:00.000Z",
"receiptDate": "2025-07-10T00:00:00.000Z",
"paidAt": null
}
],
"pagination": {
"total": 24,
"page": 1,
"pageSize": 10,
"totalPages": 3
}
}Documentos
Obtener documentos
Lista los documentos de tu empresa de forma paginada, ordenados por fecha de emisión descendente y, si dos documentos tienen la misma fecha, por id descendente. El orden es estable: al recorrer todas las páginas ninguno se repite ni se pierde. Todos los filtros son opcionales y se combinan entre sí.
Por defecto solo se listan documentos en CLP. Para ver documentos en otra moneda, envía currency.
El campo type de cada documento es el identificador del subproducto de factoring al que pertenece (por ejemplo electronic-invoice) y subType es el código del tipo de documento tributario (por ejemplo 33), cuando aplica.
GET
/
documents
Obtener documentos
curl --request GET \
--url https://api.pruff.com/api/clients/documents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/documents"
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/documents', 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/documents",
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/documents"
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/documents")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/documents")
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{
"data": [
{
"id": "c1d2e3f4-5678-4abc-8def-1234567890ab",
"folio": "1333",
"type": "electronic-invoice",
"subType": "33",
"businessIdentifier": "76000000-0",
"businessName": "Cliente Ejemplo SpA",
"stakeholderIdentifier": "77777777-7",
"stakeholderName": "Pagador Ejemplo SpA",
"clientIdentifier": "76000000-0",
"clientName": "Cliente Ejemplo SpA",
"amount": 4123123,
"currency": "CLP",
"issuedDate": "2025-07-09T00:00:00.000Z",
"receiptDate": "2025-07-10T00:00:00.000Z",
"paidAt": null
}
],
"pagination": {
"total": 24,
"page": 1,
"pageSize": 10,
"totalPages": 3
}
}