> For the complete documentation index, see [llms.txt](https://docs-integration.squake.earth/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-integration.squake.earth/api-calculations-request-response/logistics/rail-freight/rail-freight-din-en-16258.md).

# Rail Freight: DIN EN 16258

💡 **High-Level Description:**

DIN EN 16258 is a standard that addresses the methodology for the calculation and declaration of energy consumption and greenhouse gas (GHG) emissions related to transportation services. Within the sphere of rail freight, this standard plays a pivotal role in ensuring standardized, transparent, and accurate reporting of GHG emissions. Rail freight, as an essential segment of the transport industry, has distinctive energy consumption patterns and emission profiles.

DIN EN 16258 offers a comprehensive framework for the sector by considering various facets of rail freight operations. From the type of fuel used to the weight and type of goods transported, distance covered, and even the type of rail infrastructure in place, every variable has an impact on the overall carbon footprint. The methodology is particularly valued because it allows for consistency in reporting across the European Union, ensuring comparability and benchmarking among various rail operators. By following the stipulations and recommendations of DIN EN 16258, rail freight operators can derive clear, actionable insights on their environmental footprint and identify potential avenues for improvement.

## **Sample API Requests**

### A. Without audit mode (for pre-booking/quotes)

```json
{
  "expand": ["items"],
  "items": [
    {
      "audit": false,
      "type": "rail_freight",
      "external_reference": "test_1",
      "origin": "HAM",
      "destination": "BER",
      "weight_in_tonnes": 41,
      "methodology": "DIN-EN-16258",
      "energy_scope": "wtw"
    }
  ]
}
```

### B. With audit mode (for finalized/post-booking calculations)

```json
{
  "expand": ["items"],
  "audit_for": "<Auditable Entity ID>",
  "items": [
    {
      "audit": true,
      "type": "rail_freight",
      "external_reference": "test_1",
      "origin": "HAM",
      "destination": "BER",
      "weight_in_tonnes": 41,
      "methodology": "DIN-EN-16258",
      "energy_scope": "wtw"
    }
  ]
}
```

> **Note:** `audit_for` is optional. Provide when calculating on behalf of a specific Auditable entity; otherwise omit.

## **API Request Items**

* `"type"`: `"rail_freight"` (required)
* `"methodology"`: `"DIN-EN-16258"` (required)
* `"external_reference"`: A unique identifier that helps you link the resulting emissions to the requested item. Especially useful if multiple items are requested since SQUAKE cannot guarantee to keep the same order. The maximum length is 128 characters.
* `"origin"`: SQUAKE will try to resolve the origin/destination regardless of its format. Ideally, for addresses use the Post standard, for airports use IATA/ICAO code (format: `^[A-Z]{3,4}$`, e.g., `"MUC"`), for other locations used in trade and transportation use UN/LOCODE codes (format: `^[A-Z]{2}\W?[A-Z2-9]{3}$`, e.g., `"DEHAM"`). You can also pass lat/long (format: `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, e.g., `"+40.712,-74.006"`).
* `"destination"`: SQUAKE will try to resolve the origin/destination regardless of its format. Ideally, for addresses use the Post standard, for airports use IATA/ICAO code (format: `^[A-Z]{3,4}$`, e.g., `"MUC"`), for other locations used in trade and transportation use UN/LOCODE codes (format: `^[A-Z]{2}\W?[A-Z2-9]{3}$`, e.g., `"DEHAM"`). You can also pass lat/long (format: `^[-+]?\d{1,3}\.\d{1,10}\s?,\s?[-+]?\d{1,3}\.\d{1,10}$`, e.g., `"+40.712,-74.006"`).
* `"distance_in_km"`: Prioritized over `origin` and `destination`. If you don't have a `distance_in_km`, you can use `origin` and `destination` and the distance will be automatically resolved. If you pass both `distance_in_km` and `origin`/`destination`, then `distance_in_km` will be used.
* `"weight_in_tonnes"`: Numeric value.
* `"train_type"`: Values are `500t`, `1000t`, `1500t`, `2000t` Default value is `1000t`.
* `"fuel_type"`: Values are `electricity` and `diesel`. Default value is `diesel`.
* `"energy_scope"`: Values are `ttw` or `wtw`. Default value is `wtw`.
* `"audit"`: boolean (optional). Set to `true` to create immutable audit records for finalized calculations. Must be enabled for your account.

#### **Default values**

* `"train_type": "1000t"`
* `"fuel_type": "diesel"`
* `"energy_scope": "wtw"`

### **Sample API Response**

```json
{
    "carbon_quantity": 256789,
    "carbon_unit": "gram",
    "items": [
        {
            "carbon_quantity": 256789,
            "carbon_unit": "gram",
            "external_reference": "test_1",
            "type": "rail_freight",
            "methodology": "DIN-EN-16258",
            "distance": 292.0,
            "distance_unit": "kilometer",
            "algorithm_specifics": {
                "algorithm_type": "DIN-EN-16258",
                "data": {
                    "fuel_consumption_per_tonne_km": 1.5,
                    "fuel_to_co2": 3.14,
                    "train_type": "1000t",
                    "reporting_year": 2024,
                    "transportation_mode": "rail_transportation"
                }
            }
        }
    ]
}
```

### **Bibliography**

* Method for Calculating and Declaring Energy Consumption (2013, March). DIN EN 16258. <https://dx.doi.org/10.31030/1894795>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-integration.squake.earth/api-calculations-request-response/logistics/rail-freight/rail-freight-din-en-16258.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
