POST
/
v1
/
emissions
/
calculate
/
train
{
    "origin": "London",
    "destination": "Manchester",
    "departure_date": "1970-01-01",
    "return_date": "1970-01-01",
    "number_of_passengers": 1
}
{
    "emissions_in_kg": 1000
}

Headers

api-key
string
required
Authorisation requires an API key in the header of the request. Please see this page for more information.

Request Fields

origin
string
required
The town or city where the travelers journey begins.
destination
string
required
The town or city where the travelers journey ends.
departure_date
string
required
The start date of the travelers journey.Format: yyyy-MM-dd
return_date
string
The end date of the travelers journey.Format: yyyy-MM-dd
number_of_passengers
number
required
The number of travelers included in the booking.Minimum Value: 1
type_of_train
string
The type of train used in the booking.Possible Values: national_rail, international_rail, light_rail.Default: national_rail

Response Fields

emissions_in_kg
long
The amount of carbon emissions to be offset, specified in kilograms.
{
    "origin": "London",
    "destination": "Manchester",
    "departure_date": "1970-01-01",
    "return_date": "1970-01-01",
    "number_of_passengers": 1
}
{
    "emissions_in_kg": 1000
}