Get Logistics Recharges
Retrieve all logistics recharges (fuel consumptions) for your organization with pagination and filtering support.
New API: This endpoint is part of the new API architecture with improved design and maintainability.
Request
Your API key for authenticationExample: sk_live_1234567890abcdef
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Query Parameters
Page number to retrieveExample: 1
Number of items per page (1-100)Example: 50
Search by vehicle license plateExample: 1234-ABC
Filter by vehicle type(s)Example: vehicle_type=van_diesel&vehicle_type=rigid_truck
Filter by fuel UUID(s)Example: fuel_id=550e8400-e29b-41d4-a716-446655440000
Filter by vehicle license plate(s)Example: vehicle_license_plate=1234-ABC
Filter by source file UUID(s)Example: file_id=550e8400-e29b-41d4-a716-446655440000
Filter by recharge date >= (YYYY-MM-DD)Example: 2024-01-01
Filter by recharge date <= (YYYY-MM-DD)Example: 2024-12-31
Filter by creation date >= (YYYY-MM-DD)Example: 2024-01-01
Filter by creation date <= (YYYY-MM-DD)Example: 2024-12-31
Filter by recharge statusExample: active
Filter by project UUID (only recharges linked to this project)Example: a8315ef3-dd50-43f8-b7ce-d839e68d51fa
Response
Total number of logistics recharges matching the filters
Array of logistics recharge objectsShow Logistics Recharge Object
Unique identifier for the recharge
License plate of the vehicle
Type of vehicle (e.g., “van_diesel”)
Unit of measurement for the fuel quantity
CO2 equivalent emissions in kilograms
Timestamp when the recharge was created
Timestamp when the recharge was last updated
Example
curl -X GET "https://api.dcycle.io/v1/logistics/recharges?page=1&size=10&date_from=2024-01-01&date_until=2024-12-31" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
Successful Response
{
"page": 1,
"size": 10,
"total": 156,
"items": [
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"vehicle_license_plate": "1234-ABC",
"vehicle_type": "van_diesel",
"fuel_name": "Diesel B7",
"quantity": 45.5,
"unit": "liters",
"date": "2024-11-20",
"co2e": 120.35,
"created_at": "2024-11-21T08:30:00Z",
"updated_at": "2024-11-21T08:30:00Z"
},
{
"id": "a12bc34d-56ef-7890-ghij-klmnopqrstuv",
"vehicle_license_plate": "5678-XYZ",
"vehicle_type": "rigid_truck_7.5_12_t_gvw_average_diesel",
"fuel_name": "Diesel B7",
"quantity": 120.0,
"unit": "liters",
"date": "2024-11-19",
"co2e": 317.52,
"created_at": "2024-11-20T14:15:00Z",
"updated_at": "2024-11-20T14:15:00Z"
}
]
}
Common Errors
401 Unauthorized
Cause: Missing or invalid API key
{
"detail": "Invalid API key",
"code": "INVALID_API_KEY"
}
Solution: Verify your API key is valid and active. Get a new one from Settings → API.
422 Validation Error
Cause: Invalid filter parameters
{
"detail": [
{
"loc": ["query", "size"],
"msg": "ensure this value is less than or equal to 100",
"type": "value_error"
}
]
}
Solution: Ensure page is a positive integer and size is between 1 and 100. Date parameters must use YYYY-MM-DD format.
Get Logistics Requests
Retrieve logistics shipment requests
Delete Recharge
Delete a single recharge record
Batch Delete Recharges
Delete multiple recharges at once
Generate Report
Generate ISO 14083 emissions report