Carbon Calculation

Endpoints relating to Carbon Calculations

Calculate carbon emissions

Rate limited to 2,000 requests per hour

Request
Request Body schema: application/json
required
transportation_mode
required
string

The mode of transportation for calculation. One of air, ocean, truck, or rail. If transportation_mode is truck, ocean, or rail, country_code in both origin_address and destination_address is required.

Enum: "air" "ocean" "truck" "rail"
object (WeightCreate)

The exact weight being shipped. Either weight or teus is required.

value
number

Required. Specifies the weight as a float.

unit
string

Required. Unit of measurement. "kg" for kilograms, "lbs" for pounds

Enum: "kg" "lbs"
teus
string

The number of TEUs (Twenty-foot Equivalent Units) moved in the calculation. Either weight or teus is required.

object (DistanceCreate)

The total distance traveled by the shipment. This can be used instead of origin/destination locations.

value
number

Required. Specifies the distance as a float.

unit
string

Required. Unit of measurement. "km" for kilometers. "mi" for miles.

Enum: "km" "mi"
object (CoordinatesCreate)

The latitude and longitude of the origin. One of distance, origin_coordinates, origin_address, or origin_port is required.

latitude
string
longitude
string
object (AddressForRequestBody)

The physical address of the origin. One of distance, origin_coordinates, origin_address, or origin_port is required.

street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
object (CoordinatesCreate)

The latitude and longitude of the destination. One of distance, destination_coordinates, destination_address, or destination_port is required.

latitude
string
longitude
string
object (AddressForRequestBody)

The physical address of the destination. One of distance, destination_coordinates, destination_address, or destination_port is required.

street_address
string
street_address2
string
city
string
state
string
country_code
string
zip
string
unlocode
string
origin_port
string

Port of origin, used if no more specific origin location is provided.

destination_port
string

Port of destination, used if no more specific destination location is provided.

is_inland
boolean
Default: false

For transportation_mode: ocean, indicates if the calculation was inland or not. Defaults to false.

is_lcl
boolean
Default: false

For transportation_mode: ocean, indicates if the calculation is less than container load or not. Defaults to false.

is_reefer
boolean
Default: false

For transportation_mode: ocean, indicates if the calculation is a reefer shipment. Defaults to false.

flight_type
string
Default: "unknown"

For transportation_mode: air, the type of plane used. One of freighter, belly_freighter, or unknown. Defaults to unknown.

Enum: "freighter" "belly_freighter" "unknown"
trucking_service_type
string

For transportation_mode: truck, the type of service used. One of ftl, ltl, drayage, cartage, last_mile, airport_transfer, or air_cartage.

Enum: "ftl" "ltl" "drayage" "cartage" "last_mile" "airport_transfer" "air_cartage"
Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (CarbonCalculation)
_object
string

Type of the object

object (Weight)
400

error

post/carbon_calculation
Request samples
application/json
{
  • "weight": {
    • "value": 40,
    • "unit": "kg"
    },
  • "transportation_mode": "air",
  • "origin_coordinates": {
    • "latitude": "37.78",
    • "longitude": "-12.41"
    },
  • "destination_port": "JFK"
}
Response samples
application/json

Success

{}