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

List Shipments (Trips)

GET
/api/shipments
Returns a paginated list of trip/shipment documents for the authenticated tenant.
Each document represents a freight trip and includes:
Origin and Destination locations with SAT-coded municipality and region keys.
Assigned driver and vehicle towing configuration.
Shipment legs with loaded vs offloaded volumetric measurements and industry-standard shrinkage tolerance analysis.
Cross-linked financial reference (idFinan, nCed, nRel).
Supports two detail levels via the detail query parameter:
summary (default): Aggregates loaded/offloaded volumes, calculates net merma/shrinkage,
flags tolerance violations (>0.00%), and automatically cross-links invoice status and balance.
full: Returns the raw MongoDB document with all internal trip logs and 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 shipment trips list and pagination metadata.
Encabezados

Bodyapplication/json

🟠400BadRequest
🟠401Unauthorized
🟠403Forbidden
🟠429TooManyRequests
🔴500InternalServerError
Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location 'https://api.dufrei.com/api/shipments?limit=&page=&client=&shipmentId=&startDate=&endDate=&loadStartDate=&loadEndDate=&offloadStartDate=&offloadEndDate=&dateFilterBy=&status=&detail=' \
--header 'x-api-key: <api-key>'
Respuesta Ejemplo de Respuesta
200 - Concise trip & shrinkage summary (detail=summary)
{
    "meta": {
        "total": 85,
        "page": 1,
        "limit": 50,
        "tenant": "XAXX010101000",
        "detail": "summary"
    },
    "data": [
        {
            "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"
                },
                "destination": {
                    "id": "KemaGasES13354",
                    "city": "Cancun",
                    "state": "ROO"
                }
            },
            "shipments": [
                {
                    "shipmentId": "640632",
                    "date": 260223,
                    "region": "MX",
                    "vehicle": "FZS3656_1",
                    "status": 4,
                    "pricing": {
                        "merchandiseValue": 0,
                        "pricingModel": "volume",
                        "tarifUnit": 0.6282,
                        "toll": 0,
                        "billedFreight": 26785.72,
                        "totalFreight": 0
                    },
                    "volumes": {
                        "loaded": 42637,
                        "offloaded": 42550,
                        "shrinkageVolume": 87,
                        "shrinkagePercent": 0.204,
                        "exceedsTolerance": false,
                        "products": [
                            {
                                "desc": "Gasolina regular menor a 91 octanos",
                                "code": "15101514",
                                "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"
            }
        }
    ]
}
Modificado en 2026-09-20 15:05:35
Anterior
Discounts, Demurrage & Shrinkage Recovery Audit
Siguiente
Audit Fleet Utilization and Productivity
Built with