curl --request GET \
--url https://api.pruff.com/api/clients/cessions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/cessions"
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/cessions', 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/cessions",
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/cessions"
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/cessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/cessions")
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": "53af43d3-1111-4111-8111-0f115d7636af",
"businessIdentifier": "11111111-1",
"businessName": "Cliente Ejemplo SpA",
"giverIdentifier": "11111111-1",
"giverName": "Cliente Ejemplo SpA",
"cessionaryIdentifier": "22222222-2",
"cessionaryName": "Factoring Ejemplo SpA",
"payerIdentifier": "33333333-3",
"payerName": "Pagador Ejemplo SpA",
"executiveName": "Ana Pérez",
"executiveEmail": "ana.perez@example.com",
"invoiceStatus": "Cedida",
"cessionStatus": "Cesion Vigente",
"docType": "33",
"folio": "321",
"amount": 782235,
"cessionAmount": 782235,
"issuedDate": "2024-07-30T00:00:00.000Z",
"cessionDate": "2024-07-30T15:36:00.000Z"
},
{
"id": "623324f8-2222-4222-8222-aa5c55acf182",
"businessIdentifier": "76111111-6",
"businessName": "Otro Cliente Ejemplo SpA",
"giverIdentifier": "22222222-2",
"giverName": "Factoring Ejemplo SpA",
"cessionaryIdentifier": "77222222-K",
"cessionaryName": "Fondo Ejemplo SpA",
"payerIdentifier": "96111111-0",
"payerName": null,
"executiveName": null,
"executiveEmail": null,
"invoiceStatus": null,
"cessionStatus": "Cesion Vigente",
"docType": "33",
"folio": "123",
"amount": 998886,
"cessionAmount": 998886,
"issuedDate": "2024-07-29T00:00:00.000Z",
"cessionDate": "2024-09-30T15:37:00.000Z"
}
],
"pagination": {
"total": 24,
"page": 1,
"pageSize": 2,
"totalPages": 12
},
"message": "Cessions fetched successfully"
}Obtener cesiones
Lista las cesiones de facturas registradas en Pruff a las que tiene acceso tu empresa, de forma paginada. Todos los filtros son opcionales y se combinan entre sí: una cesión debe cumplir todos los que envíes.
Los resultados se ordenan por fecha de emisión de la factura descendente y, si dos cesiones tienen la misma fecha, por id. El orden es estable: al recorrer todas las páginas ninguna cesión se repite ni se pierde.
Las fechas de cesión (startDateCession y endDateCession) se interpretan como días calendario de Chile (hora de Santiago); las de emisión (startDateIssued y endDateIssued), como días calendario en UTC. En todos los casos ambos extremos son inclusive. Si envías businessIdentifier y businessIdentifiers juntos, solo se devuelven las cesiones que cumplen ambos.
Con executiveEmail se devuelven solo las cesiones de los clientes asignados a ese ejecutivo. Si el ejecutivo no tiene clientes asignados, la respuesta es una página vacía.
curl --request GET \
--url https://api.pruff.com/api/clients/cessions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/cessions"
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/cessions', 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/cessions",
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/cessions"
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/cessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/cessions")
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": "53af43d3-1111-4111-8111-0f115d7636af",
"businessIdentifier": "11111111-1",
"businessName": "Cliente Ejemplo SpA",
"giverIdentifier": "11111111-1",
"giverName": "Cliente Ejemplo SpA",
"cessionaryIdentifier": "22222222-2",
"cessionaryName": "Factoring Ejemplo SpA",
"payerIdentifier": "33333333-3",
"payerName": "Pagador Ejemplo SpA",
"executiveName": "Ana Pérez",
"executiveEmail": "ana.perez@example.com",
"invoiceStatus": "Cedida",
"cessionStatus": "Cesion Vigente",
"docType": "33",
"folio": "321",
"amount": 782235,
"cessionAmount": 782235,
"issuedDate": "2024-07-30T00:00:00.000Z",
"cessionDate": "2024-07-30T15:36:00.000Z"
},
{
"id": "623324f8-2222-4222-8222-aa5c55acf182",
"businessIdentifier": "76111111-6",
"businessName": "Otro Cliente Ejemplo SpA",
"giverIdentifier": "22222222-2",
"giverName": "Factoring Ejemplo SpA",
"cessionaryIdentifier": "77222222-K",
"cessionaryName": "Fondo Ejemplo SpA",
"payerIdentifier": "96111111-0",
"payerName": null,
"executiveName": null,
"executiveEmail": null,
"invoiceStatus": null,
"cessionStatus": "Cesion Vigente",
"docType": "33",
"folio": "123",
"amount": 998886,
"cessionAmount": 998886,
"issuedDate": "2024-07-29T00:00:00.000Z",
"cessionDate": "2024-09-30T15:37:00.000Z"
}
],
"pagination": {
"total": 24,
"page": 1,
"pageSize": 2,
"totalPages": 12
},
"message": "Cessions fetched successfully"
}