1. 4. Shipments & Fleet
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)
        GET
      • Audit Fleet Utilization and Productivity
        GET
      • Audit Dispatch-to-Bill and Invoicing Efficiency
        GET
      • Freight Financial Unit Economics ($/km, $/L)
        GET
    • 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. 4. Shipments & Fleet

Freight Financial Unit Economics ($/km, $/L)

GET
/api/unit-economics
Computes revenue and net margins per kilometer and per delivered liter, comparing Full double-trailer vs Sencillo efficiency.

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 financial unit economics calculation.
Encabezados

Bodyapplication/json

🟠401Unauthorized
🟠429TooManyRequests
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/api/unit-economics?client=&startDate=&endDate=&minTrips=&limit=' \
--header 'x-api-key: <api-key>'
Respuesta Ejemplo de Respuesta
200 - Ejemplo 1
{
    "meta": {
        "tenant": "string",
        "totalTripsAudited": 0
    },
    "fleetEconomics": {
        "totalTripsCount": 0,
        "totalGrossFreightMxn": 0,
        "totalTollsMxn": 0,
        "totalNetMarginMxn": 0,
        "totalKilometers": 0,
        "totalDeliveredLiters": 0,
        "totalDeliveredWeightKg": 0,
        "grossRevenuePerKmMxn": 0,
        "tollExpensePerKmMxn": 0,
        "netMarginPerKmMxn": 0,
        "grossRevenuePerLiterMxn": 0,
        "netMarginPerLiterMxn": 0,
        "tollBurdenPct": 0
    },
    "configurationComparison": {
        "fullDoubleTrailer": {},
        "sencillo": {},
        "economicAdvantageOfFull": {}
    },
    "topCorridorsByNetPerKm": [
        {}
    ],
    "bottomCorridorsByNetPerKm": [
        {}
    ]
}
Modificado en 2026-09-20 15:05:35
Anterior
Audit Dispatch-to-Bill and Invoicing Efficiency
Siguiente
SAT CFDI 4.0 Monthly Fiscal Ledger & Retention Reconciliation
Built with