Transport Units

Complete lifecycle management for transport units — from entry registration through weighing, inspection, and exit clearance with full evidence chains.

Last updated: 2025-02-18

Transport Units

Transport units are the central entity in Certexi's customs workflow. Each unit represents a vehicle, container, or shipment moving through the facility's clearance process.

certexi.com/app/workflow/kanban
Loading interactive demo...

4-stage Kanban — Aduana, Bascula, Carga, Salida. Drag cards to advance transport units.

Lifecycle

Every transport unit follows a defined lifecycle from creation to completion:

Loading diagram…

Transport Unit Card

<Card className="w-72">
  <CardHeader className="pb-2">
    <div className="flex items-center justify-between">
      <CardTitle className="text-sm font-mono">TU-2025-00042</CardTitle>
      <Badge className="bg-amber-500 text-white text-[10px]">Urgent</Badge>
    </div>
    <CardDescription>Import — Monterrey Hub</CardDescription>
  </CardHeader>
  <CardContent className="space-y-2">
    <div className="grid grid-cols-2 gap-2 text-xs">
      <div>
        <span className="text-muted-foreground">Stage</span>
        <div className="font-medium mt-0.5">Bascula</div>
      </div>
      <div>
        <span className="text-muted-foreground">Operator</span>
        <div className="font-medium mt-0.5">C. Mendez</div>
      </div>
      <div>
        <span className="text-muted-foreground">Type</span>
        <div className="font-medium mt-0.5">Container 40ft</div>
      </div>
      <div>
        <span className="text-muted-foreground">Time in stage</span>
        <div className="font-medium mt-0.5">12 min</div>
      </div>
    </div>
    <div className="space-y-1">
      <div className="flex justify-between text-xs">
        <span className="text-muted-foreground">Evidence</span>
        <span>4/6 items</span>
      </div>
      <Progress value={67} className="h-1.5" />
    </div>
    <div className="flex gap-1 pt-1">
      <Button size="sm" variant="outline" className="flex-1 text-xs h-7">History</Button>
      <Button size="sm" className="flex-1 text-xs h-7">Advance</Button>
    </div>
  </CardContent>
</Card>

Data Model

FieldTypeDescription
idserialAuto-increment primary key
tu_idtextHuman-readable ID (e.g., TU-2025-00042)
typeenumcontainer, truck, trailer, railcar
operationenumimport, export, transit
current_stageenumaduana, bascula, supervisor, salida, completed, hold
priorityenumnormal, urgent, critical
assigned_operatortextCurrent operator reference
entry_weight_kgnumberGross weight at entry
exit_weight_kgnumberTare weight at exit
net_weight_kgcomputedentry - exit weight
seal_numbertextCustoms seal identifier
created_attimestampCreation time
completed_attimestampCompletion time (nullable)

Stage Requirements

Each stage has specific evidence requirements that must be met before the unit can advance:

Entry (Aduana)

RequirementTypeRequired
NFC tag scanScanYes
License plate photoPhotoYes
Seal number verificationTextYes
Driver IDTextYes
Documentation checkBooleanYes

Weighing (Bascula)

RequirementTypeRequired
Scale readingNumber (kg)Yes
Weight certificate photoPhotoYes
Calibration verificationBooleanYes

Inspection (Supervisor)

RequirementTypeRequired
Physical inspection photosPhoto (2+)Yes
Inspection notesTextYes
Seal integrity checkBooleanYes
Supervisor approvalSignatureYes

Exit (Salida)

RequirementTypeRequired
Exit weightNumber (kg)Yes
Seal verificationBooleanYes
Final approvalSignatureYes
Exit gate photoPhotoOptional

Weight Verification

<Card className="w-80">
  <CardHeader className="pb-2">
    <CardTitle className="text-sm">Weight Verification</CardTitle>
    <CardDescription>TU-2025-00042</CardDescription>
  </CardHeader>
  <CardContent className="space-y-3">
    <div className="grid grid-cols-3 gap-2 text-center">
      <div className="p-2 rounded bg-muted">
        <div className="text-lg font-bold">24,500</div>
        <div className="text-[10px] text-muted-foreground">Entry (kg)</div>
      </div>
      <div className="p-2 rounded bg-muted">
        <div className="text-lg font-bold">8,200</div>
        <div className="text-[10px] text-muted-foreground">Exit (kg)</div>
      </div>
      <div className="p-2 rounded bg-green-500/10">
        <div className="text-lg font-bold text-green-600">16,300</div>
        <div className="text-[10px] text-muted-foreground">Net (kg)</div>
      </div>
    </div>
    <div className="flex items-center justify-between text-xs">
      <span className="text-muted-foreground">Tolerance</span>
      <Badge variant="outline">Within 0.5%</Badge>
    </div>
    <Alert>
      <AlertTitle className="text-xs">Verification Passed</AlertTitle>
      <AlertDescription className="text-xs">Net weight within expected range for declared goods.</AlertDescription>
    </Alert>
  </CardContent>
</Card>

API Endpoints

EndpointMethodDescription
/api/whms/transport-unitsGETList all transport units
/api/whms/transport-units/:idGETGet transport unit details
/api/whms/transport-unitsPOSTCreate a new transport unit
/api/whms/transport-units/:id/advancePOSTAdvance to next stage
/api/whms/transport-units/:id/holdPOSTPlace on hold
/api/whms/transport-units/:id/releasePOSTRelease from hold