curl --request GET \
--url https://api.tupana.ai/v2/folio-requests/{id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.tupana.ai/v2/folio-requests/{id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tupana.ai/v2/folio-requests/{id}/', 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.tupana.ai/v2/folio-requests/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.tupana.ai/v2/folio-requests/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.tupana.ai/v2/folio-requests/{id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tupana.ai/v2/folio-requests/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "fir_8d4a2f7c1e9b5",
"dte_type": 33,
"status": "completed",
"requested_quantity": 50,
"granted_quantity": 50,
"folio_start": 539,
"folio_end": 588,
"caf_xml": "<AUTORIZACION><CAF version=\"1.0\">…</CAF></AUTORIZACION>",
"idempotency_key": "pedido-facturas-2026-08-27-01",
"error": "",
"created_at": "2026-08-27T14:30:00Z",
"completed_at": "2026-08-27T14:32:11Z"
}{
"detail": "No tienes acceso a esta entidad."
}{
"error": "Pedido no encontrado."
}Consultar un pedido y retirar el CAF
Estado del pedido de timbraje. Cuando status es completed, la respuesta incluye el CAF en XML (caf_xml) y el rango de folios autorizado.
El CAF contiene la llave privada con la que se firman tus DTE: trátalo como un secreto. Cada entrega queda registrada.
Estados posibles:
status | Qué significa |
|---|---|
pending | Registrado, aún no empieza |
processing | El trámite está corriendo en el SII |
completed | Listo: caf_xml trae tus folios |
failed | El SII no autorizó folios. No se consumió nada, puedes volver a pedir con otra Idempotency-Key |
authorized_without_caf | El SII autorizó el rango pero no entregó el archivo. Esos folios ya salieron de tu stock: no vuelvas a pedir el mismo rango, estamos recuperando el CAF. folio_start y folio_end indican cuál |
curl --request GET \
--url https://api.tupana.ai/v2/folio-requests/{id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.tupana.ai/v2/folio-requests/{id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tupana.ai/v2/folio-requests/{id}/', 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.tupana.ai/v2/folio-requests/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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.tupana.ai/v2/folio-requests/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.tupana.ai/v2/folio-requests/{id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tupana.ai/v2/folio-requests/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "fir_8d4a2f7c1e9b5",
"dte_type": 33,
"status": "completed",
"requested_quantity": 50,
"granted_quantity": 50,
"folio_start": 539,
"folio_end": 588,
"caf_xml": "<AUTORIZACION><CAF version=\"1.0\">…</CAF></AUTORIZACION>",
"idempotency_key": "pedido-facturas-2026-08-27-01",
"error": "",
"created_at": "2026-08-27T14:30:00Z",
"completed_at": "2026-08-27T14:32:11Z"
}{
"detail": "No tienes acceso a esta entidad."
}{
"error": "Pedido no encontrado."
}Authorizations
API Key para autenticación. Debe proporcionarse en el header Authorization con el formato: 'Api-Key YOUR-API-KEY' (incluye el prefijo 'Api-Key ' seguido de tu API key)
Path Parameters
ID del pedido de timbraje.
Response
Pedido encontrado
Pedido de timbraje de folios ante el SII.
"fir_8d4a2f7c1e9b5"
Tipo de documento timbrado.
33
authorized_without_caf significa que el SII autorizó el rango y no entregó el archivo: esos folios ya salieron de tu stock.
pending, processing, completed, failed, authorized_without_caf "completed"
Folios que pediste.
50
Folios que el SII autorizó. Puede ser menor al pedido: el tope por solicitud lo pone el SII y sube con el uso.
50
true cuando el SII entregó menos folios de los que pediste. Es un desenlace normal: el tope por solicitud lo fija el SII y sube con el uso de la empresa.
true
Tope por solicitud que el SII publicó al hacer este trámite: el motivo por el que se entregó menos de lo pedido.
9
539
588
CAF entregado por el SII. Contiene la llave privada con la que se firman tus DTE: trátalo como secreto. Es null hasta que el pedido queda completed.
"<AUTORIZACION><CAF version=\"1.0\">…</CAF></AUTORIZACION>"
La clave que enviaste al crear el pedido.
"pedido-facturas-2026-08-27-01"
Motivo del SII cuando el pedido no terminó bien.
""
"2026-08-27T14:30:00Z"
"2026-08-27T14:32:11Z"
Ambiente del SII en el que se hizo la operación. Un CAF de certification NO sirve para emitir.
production, certification Vocabulario cerrado del desenlace fallido; vacío si no hubo error. Ver la página de códigos de error.
, certification_not_enabled, missing_certificate, no_folios_authorized, sii_unavailable, sii_unrecognized_page 