> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 3: Track Actual Fuel Consumption

> Record fuel recharges for carrier-level Scope 1 accuracy, with support for multiple fuel types and electric vehicles

## Understanding Fuel Consumption in GLEC

By default, GLEC calculates transport emissions using **TOC-level WTW factors** (default emission factors per vehicle type). For carriers operating their own fleet, recording **actual fuel consumption** (recharges) provides a more accurate picture of Scope 1 emissions and allows comparison between default and measured intensity values.

```
┌──────────────────────────────────────────────────────────────────────────────┐
│                    FUEL CONSUMPTION IN GLEC                                  │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  Default (TOC factors)              Actual (Fuel Recharges)                 │
│  ─────────────────────              ───────────────────────                 │
│  CO2e = tkm × WTW factor           CO2e = fuel qty × fuel EF              │
│  Uses average fleet values          Uses real consumption data             │
│  Quick, requires no fuel data       More accurate, requires fuel records   │
│                                                                              │
│  Both approaches coexist:                                                   │
│  • Transport legs always use TOC WTW for per-leg CO2e                      │
│  • Fuel recharges provide actual Scope 1 data for the company report       │
│  • The GLEC report compares both to show data quality                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
```

<Note>
  **When to track fuel consumption**

  Fuel recharges are most relevant for **carriers** (logistics service providers) who:

  * Operate their own fleet and have access to fuel card data
  * Need carrier-level Scope 1 accuracy (actual vs. estimated)
  * Want to calculate measured intensity values per vehicle/TOC
  * Are reporting under GLEC's "enhanced" reporting level

  **Shippers** typically don't need this step — they rely on TOC default factors for Scope 3 reporting.
</Note>

## Prerequisites

Before starting, ensure you have:

