Car: BASIC

Calculate car emissions from data you already have: the vehicle's emission rate in gCOâ‚‚/km, or its energy or fuel consumption together with the fuel type.

type carmethodology BASICSupports audit mode

BASIC is a transparent, input-driven calculator for simple, traceable calculations where the data comes from your own measurements, OEM specs or a trusted dataset. It doesn't infer vehicle classes or apply default factors. It relies on the intensity you supply in g/km, or on the consumption you supply with an explicit fuel type, from which it derives gCOâ‚‚/km using fuel-specific factors.

Sample requests

Choose one intensity path: send co2_grams_per_km directly (preferred when you know it), or send consumption_per_100_km with fuel_type. Repeat the call with audit set to true once the booking is final. If you have no distance and no origin/destination, send number_of_days instead.

{
  "expand": ["items"],
  "items": [{
    "audit": false,
    "type": "car",
    "methodology": "BASIC",
    "external_reference": "TRIP-001",
    "distance_in_km": 245.6,
    "co2_grams_per_km": 120
  }]
}

audit_for is optional

Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out.

Precedence rules

  • Distance source: distance_in_km > origin/destination > number_of_days.
  • Intensity source: co2_grams_per_km > consumption_per_100_km with fuel_type.

Defaults

BASIC has no defaults for the intensity inputs: you must send one of the two intensity paths.

FieldDefaultApplies when
fuel_typeNoneRequired only when you use consumption_per_100_km
co2_grams_per_kmNoneSend this or consumption_per_100_km
consumption_per_100_kmNoneSend this or co2_grams_per_km
Distance per day60 kmThe distance is estimated from number_of_days

How it's calculated

Distance from trip duration

When you have neither a distance nor origin/destination, SQUAKE estimates the distance from number_of_days.

Estimated distance in kmnumber_of_days × 60
number_of_days
Trip duration in days, an integer of at least 1.
60
Kilometres assumed per day.

Tips

  • Use co2_grams_per_km directly whenever it's available (OEM data, in-vehicle telemetry or lab data) for maximum fidelity.
  • When you use consumption, make sure the unit matches what your integration expects, for example L/100 km for liquid fuels and kWh/100 km for BEVs.
  • BASIC doesn't infer vehicle classes or apply regional defaults; it uses exactly what you supply.
  • For electric vehicles, send either co2_grams_per_km (preferred if you have grid-mix allocation) or consumption_per_100_km with "fuel_type": "electricity", which uses the configured electricity factors.

Request fields

typestringrequired

car

methodologystringrequired

BASIC

distance_in_kmnumber

One of the distance inputs. Overrides the other distance inputs.

originstring

Together with destination, one of the distance inputs. Postal text, UN/LOCODE, IATA/ICAO, or "lat,lon".

destinationstring

Same formats as origin.

number_of_daysinteger

One of the distance inputs, at least 1. A fallback that estimates the distance as days * 60.

co2_grams_per_kmnumber

Direct intensity in gCOâ‚‚/km, at least 0. One of the two intensity paths. fuel_type isn't required on this path.

consumption_per_100_kmnumber

Consumption per 100 km, from 0 to 1000. The other intensity path, together with fuel_type.

fuel_typeenum

One of diesel, petrol, electricity, ethanol, bio_diesel, lpg, hydrogen, hvo. Mandatory when you use consumption_per_100_km.

external_referencestring

Optional correlation ID, up to 128 characters.

auditboolean

Set to true to create immutable audit records. Must be enabled for your account.

See every field of POST /v2/calculations in the API reference

Sample response

200 OKapplication/json
{
  "carbon_quantity": 29472,
  "carbon_unit": "gram",
  "items": [{
    "carbon_quantity": 29472,
    "carbon_unit": "gram",
    "external_reference": "TRIP-001",
    "type": "car",
    "methodology": "BASIC",
    "distance": 245.6,
    "distance_unit": "kilometer"
  }]
}

Bibliography

  • Smart Freight Centre (SFC). Global Logistics Emissions Council (GLEC) Framework for Logistics Emissions Accounting, latest edition.
  • SFC. GLEC Framework Guidance & Technical Documentation, which supports the fuel and energy factors and calculation principles.

On this page

POST/v2/calculations

Run this request against the sandbox with your test key.

Open in API reference