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

    TripSummary

    Concise trip dispatch and shrinkage analysis summary.

    {
        "id": "699c7b6a884beedd97446875",
        "client": "KGA150313LM0",
        "company": "XAXX010101000",
        "driver": "ERIK MOISES TUCUCH ROSENDO",
        "references": {
            "nCed": "COA-22",
            "nRel": "2506-001",
            "idFinan": "1771848000000_6cfb1"
        },
        "route": {
            "origin": {
                "id": "688",
                "city": "Merida",
                "state": "YUC",
                "officialName": "TAD Merida, Yuc.",
                "stationCode": "MXMIDPMXTAD",
                "coordinates": [
                    20.96737,
                    -89.59258
                ]
            },
            "destination": {
                "id": "KemaGasES13354",
                "city": "Cancun",
                "state": "ROO",
                "officialName": "Estacion Cancun, Q.Roo",
                "stationCode": "MXCUNPMXTAD",
                "coordinates": [
                    21.1619,
                    -86.8515
                ]
            },
            "catalog": {
                "routeId": "0025gph0yle2lq_611-612",
                "kmsClient": 352,
                "kmsGoogleMaps": 378,
                "varianceKm": 26,
                "estimatedTransitMinutes": 476,
                "pricingModel": "volume",
                "fixedRates": [
                    {}
                ]
            }
        },
        "shipments": [
            {
                "shipmentId": "640632",
                "date": 0,
                "loadDate": 1765346400,
                "loadDateIso": "2025-12-10T02:00:00.000Z",
                "offloadDate": 1765368000,
                "offloadDateIso": "2025-12-10T08:00:00.000Z",
                "loadTemp": "22.5 C",
                "offloadTemp": "23.1 C",
                "region": "MX",
                "vehicle": "FZS3656_1",
                "status": 3,
                "rawStatus": 3,
                "statusLabel": "Descargado",
                "operationalStatus": {
                    "code": 2,
                    "label": "Descargado",
                    "physical": "Descargado",
                    "billing": "Facturado",
                    "isFacturado": false,
                    "isDescargado": true,
                    "isCargado": false
                },
                "fleet": {
                    "vehicle": "FZS3656_1",
                    "isFullDoubleTrailer": true,
                    "trailerType": "FULL_DOBLE_SEMIREMOLQUE",
                    "trailerDesignation": "REMOLQUE_1",
                    "sharedIdFinan": "1771848000000_6cfb1"
                },
                "timing": {
                    "cycleTimeHours": 41.5,
                    "catalogDrivingHours": 8.4,
                    "terminalAndRestHours": 33.1
                },
                "pricing": {
                    "merchandiseValue": 0,
                    "pricingModel": "volume",
                    "tarifUnit": 0.6282,
                    "toll": 2500,
                    "billedFreight": 26785.72,
                    "totalFreight": 26785.72,
                    "invoiceAllocation": {
                        "linkedInvoiceId": "1771848000000_6cfb1",
                        "linkedInvoiceFolio": "FAC-901",
                        "linkedInvoiceTotalMxn": 53571.44,
                        "shipmentFreightMxn": 26785.72,
                        "shareOfInvoicePct": 50,
                        "coveredShipmentsCount": 2,
                        "isConsolidatedInvoice": true
                    }
                },
                "volumes": {
                    "unit": "LTR",
                    "unitDescription": "Litros",
                    "loaded": 42637,
                    "offloaded": 42550,
                    "shrinkageVolume": 87,
                    "shrinkagePercent": 0.204,
                    "isGain": false,
                    "gainVolume": 0,
                    "gainPercent": 0,
                    "anomalyType": "NORMAL_DENTRO_DE_TOLERANCIA",
                    "anomalyMessage": "Merma de 87 L (0.204%) dentro de tolerancia contractual de 0.00%.",
                    "toleranceThresholdPct": 0,
                    "exceedsTolerance": false,
                    "excessLossVolume": 0,
                    "estimatedFreightDeduction": 0,
                    "estimatedMerchandiseDeduction": 0,
                    "estimatedTotalDeduction": 0,
                    "estimatedDeduction": 0,
                    "officialPenaltyMxn": 0,
                    "products": [
                        {
                            "desc": "Gasolina regular menor a 91 octanos",
                            "code": "15101514",
                            "unit": "LTR",
                            "loaded": 29845.9,
                            "offloaded": 29845.9
                        }
                    ]
                }
            }
        ],
        "financialLinked": {
            "id": "1771848000000_6cfb1",
            "status": {
                "code": 4,
                "label": "Facturado"
            },
            "total": 26785.72,
            "invoiceFolio": "202500384",
            "invoiceUuid": "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"
        }
    }
    Built with