SQUAKE Integration Docs
  • πŸƒOverview
  • βœ‰οΈContact form
  • ⚠️Incident form
  • πŸ—„οΈCalculation API Examples
    • 🌐Travel
      • πŸ›ŒAccommodation
        • Accommodation: SQUAKE
      • 🚌Bus
        • Bus: SQUAKE
        • Bus: DEFRA πŸ‡¬πŸ‡§
      • πŸš—Car
        • Car: ACRISS
        • Car: DEFRA πŸ‡¬πŸ‡§
        • Car: EEA πŸ‡ͺπŸ‡Ί
        • Car: EPA πŸ‡ΊπŸ‡Έ
      • 🀝Event
        • Event: HCMI & CHSB
      • ⛴️Ferry
        • Ferry: ADEME πŸ‡«πŸ‡·
      • ✈️Flight
        • Flight: ADEME πŸ‡«πŸ‡·
        • Flight: Base Empreinte πŸ‡«πŸ‡·
        • Flight: CO2 emissiefactoren πŸ‡³πŸ‡±
        • Flight: DEFRA πŸ‡¬πŸ‡§
        • Flight: EPA πŸ‡ΊπŸ‡Έ
        • Flight: GATE4
        • Flight: ICAO
        • Flight: TIM
        • Flight: TU Chalmers πŸ‡ΈπŸ‡ͺ
      • 🏨Hotel
        • Hotel: DEFRA πŸ‡¬πŸ‡§
        • Hotel: HCMI & CHSB
        • Hotel: SQUAKE
      • πŸš†Train
        • Train: ADEME πŸ‡«πŸ‡·
        • Train: Base Empreinte πŸ‡«πŸ‡·
        • Train: CO2-emissiefactoren πŸ‡³πŸ‡±
        • Train: DEFRA πŸ‡¬πŸ‡§
        • Train: SQUAKE
    • πŸ“¦Logistics
      • ✈️Air Freight
        • Air Freight: DIN EN 16258
        • Air Freight: GLEC
      • πŸ›₯️Inland Waterways
        • Inland Waterways: GLEC
      • 🚧Logistics Site
        • Logistics Site: GLEC
      • 🚈Rail Freight
        • Rail Freight: DIN EN 16258
        • Rail Freight: ECTA
        • Rail Freight: GLEC
      • 🚚Road Freight
        • Road Freight: DIN EN 16258
        • Road Freight: GLEC
      • 🚒Sea Freight
        • Road Freight: Clean Cargo
        • Road Freight: DIN EN 16258
        • Road Freight: EMSA πŸ‡ͺπŸ‡Ί
        • Road Freight: GLEC
      • πŸš›Van
        • Van: EEA πŸ‡ͺπŸ‡Ί
  • πŸ†•Notable Changes
    • πŸ“ŠCalculation Changes
      • Events according to HCMI - 2024 updates
      • Train according to CO2 emissiefactoren - energy scope inclusion
      • Train: SQUAKE - April 2025 Update
      • Bus & Train According to DEFRA are Now Available
      • Base Empreinte for Flights and Trains Now Live
      • TIM Transition to Version 2.0
      • TIM & DEFRA: Distance Changes
      • Airline Code Support Update - December 2024
      • GLEC v3.1
      • Car: DEFRA is Now Available
      • Hotel: DEFRA is Now Available
      • Hotel: HCMI - 2024 Updates
      • Accommodation - September 2024 Updates
      • Bus: SQUAKE - September 2024 Update
      • Flight: DEFRA - July 2024 Update
      • GATE4 Methodology is Now Available
      • GLEC, ECTA, and CLEAN-CARGO November 2023 Update
      • Flight: ICAO v13 - July 2024 Update
      • TIM v1.3
      • Train: SQUAKE - August 2024 Update
  • πŸ’‘Use Cases
    • Fulfillment with API
    • Fulfillment with Self-Checkout
    • Webhooks
    • Webhooks API Reference
  • πŸ•΅οΈAudits
    • Retrieve the list of Audit logs
    • Retrieve a specific Audit log
  • πŸ§‘β€πŸ’»Migration Guide
    • From v1 to v2
  • ❓Sustainability FAQs
