List Invoices
curl --request GET \
--url https://api.example.com/api/invoicesimport requests
url = "https://api.example.com/api/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/invoices', 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/invoices",
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/invoices"
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/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/invoices")
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_body{
"data": [
{
"id": "<string>",
"profile_id": "<string>",
"uuid": "<string>",
"fecha": "<string>",
"mes": 123,
"año": 123,
"total": 123,
"subtotal": 123,
"iva": 123,
"iva_amount": 123,
"retencion_iva_amount": 123,
"retencion_isr_amount": 123,
"tipo": {},
"rfc_emisor": "<string>",
"nombre_emisor": "<string>",
"regimen_fiscal_emisor": "<string>",
"rfc_receptor": "<string>",
"nombre_receptor": "<string>",
"regimen_fiscal_receptor": "<string>",
"concepto": "<string>",
"pagos": [
{
"fechaPago": "<string>",
"formaPago": "<string>",
"monedaPago": "<string>",
"monto": 123,
"numOperacion": "<string>"
}
],
"complemento_pago": {
"fechaPago": "<string>",
"formaPago": "<string>",
"monedaPago": "<string>",
"tipoCambio": 123,
"monto": 123,
"numOperacion": "<string>",
"facturasRelacionadas": [
{
"uuid": "<string>",
"monedaDR": "<string>",
"tipoCambioDR": 123,
"metodoPagoDR": "<string>",
"numParcialidad": 123,
"impSaldoAnt": 123,
"impPagado": 123,
"impSaldoInsoluto": 123
}
]
},
"validacion": {
"rfcVerificado": true,
"regimenFiscalVerificado": true,
"uuidDuplicado": true,
"advertencias": [
"<string>"
],
"errores": [
"<string>"
],
"valido": true
},
"estadoPago": {
"estado": {},
"totalFactura": 123,
"totalPagado": 123,
"saldoPendiente": 123,
"porcentajePagado": 123,
"completamentePagado": true,
"ultimoSaldoInsoluto": 123,
"tieneComplementos": true,
"tienePagosManuales": true
},
"profile": {
"id": "<string>",
"nombre": "<string>",
"rfc": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}Invoices
List Invoices
Retrieve a paginated list of invoices with optional filtering
GET
/
api
/
invoices
List Invoices
curl --request GET \
--url https://api.example.com/api/invoicesimport requests
url = "https://api.example.com/api/invoices"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/invoices', 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/invoices",
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/invoices"
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/invoices")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/invoices")
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_body{
"data": [
{
"id": "<string>",
"profile_id": "<string>",
"uuid": "<string>",
"fecha": "<string>",
"mes": 123,
"año": 123,
"total": 123,
"subtotal": 123,
"iva": 123,
"iva_amount": 123,
"retencion_iva_amount": 123,
"retencion_isr_amount": 123,
"tipo": {},
"rfc_emisor": "<string>",
"nombre_emisor": "<string>",
"regimen_fiscal_emisor": "<string>",
"rfc_receptor": "<string>",
"nombre_receptor": "<string>",
"regimen_fiscal_receptor": "<string>",
"concepto": "<string>",
"pagos": [
{
"fechaPago": "<string>",
"formaPago": "<string>",
"monedaPago": "<string>",
"monto": 123,
"numOperacion": "<string>"
}
],
"complemento_pago": {
"fechaPago": "<string>",
"formaPago": "<string>",
"monedaPago": "<string>",
"tipoCambio": 123,
"monto": 123,
"numOperacion": "<string>",
"facturasRelacionadas": [
{
"uuid": "<string>",
"monedaDR": "<string>",
"tipoCambioDR": 123,
"metodoPagoDR": "<string>",
"numParcialidad": 123,
"impSaldoAnt": 123,
"impPagado": 123,
"impSaldoInsoluto": 123
}
]
},
"validacion": {
"rfcVerificado": true,
"regimenFiscalVerificado": true,
"uuidDuplicado": true,
"advertencias": [
"<string>"
],
"errores": [
"<string>"
],
"valido": true
},
"estadoPago": {
"estado": {},
"totalFactura": 123,
"totalPagado": 123,
"saldoPendiente": 123,
"porcentajePagado": 123,
"completamentePagado": true,
"ultimoSaldoInsoluto": 123,
"tieneComplementos": true,
"tienePagosManuales": true
},
"profile": {
"id": "<string>",
"nombre": "<string>",
"rfc": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"totalPages": 123
}
}Authentication
This endpoint requires authentication. Include your access token in the Authorization header.Authorization: Bearer YOUR_ACCESS_TOKEN
Query Parameters
string
Filter invoices by profile ID
number
Filter by month (1-12)
number
Filter by year
string
Filter by tax regime code
number
default:"1"
Page number for pagination
number
default:"50"
Number of invoices per page
string
Search term to filter invoices by UUID, RFC, or name
Response
Invoice[]
Array of invoice objects
Show Invoice
Show Invoice
string
Unique identifier for the invoice
string
Profile ID this invoice belongs to
string
CFDI UUID (Folio Fiscal)
string
Invoice date in ISO format
number
Month extracted from invoice date (1-12)
number
Year extracted from invoice date
number
Total amount of the invoice
number
Subtotal before taxes
number
IVA percentage rate
number
IVA transferred amount (impuesto trasladado)
number
IVA withholding amount
number
ISR withholding amount
enum
Payment type:
PUE (payment in one exhibit), PPD (payment in installments), or COMPLEMENTO_PAGO (payment complement)string
RFC of the issuer
string
Name of the issuer
string
Tax regime code of the issuer
string
RFC of the recipient
string
Name of the recipient
string
Tax regime code of the recipient
string
Invoice concept or description
array
object
Payment complement information (for COMPLEMENTO_PAGO type)
Show ComplementoPago
Show ComplementoPago
string
Payment date
string
Payment method
string
Payment currency
number
Exchange rate
number
Payment amount
string
Operation number
object
object
Payment status details
Show EstadoPago
Show EstadoPago
enum
Payment state:
PAGADO, PAGO_PARCIAL, or NO_PAGADOnumber
Total invoice amount
number
Total amount paid
number
Pending balance
number
Percentage paid (0-100)
boolean
Whether fully paid
number
Last outstanding balance from payment complement
boolean
Whether has payment complements
boolean
Whether has manual payments
string
Creation timestamp in ISO format
string
Last update timestamp in ISO format
object
Example Request
curl -X GET "https://api.contafy.com/api/invoices?profileId=prof_123&mes=3&año=2026&page=1&limit=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Example Response
{
"data": [
{
"id": "inv_abc123",
"profile_id": "prof_123",
"uuid": "12345678-90AB-CDEF-1234-567890ABCDEF",
"fecha": "2026-03-15T10:30:00Z",
"mes": 3,
"año": 2026,
"total": 11600.00,
"subtotal": 10000.00,
"iva": 16,
"iva_amount": 1600.00,
"tipo": "PUE",
"rfc_emisor": "XAXX010101000",
"nombre_emisor": "Empresa Ejemplo SA de CV",
"regimen_fiscal_emisor": "601",
"rfc_receptor": "BAXX010101000",
"nombre_receptor": "Cliente Ejemplo",
"regimen_fiscal_receptor": "612",
"concepto": "Servicios de consultoría",
"pagos": [],
"complemento_pago": null,
"validacion": {
"rfcVerificado": true,
"regimenFiscalVerificado": true,
"uuidDuplicado": false,
"advertencias": [],
"errores": [],
"valido": true
},
"estadoPago": {
"estado": "PAGADO",
"totalFactura": 11600.00,
"totalPagado": 11600.00,
"saldoPendiente": 0,
"porcentajePagado": 100,
"completamentePagado": true,
"ultimoSaldoInsoluto": null,
"tieneComplementos": false,
"tienePagosManuales": false
},
"created_at": "2026-03-15T10:35:00Z",
"updated_at": "2026-03-15T10:35:00Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"limit": 10,
"totalPages": 1
}
}
Error Responses
{
"error": "Unauthorized",
"message": "Invalid or missing access token"
}
{
"error": "Bad Request",
"message": "Invalid query parameters"
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred"
}
⌘I