Buscar Facturas
curl --request GET \
--url https://api.example.com/api/v1/invoices/searchimport requests
url = "https://api.example.com/api/v1/invoices/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/invoices/search', 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.example.com/api/v1/invoices/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/invoices/search"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/invoices/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invoices/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyEndpoints Disponibles
Buscar Facturas
Busca facturas con filtros avanzados: estado, fechas, cliente, numero de factura.
GET
/
api
/
v1
/
invoices
/
search
Buscar Facturas
curl --request GET \
--url https://api.example.com/api/v1/invoices/searchimport requests
url = "https://api.example.com/api/v1/invoices/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/invoices/search', 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.example.com/api/v1/invoices/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/v1/invoices/search"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/v1/invoices/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/invoices/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyBusqueda avanzada de facturas
Busca facturas usando filtros combinados. Retorna resultados paginados ordenados por fecha de emision descendente.Request
curl "https://sandbox.cucu.bo/api/v1/invoices/search?state=VALIDATED&from=2026-01-01&to=2026-03-31&page=0&size=20" \
-H "X-API-Key: YOUR_API_KEY"
Parametros de query
| Parametro | Tipo | Requerido | Descripcion |
|---|---|---|---|
state | String | No | Filtrar por estado: VALIDATED, CANCELLED, OFFLINE_PENDING, REJECTED |
from | String | No | Fecha inicio (formato YYYY-MM-DD) |
to | String | No | Fecha fin (formato YYYY-MM-DD) |
clientDocument | String | No | NIT o documento del cliente |
invoiceNumber | Long | No | Numero de factura |
page | int | No | Pagina (inicia en 0, default: 0) |
size | int | No | Elementos por pagina (default: 20) |
Response
{
"success": true,
"data": {
"content": [
{
"id": "uuid",
"invoiceNumber": 42,
"cuf": "2872F729...",
"siatState": "VALIDATED",
"clientBusinessName": "EMPRESA S.R.L.",
"clientDocumentNumber": "123456789",
"amountTotal": 500.00,
"emissionDate": "2026-03-15T10:30:00"
}
],
"page": 0,
"size": 20,
"total": 156
}
}
Ejemplos de uso
# Facturas validadas de marzo 2026
curl "https://sandbox.cucu.bo/api/v1/invoices/search?state=VALIDATED&from=2026-03-01" \
-H "X-API-Key: YOUR_API_KEY"
# Facturas de un cliente especifico
curl "https://sandbox.cucu.bo/api/v1/invoices/search?clientDocument=123456789" \
-H "X-API-Key: YOUR_API_KEY"
# Factura por numero
curl "https://sandbox.cucu.bo/api/v1/invoices/search?invoiceNumber=42" \
-H "X-API-Key: YOUR_API_KEY"
⌘I