* Dcycle API credentials ([get them here](/docs/quickstart#step-1-get-your-api-key))
* Fuel consumption records: fuel type, quantity, date, and optionally vehicle plate
* Transport legs already uploaded ([Step 1](/guides/emissions/glec-step-1-transport-operations))

## Understanding Fuel Types

Each fuel type in the GLEC database has three emission factors:

| Factor  | Full Name     | Scope   | Description                        |
| ------- | ------------- | ------- | ---------------------------------- |
| **TTW** | Tank-to-Wheel | Scope 1 | Direct combustion emissions        |
| **WTT** | Well-to-Tank  | Scope 3 | Upstream fuel production emissions |
| **WTW** | Well-to-Wheel | Total   | TTW + WTT combined                 |

### Supported Fuel Types

<Tabs>
  <Tab title="Fossil Fuels">
    | Fuel                | Description                       | Typical Use                |
    | ------------------- | --------------------------------- | -------------------------- |
    | Diesel / Gas oil    | Standard road diesel              | Trucks, vans               |
    | CNG                 | Compressed natural gas            | Urban fleets               |
    | LNG                 | Liquefied natural gas             | Long-haul trucks, maritime |
    | LPG                 | Liquefied petroleum gas           | Light commercial vehicles  |
    | HFO                 | Heavy fuel oil                    | Maritime vessels           |
    | MGO / MDO           | Marine gasoil / Marine diesel oil | Maritime vessels           |
    | Jet fuel (kerosene) | Aviation fuel                     | Air cargo                  |
  </Tab>

  <Tab title="Biofuels & Alternatives">
    | Fuel                  | Description                    | Typical Use                |
    | --------------------- | ------------------------------ | -------------------------- |
    | HVO                   | Hydrotreated vegetable oil     | Drop-in diesel replacement |
    | Biodiesel (B20, B100) | Fatty acid methyl ester blends | Blended or pure            |
    | Bio-CNG               | Biomethane (compressed)        | Urban fleets               |
    | Bio-LNG               | Biomethane (liquefied)         | Long-haul, maritime        |

    <Tip>
      Biofuels typically have lower WTW factors than fossil equivalents. Using HVO or biodiesel directly reduces your company's emission intensity.
    </Tip>
  </Tab>

  <Tab title="Electricity">
    For **electric vehicles**, emissions depend on the electricity grid:

    **CO2e = kWh consumed x Grid emission factor (kgCO2e/kWh)**

    Grid factors vary by country and are updated annually. Dcycle selects the appropriate grid factor based on the vehicle's `origin_country`.

    For hubs with `supercharger: true`, on-site charging energy is included in the hub's Scope 2 emissions via facility invoices.
  </Tab>
</Tabs>

### Regional Emission Factors

Fuel emission factors vary by region. Dcycle stores factors per fuel per region:

| Region        | Code  | Countries                                 |
| ------------- | ----- | ----------------------------------------- |
| Europe        | `EU`  | EU member states, UK, Switzerland, Norway |
| North America | `NA`  | USA, Canada, Mexico, Australia            |
| South America | `SA`  | Brazil, Argentina, Chile, Colombia, etc.  |
| Asia          | `AS`  | China, India, Japan, South Korea, etc.    |
| Africa        | `AF`  | All African countries                     |
| Oceania       | `OC`  | Pacific island nations                    |
| Global        | `GLO` | Default fallback                          |

## Step 3.1: Upload Fuel Recharges via CSV

Fuel consumption data is typically uploaded in bulk via CSV through the legacy upload endpoint:

<Accordion title="📋 Data Map: Fuel Recharges CSV">
  | Column                  | Type   | Required | Description                            | Example                      |
  | ----------------------- | ------ | -------- | -------------------------------------- | ---------------------------- |
  | `fuel_type`             | string | Yes      | Fuel name (matched via fuzzy/regex)    | `"Diesel"`, `"GNC"`, `"HVO"` |
  | `quantity`              | number | Yes      | Fuel quantity consumed                 | `150.5`                      |
  | `date`                  | date   | Yes      | Date of recharge                       | `"2025-03-15"`               |
  | `vehicle_license_plate` | string | No       | Vehicle plate for per-vehicle tracking | `"1234-ABC"`                 |
  | `country`               | string | No       | Country code for regional factors      | `"ES"`                       |

  **Where to get this data:**

  * **Fuel cards**: Most fleet fuel card providers export CSV with fuel type, quantity, date, and vehicle plate
  * **ERP/TMS**: Transport management systems often track fuel consumption per vehicle
  * **Manual records**: For smaller fleets, daily fuel logs
</Accordion>

### CSV Format

```csv theme={"theme":{"light":"github-light","dark":"github-dark"}}
fuel_type,quantity,date,vehicle_license_plate,country
Diesel,150.5,2025-03-01,1234-ABC,ES
Diesel,200.0,2025-03-01,5678-XYZ,ES
GNC,80.0,2025-03-02,9012-DEF,ES
HVO,175.0,2025-03-03,1234-ABC,ES
Electricidad,45.0,2025-03-03,3456-GHI,ES
```

### Upload Process

<CodeGroup>
  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import requests
  import os

  headers = {
      "Authorization": f"Bearer {os.getenv('DCYCLE_API_KEY')}",
      "Content-Type": "application/json",
      "x-organization-id": os.getenv("DCYCLE_ORG_ID"),
      "x-partner": os.getenv("DCYCLE_PARTNER_ID"),
  }

  # Step 1: Get presigned URL for recharges file
  upload_body = {
      "recharges_file_name": "march_2025_fuel_recharges.csv",
  }

  upload_response = requests.post(
      "https://api.dcycle.io/logistics/upload",
      headers=headers,
      json=upload_body,
  ).json()

  recharges_url = upload_response["recharges"]["upload_url"]
  file_id = upload_response["recharges"]["file_id"]

  # Step 2: Upload CSV to S3
  with open("march_2025_fuel_recharges.csv", "rb") as f:
      requests.put(recharges_url, data=f)

  print(f"Uploaded. File ID: {file_id}")

  # Step 3: Check processing status
  import time

  while True:
      status_response = requests.get(
          "https://api.dcycle.io/logistics/status",
          headers=headers,
      ).json()
      # Check file status
      print(f"Status: {status_response}")
      time.sleep(5)
      break  # Replace with actual status check logic
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const axios = require('axios');

  const headers = {
    Authorization: `Bearer ${process.env.DCYCLE_API_KEY}`,
    'Content-Type': 'application/json',
    'x-organization-id': process.env.DCYCLE_ORG_ID,
    'x-partner': process.env.DCYCLE_PARTNER_ID,
  };

  // Step 1: Get presigned URL for recharges file
  const uploadBody = {
    recharges_file_name: 'march_2025_fuel_recharges.csv',
  };

  const { data: uploadResponse } = await axios.post(
    'https://api.dcycle.io/logistics/upload',
    uploadBody,
    { headers }
  );

  const rechargesUrl = uploadResponse.recharges.upload_url;
  const fileId = uploadResponse.recharges.file_id;

  // Step 2: Upload CSV to S3
  const fs = require('fs');
  const csvData = fs.readFileSync('march_2025_fuel_recharges.csv');
  await axios.put(rechargesUrl, csvData);

  console.log(`Uploaded. File ID: ${fileId}`);
  ```
</CodeGroup>

<Note>
  **Fuel name matching**: Dcycle uses pattern matching to map fuel names from your CSV to standard fuel types. Common mappings include:

  * `"Diesel"`, `"Gasoleo"`, `"Gas Oil"` → Diesel
  * `"GNC"`, `"CNG"` → Compressed natural gas
  * `"GNL"`, `"LNG"` → Liquefied natural gas
  * `"HVO"` → Hydrotreated vegetable oil
  * `"Electricidad"`, `"Electricity"` → Grid electricity

  If a fuel name cannot be matched, it will appear as an error in the upload results.
</Note>

## Step 3.2: Check Upload Errors

After uploading, check for any rows that failed to process:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
file_id = "your-file-id"

# Get recharge upload errors
errors = requests.get(
    f"https://api.dcycle.io/logistics/errors/recharges/{file_id}",
    headers=headers,
    params={"page": 1, "size": 50},
).json()

if errors["items"]:
    print(f"Errors found: {len(errors['items'])}")
    for error in errors["items"]:
        print(f"  Row {error['row']}: {error['error']}")
else:
    print("All records processed successfully")
```

### Common Upload Errors

| Error                  | Cause                               | Fix                                         |
| ---------------------- | ----------------------------------- | ------------------------------------------- |
| Unrecognized fuel type | Fuel name doesn't match any pattern | Use standard names (Diesel, GNC, HVO, etc.) |
| Invalid quantity       | Non-numeric or negative value       | Ensure quantity is a positive number        |
| Invalid date           | Date format not recognized          | Use YYYY-MM-DD format                       |
| Missing required field | Empty fuel\_type or quantity        | Fill in all required columns                |

## Step 3.3: Electric Vehicles

For electric vehicles, emissions are calculated using the grid emission factor and the vehicle's **energy efficiency factor (EEF)**:

**CO2e = tkm x grid\_ef (kgCO2e/kWh) x EEF (kWh/tkm)**

Where:

* **grid\_ef**: Country-specific electricity grid emission factor, updated annually
* **EEF**: Energy efficiency factor specific to the TOC (how many kWh per tonne-kilometer)

Electric vehicle recharges are tracked as electricity consumption (kWh) in the recharges CSV:

```csv theme={"theme":{"light":"github-light","dark":"github-dark"}}
fuel_type,quantity,date,vehicle_license_plate,country
Electricity,45.0,2025-03-03,3456-EV,ES
Electricity,52.0,2025-03-04,3456-EV,ES
```

<Tip>
  **Hub superchargers**: If your hub has a `supercharger: true`, on-site EV charging energy is captured through the hub's linked Facility invoices (Scope 2). This avoids double-counting with recharges.
</Tip>

## How Fuel Data Appears in the GLEC Report

In the [GLEC Company Report](/guides/emissions/glec-step-4-reports), fuel consumption data enriches the Scope 1 breakdown:

* **Scope 1 (TTW)**: Actual fuel combustion emissions from recharges (direct emissions from your fleet)
* **Scope 3 (WTT)**: Upstream fuel production emissions calculated from recharge quantities
* **Intensity Values**: Measured IV per TOC (actual kgCO2e/tkm) compared to default TOC WTW factors
* **Emission factors used**: The report lists all fuel types and their WTT/TTW/WTW factors applied

```
GLEC Company Report — Emission Factors Used
─────────────────────────────────────────────
Fuel: Diesel (EU)
  WTT: 0.610 kgCO2e/liter
  TTW: 2.680 kgCO2e/liter
  WTW: 3.290 kgCO2e/liter

Fuel: HVO (EU)
  WTT: 0.340 kgCO2e/liter
  TTW: 0.000 kgCO2e/liter (biogenic)
  WTW: 0.340 kgCO2e/liter
```

## Best Practices

### 1. Upload Monthly

Upload fuel recharges monthly to keep your GLEC report current and to detect trends early.

### 2. Include Vehicle Plates

Always include `vehicle_license_plate` when available. This enables:

* Per-vehicle emission tracking
* Matching recharges to specific TOCs
* Identifying the most and least efficient vehicles in your fleet

### 3. Match Countries Accurately

Ensure the `country` in your recharges CSV matches the country where fuel was purchased — this determines which regional emission factors are applied.

### 4. Reconcile with Transport Legs

Compare total fuel consumed (from recharges) against expected consumption (from transport leg tkm x TOC factors) to identify data quality issues.

## Next Steps

<CardGroup cols={2}>
  <Card title="Step 4: GLEC Reports" icon="chart-pie" href="/guides/emissions/glec-step-4-reports">
    Generate your company report with actual fuel data included
  </Card>

  <Card title="Step 1: Transport Operations" icon="truck" href="/guides/emissions/glec-step-1-transport-operations">
    Review transport leg creation to ensure TOC matching
  </Card>
</CardGroup>