Powered by GitBook
On this page
  • Perform a Calculation
  • POST /v2/calculations
  • application/json
  • Generic API Request Sample:
  • Generic API Response Sample:

Was this helpful?

  1. Calculation API Examples

Logistics

The logistics sector plays a crucial role in the movement of goods and materials worldwide. However, the transportation and delivery of products often come with a significant carbon footprint. Whether it's road freight, shipping, or air cargo, logistics activities contribute to global greenhouse gas emissions, making it essential to calculate and mitigate their impact. By understanding the emissions produced by various logistics activities, companies can make informed decisions to improve their sustainability and reduce their environmental impact.

Calculating the carbon emissions for logistics activities requires considering factors such as the type of transportation, distance traveled, and fuel type. Accurate measurement enables businesses to identify carbon reduction opportunities, optimize their supply chain, and contribute to global carbon reduction efforts.

Perform a Calculation

POST /v2/calculations

Bearer auth

The calculations endpoint can calculate carbon emissions for one or multiple activities. The carbon footprint of your logistics operations, such as multiple freight journeys or combined land and sea shipments, can be computed all at once by passing all relevant activities in the "items" array. Include the string literal "items" in the "expand" array to retrieve values for each item separately in addition to the total carbon quantity.

This is a low-latency endpoint. SQUAKE does not provide you with a unique identifier for any calculation results. You must quote a price on the pricing endpoint to purchase compensation for your carbon emissions.

Some data sets are extensive and thus documented separately here.

application/json

Body

  • expand array[string]: If you choose to expand on e.g., "items", SQUAKE returns emissions for each item separately (in addition to a total value).

    • Value is items.

  • carbon_unit string: SQUAKE uses The International System of Units (SI), commonly referred to as "metric system".

    • Values are tonne, kilogram, or gram.

  • distance_unit string: SQUAKE uses common distance units.

    • Values are meter, kilometer, feet, mile, or nautical_mile. Default value is kilometer.

Generic API Request Sample:

{
  "expand": [
    "items"
  ],
  "carbon_unit": "tonne",
  "distance_unit": "kilometer",
  "items": [
    {
      "type": "road_freight",
      "external_reference": "Truck",
      "origin": "Magdeburg, Germany",
      "destination": "DEHAM",
      "weight_in_tonnes": 0.75,
      "fuel_type": "diesel",
      "energy_scope": "wtw",
      "truck_type": "rigid_truck_under_26_gvw",
      "temperature_controlled_freight": true,
      "methodology": "GLEC"
    },
    {
      "type": "logistics_site",
      "external_reference": "Hub",
      "weight_in_tonnes": 0.75,
      "logistics_site_type": "transhipment_site",
      "methodology": "GLEC"
    },
    {
      "type": "sea_freight",
      "external_reference": "Sea",
      "origin": "DEHAM",
      "destination": "NLAMS",
      "weight_in_tonnes": 0.75,
      "cargo_type": "dry",
      "energy_scope": "wtw",
      "methodology": "CLEAN-CARGO"
    },
    {
      "type": "logistics_site",
      "external_reference": "Hub",
      "weight_in_tonnes": 0.75,
      "logistics_site_type": "storage_and_transhipment",
      "methodology": "GLEC"
    },
    {
      "type": "air_freight",
      "external_reference": "Air",
      "origin": "AMS",
      "destination": "JFK",
      "weight_in_tonnes": 0.75,
      "plane_type": "belly_freighter",
      "energy_scope": "wtw",
      "methodology": "GLEC"
    },
    {
      "type": "logistics_site",
      "external_reference": "Hub",
      "weight_in_tonnes": 0.75,
      "logistics_site_type": "warehouse",
      "methodology": "GLEC"
    },
    {
      "type": "road_freight",
      "external_reference": "Truck",
      "origin": "JFK",
      "destination": "Scranton, United States",
      "weight_in_tonnes": 0.75,
      "fuel_type": "diesel",
      "energy_scope": "wtw",
      "truck_type": "van_under_3.5_t",
      "temperature_controlled_freight": true,
      "methodology": "GLEC"
    }
  ]
}

