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
        • Cash Inflow Forecast & Customer Concentration (HHI)
        • Discounts, Demurrage & Shrinkage Recovery Audit
      • 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

    FinancialDocsResponse

    Standard paginated response for financial documents.

    {
        "meta": {
            "total": 120,
            "page": 1,
            "limit": 50,
            "tenant": "XAXX010101000",
            "detail": "summary"
        },
        "data": [
            {
                "id": "1765368000000_0866e",
                "company": "XAXX010101000",
                "client": "PME380607P35",
                "fiscal": {
                    "rfcEmisor": "ANA80052693A",
                    "rfcReceptor": "PME380607P35",
                    "rfcEmisorValid": true,
                    "rfcReceptorValid": true,
                    "cfdiType": {
                        "code": "I",
                        "label": "Ingreso"
                    },
                    "statusAuth": true
                },
                "status": {
                    "code": 4,
                    "label": "Facturado"
                },
                "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": 2853.13,
                    "discount": 0,
                    "shrinkageDeduction": 0,
                    "total": 79887.77
                },
                "balance": {
                    "total": 79887.77,
                    "paid": 50000,
                    "pending": 29887.77,
                    "netInvoiced": 79887.77,
                    "creditNotesTotal": 0,
                    "receiptsTotal": 50000,
                    "isFullyPaid": false,
                    "isSettledUnderNif": false,
                    "hasRoundingResidual": false,
                    "roundingResidualMxn": 0,
                    "paymentsCount": 1
                },
                "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",
                    "ship": 58534.25,
                    "toll": 2298.3,
                    "user": "operator@dufrei.com",
                    "source": 1
                },
                "payments": [
                    {
                        "type": "NC",
                        "amount": 414.29,
                        "folio": "5599",
                        "uuid": "BC92ACCA-C728-55AE-9A92-819B75960B53",
                        "pending": 40366.84,
                        "relatedInvoiceUuid": "61463ECB-3AD7-5BB3-8CFD-EAF4AB6C8EB8",
                        "pdf": "http://example.com",
                        "xml": "http://example.com"
                    }
                ],
                "cancellations": {
                    "hasCancellations": false,
                    "count": 0,
                    "satStatus": [
                        "201"
                    ]
                }
            }
        ]
    }
    Built with