Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Overview

The logistics commands are designed for fleet operators and transport companies with high-volume data:
  • Requests (Viajes): Individual transport trips with origin, destination, and cargo
  • Recharges (Consumos): Vehicle fuel consumption records
  • Upload: Bulk CSV upload for both data types

Transport Requests

Transport requests represent individual trips or routes.

List Requests

dc logistics requests list

Filter Options

# By date range
dc logistics requests list --from 2024-01-01 --to 2024-12-31

# By vehicle
dc logistics requests list --vehicle <vehicle-id>

# By client
dc logistics requests list --client <client-id>

# By status
dc logistics requests list --status completed

Request Fields

FieldDescription
dateTrip date
vehicleVehicle plate or ID
originStarting point (address or hub)
destinationEnd point (address or hub)
distanceTotal distance (km)
weightCargo weight (kg)
tocType of cargo
clientClient identifier

Fuel Recharges

Track fuel consumption for your fleet.

List Recharges

dc logistics recharges list

Filter Options

# By vehicle
dc logistics recharges list --vehicle <vehicle-id>

# By date range
dc logistics recharges list --from 2024-01-01 --to 2024-12-31

# By fuel type
dc logistics recharges list --fuel diesel

Recharge Fields

FieldDescription
dateRefueling date
vehicleVehicle plate or ID
fuel_typeFuel type (diesel, gasoline, electric, etc.)
quantityAmount (liters or kWh)
odometerVehicle odometer reading

Bulk CSV Upload

The most efficient way to upload large amounts of logistics data.

Generate Templates

# Transport requests template
dc logistics upload --type requests --template

# Fuel recharges template
dc logistics upload --type recharges --template
This downloads a CSV template with the correct columns and example data.

Upload Data

# Upload transport requests
dc logistics upload viajes.csv --type requests

# Upload fuel recharges
dc logistics upload consumos.csv --type recharges

Template Format: Requests (Viajes)

date,vehicle_plate,origin,destination,distance_km,weight_kg,toc,client
2024-01-15,1234 ABC,Madrid,Barcelona,620,15000,general_cargo,ACME Corp
2024-01-15,1234 ABC,Barcelona,Valencia,350,12000,refrigerated,FreshFoods
2024-01-16,5678 DEF,Valencia,Madrid,350,8000,general_cargo,ACME Corp

Template Format: Recharges (Consumos)

date,vehicle_plate,fuel_type,quantity,odometer,station
2024-01-15,1234 ABC,diesel,85.5,125000,Repsol Madrid
2024-01-16,1234 ABC,diesel,92.0,125620,Cepsa Barcelona
2024-01-17,5678 DEF,diesel,120.0,89500,BP Valencia

Reference Data

List Clients

dc logistics clients list

List Types of Cargo (TOCs)

dc logistics tocs list
Common TOC types:
CodeDescription
general_cargoStandard goods
refrigeratedTemperature-controlled
hazardousDangerous goods
bulkBulk materials
containerContainerized cargo

Upload Workflow

1

Generate Template

Download the CSV template with correct columns:
dc logistics upload --type requests --template
2

Prepare Data

Fill the template with your data using Excel, LibreOffice, or any CSV editor.
  • Use consistent date formats (YYYY-MM-DD)
  • Match vehicle plates exactly as registered
  • Use hub codes or full addresses
3

Validate

Review the CSV for common issues:
  • Missing required fields
  • Invalid dates
  • Unknown vehicle plates
4

Upload

Upload the completed CSV:
dc logistics upload viajes.csv --type requests
5

Verify

Confirm the data was imported:
dc logistics requests list --from 2024-01-01

Error Handling

When uploads fail, the CLI provides detailed error information:
Upload failed: 3 errors found

Row 5: Unknown vehicle plate "9999 XYZ"
Row 12: Invalid date format "15/01/2024" (expected YYYY-MM-DD)
Row 18: Missing required field "destination"
Fix and retry: Correct the errors in your CSV and re-upload. Only rows with errors are rejected; valid rows are processed.

Integration Example

Automate daily data uploads from your TMS (Transport Management System):
#!/bin/bash
# daily_upload.sh

# Export from TMS (your custom script)
./export_tms_data.sh > /tmp/today_requests.csv

# Upload to Dcycle
dc logistics upload /tmp/today_requests.csv --type requests

# Verify
dc logistics requests list --from $(date +%Y-%m-%d) --format json

Next Steps