Generic API Response Sample:

{
    "carbon_quantity": 4.570352,
    "carbon_unit": "tonne",
    "items": [
        {
            "carbon_quantity": 0.026645,
            "carbon_unit": "tonne",
            "external_reference": "Truck",
            "type": "road_freight",
            "methodology": "GLEC",
            "distance": 244.0,
            "distance_unit": "kilometer",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 26645,
                    "co2e_emissions_wtw_in_g": 26645,
                    "co2e_per_tonne_km_in_g": 130,
                    "tonne_km": 183,
                    "reporting_year": 2024,
                    "transportation_mode": "road_transportation"
                }
            }
        },
        {
            "carbon_quantity": 0.00165,
            "carbon_unit": "tonne",
            "external_reference": "Hub",
            "type": "logistics_site",
            "methodology": "GLEC",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 1650.0,
                    "co2e_per_tonne_in_g": 2200,
                    "reporting_year": 2024,
                    "transportation_mode": "logistics_site"
                }
            }
        },
        {
            "carbon_quantity": 0.004885,
            "carbon_unit": "tonne",
            "external_reference": "Sea",
            "type": "sea_freight",
            "methodology": "CLEAN-CARGO",
            "distance": 368.0,
            "distance_unit": "kilometer",
            "algorithm_specifics": {
                "algorithm_type": "clean_cargo",
                "data": {
                    "co2e_in_g": 4885,
                    "co2e_emissions_wtw_in_g": 4885,
                    "co2e_per_tonne_km_in_g": 17.7,
                    "tonne_km": 276,
                    "reporting_year": 2024,
                    "transportation_mode": "sea_transportation"
                }
            }
        },
        {
            "carbon_quantity": 0.003,
            "carbon_unit": "tonne",
            "external_reference": "Hub",
            "type": "logistics_site",
            "methodology": "GLEC",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 3000.0,
                    "co2e_per_tonne_in_g": 4000,
                    "reporting_year": 2024,
                    "transportation_mode": "logistics_site"
                }
            }
        },
        {
            "carbon_quantity": 4.353479,
            "carbon_unit": "tonne",
            "external_reference": "Air",
            "type": "air_freight",
            "methodology": "GLEC",
            "distance": 5978.0,
            "distance_unit": "kilometer",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 4353479,
                    "co2e_emissions_wtw_in_g": 4353479,
                    "co2e_per_tonne_km_in_g": 971,
                    "tonne_km": 4484,
                    "reporting_year": 2024,
                    "transportation_mode": "air_transportation"
                }
            }
        },
        {
            "carbon_quantity": 0.02475,
            "carbon_unit": "tonne",
            "external_reference": "Hub",
            "type": "logistics_site",
            "methodology": "GLEC",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 24750.0,
                    "co2e_per_tonne_in_g": 33000,
                    "reporting_year": 2024,
                    "transportation_mode": "logistics_site"
                }
            }
        },
        {
            "carbon_quantity": 0.155943,
            "carbon_unit": "tonne",
            "external_reference": "Truck",
            "type": "road_freight",
            "methodology": "GLEC",
            "distance": 228.0,
            "distance_unit": "kilometer",
            "algorithm_specifics": {
                "algorithm_type": "glec",
                "data": {
                    "co2e_in_g": 155943,
                    "co2e_emissions_wtw_in_g": 155943,
                    "co2e_per_tonne_km_in_g": 793,
                    "tonne_km": 171,
                    "reporting_year": 2024,
                    "transportation_mode": "road_transportation"
                }
            }
        }
    ]
}
PreviousTrain: SQUAKENextAir Freight

Last updated 7 months ago

Was this helpful?

πŸ—„οΈ
πŸ“¦