1. 3. Financial Documents
DUFREI API
  • Raíz
    • 1. Core & Health
      • Health Check
    • 2. AI Agents & MCP
      • Model Context Protocol (Streamable HTTP)
      • Initialize Legacy SSE Stream
      • Send Legacy MCP JSON-RPC Message
    • 3. Financial Documents
      • List Financial Documents
        GET
      • Cash Inflow Forecast & Customer Concentration (HHI)
        GET
      • Discounts, Demurrage & Shrinkage Recovery Audit
        GET
    • 4. Shipments & Fleet
      • List Shipments (Trips)
      • Audit Fleet Utilization and Productivity
      • Audit Dispatch-to-Bill and Invoicing Efficiency
      • Freight Financial Unit Economics ($/km, $/L)
    • 3. Financial & Invoices
      • SAT CFDI 4.0 Monthly Fiscal Ledger & Retention Reconciliation
    • 5. Scheduled Alerts
      • Schedule Alert Rules
  • Schemas
    • PaginationMeta
    • FinancialDocsResponse
    • ShipmentsResponse
    • FinancialSummary
    • TripSummary
    • ErrorResponse
    • CanceledRecord
    • PaymentRecord
    • FinancialDocument
    • MexicanAddress
    • ShipmentLeg
    • TripDocument
    • ScheduleAlertsRequest
    • ScheduleAlertsSuccessResponse
    • McpJsonRpcRequest
    • McpJsonRpcResponse
    • RouteCatalogDetails
    • FleetUtilizationResponse
    • DispatchToBillResponse
    • CashInflowForecastResponse
    • DiscountsAndShrinkageResponse
    • FinancialUnitEconomicsResponse
  1. 3. Financial Documents

List Financial Documents

GET
/api/financial-docs
Returns a paginated list of billing and financial documents for the authenticated tenant,
sorted by fiscal emission date and timestamp in descending order.
Each record represents a freight billing document which may include:
An issued CFDI invoice (Factura)
Associated payments (Complementos de Pago / REP or Notas de Crédito)
Cancellation records if applicable before the SAT
Supports two detail levels via the detail query parameter:
summary (default): Computes outstanding balances (pending), total collected,
SAT certification timestamps, folio references, and status labels in a compact format.
full: Returns the raw MongoDB document with all internal accounting subdocuments.

Solicitud

Autorización
API Key
Agregar parámetro en header
x-api-key
Ejemplo:
x-api-key: ********************
or
Parámetros de consulta

Respuestas

🟢200
application/json
Successful response with pagination metadata and financial documents.
Encabezados

Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠429TooManyRequests
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/api/financial-docs?limit=&page=&startDate=&endDate=&client=&status=&detail=' \
--header 'x-api-key: <api-key>'
Respuesta Ejemplo de Respuesta
200 - Concise accounting summary (detail=summary)
{
    "meta": {
        "total": 120,
        "page": 1,
        "limit": 50,
        "tenant": "XAXX010101000",
        "detail": "summary"
    },
    "data": [
        {
            "id": "1765368000000_0866e",
            "company": "XAXX010101000",
            "client": "PME380607P35",
            "status": {
                "code": 6,
                "label": "Pagado"
            },
            "dates": {
                "lastUpdate": "2025-06-15T10:30:00.000Z",
                "date": 1765346400,
                "timestamp": 1765368000,
                "invoiceDate": "2025-12-10T02:00:00.000Z",
                "satCertDate": "2025-12-10T02:05:00.000Z"
            },
            "references": {
                "ref1_relacion": "2025-90237",
                "ref2_cedula": "T-246"
            },
            "amounts": {
                "subtotal": 71328.36,
                "vat16": 11412.54,
                "vatRetention4": 2317.48,
                "discount": 0,
                "shrinkageDeduction": 0,
                "total": 80423.42
            },
            "balance": {
                "total": 80423.42,
                "paid": 80423.42,
                "pending": 0,
                "isFullyPaid": true,
                "paymentsCount": 2
            },
            "invoice": {
                "folio": "202500384",
                "uuid": "295A6B4A-25E5-56C0-95BF-CCCC0D169E4B",
                "pdf": "https://storage.googleapis.com/dufrei-admin/XAXX010101000/invoice/FC-202500384.pdf",
                "xml": "https://storage.googleapis.com/dufrei-admin/XAXX010101000/invoice/FC-202500384.xml"
            },
            "cancellations": {
                "hasCancellations": false,
                "count": 0
            }
        }
    ]
}
Modificado en 2026-09-20 15:05:35
Anterior
Send Legacy MCP JSON-RPC Message
Siguiente
Cash Inflow Forecast & Customer Concentration (HHI)
Built with