Listar CFDIs
curl --request GET \
--url https://api.ipsofactura.com/cfdi \
--header 'x-api: <api-key>'import requests
url = "https://api.ipsofactura.com/cfdi"
headers = {"x-api": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api': '<api-key>'}};
fetch('https://api.ipsofactura.com/cfdi', 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.ipsofactura.com/cfdi",
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: <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.ipsofactura.com/cfdi"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api", "<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.ipsofactura.com/cfdi")
.header("x-api", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ipsofactura.com/cfdi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"facturas": [
{
"cfdi_relacionados": [
{
"tipo_relacion": "<string>",
"uuids": [
"<string>"
]
}
],
"emisor_nombre": "<string>",
"emisor_rfc": "<string>",
"estatus": "<string>",
"fecha": "<string>",
"fecha_timbrado": "<string>",
"folio": "<string>",
"forma_pago": "<string>",
"id": "<string>",
"metodo_pago": "<string>",
"moneda": "<string>",
"receptor_nombre": "<string>",
"receptor_rfc": "<string>",
"serie": "<string>",
"stamped_at": "<string>",
"subtotal": 123,
"tipo_cambio": 123,
"tipo_comprobante": "<string>",
"total": 123,
"uso_cfdi": "<string>",
"uuid": "<string>",
"xml_url": "<string>"
}
],
"pagination": {
"has_next": true,
"has_prev": true,
"next_page": 123,
"page": 123,
"per_page": 123,
"prev_page": 123,
"total_items": 123,
"total_pages": 123
}
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}CFDI
Listar CFDIs
Devuelve los CFDIs de la cuenta, paginados y del más reciente al más antiguo. Filtros opcionales, combinables entre sí: tipo_comprobante (catálogo c_TipoDeComprobante: I, E, T, P, N — este API sólo timbra I, E y P), serie, folio, rfc_emisor (se compara en mayúsculas) y folio_fiscal (el UUID que timbró el SAT). Todos son coincidencia exacta y se aplican siempre dentro de la cuenta autenticada. En serie, folio y rfc_emisor un valor vacío equivale a no enviar el filtro; tipo_comprobante vacío es un 400 por ser catálogo cerrado. Un parámetro desconocido devuelve 400 en lugar de ignorarse en silencio.
GET
/
cfdi
Listar CFDIs
curl --request GET \
--url https://api.ipsofactura.com/cfdi \
--header 'x-api: <api-key>'import requests
url = "https://api.ipsofactura.com/cfdi"
headers = {"x-api": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api': '<api-key>'}};
fetch('https://api.ipsofactura.com/cfdi', 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.ipsofactura.com/cfdi",
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: <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.ipsofactura.com/cfdi"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api", "<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.ipsofactura.com/cfdi")
.header("x-api", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ipsofactura.com/cfdi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"facturas": [
{
"cfdi_relacionados": [
{
"tipo_relacion": "<string>",
"uuids": [
"<string>"
]
}
],
"emisor_nombre": "<string>",
"emisor_rfc": "<string>",
"estatus": "<string>",
"fecha": "<string>",
"fecha_timbrado": "<string>",
"folio": "<string>",
"forma_pago": "<string>",
"id": "<string>",
"metodo_pago": "<string>",
"moneda": "<string>",
"receptor_nombre": "<string>",
"receptor_rfc": "<string>",
"serie": "<string>",
"stamped_at": "<string>",
"subtotal": 123,
"tipo_cambio": 123,
"tipo_comprobante": "<string>",
"total": 123,
"uso_cfdi": "<string>",
"uuid": "<string>",
"xml_url": "<string>"
}
],
"pagination": {
"has_next": true,
"has_prev": true,
"next_page": 123,
"page": 123,
"per_page": 123,
"prev_page": 123,
"total_items": 123,
"total_pages": 123
}
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}{
"code": "VALIDATION_ERROR",
"id": "<string>",
"idempotencyKey": "<string>",
"message": "CFDI40147: El RFC del receptor no se encuentra en la lista de contribuyentes inscritos no cancelados del SAT",
"retryAfter": 123,
"sat_code": "CFDI40147"
}Authorizations
API key emitida por Ipsofactura, enviada en el header x-api.