Skip to main content

Logistics Schema | Climes API


This is the schema for the logistics-freight truecost api's and it will be consistent throughout logistics-freight api's.

Request Schema

Each request requires 2 objects queries and configs object that has a top level key legs configs are params that will apply to all legs under queries

Configs Schema

NameDescriptionTypeOptional
regionRestricted to IN for now.string
required
transportation_typeThis is the type of transportation used for the logistics.
Enums :
truck ship rail
string
required

Queries Schema

Each queries object has a legs array which requires individual leg object.

NameDescriptionTypeOptional
legsIt is an array of individual requests per leg that this emission is being calculated for.string
required

Leg Schema

NameDescriptionTypeOptional
shipping_methodThis is type of shipping used.
Enums :
container loose
string
required
weightShipping objects weights in Kgsnumber
required
distanceShipping distance in Kmsnumber
required
container_typeThis field is only required if shipping_method is container. Use the values from below Container Weight Mappingsstringoptional
truck_unladen_weightThis field can be sent only if transportation_type is truck.The unit is in kgs. If not sent will be assumed based on the weight paramnumberoptional
truck_max_capacityThis field can be sent only if transportation_type is truck.The unit is in kgs. If not sent will be assumed based on the weight paramnumberoptional
container_tare_weightThis is the tare weight of container in Kgsnumberoptional
dry_runThis field is only used when transportation_type is truckbooleanoptional

Container Weight Mappings

container_typecontainer_name
0None
22GP20 Standard Dry
42GP40 Standard Dry
45GP40 High Cube
22RT20 Reefer
22TN20 Tank
22UT20 Open Top
42RT40 Reefer
42UT40 Open Top
L5GP45 High Cube (45 General Purpose)
42TN40 Tank
42VH40 Ventilated
42UP40 Hard Top
42PC40 Collapsible Flat Rack
42PF40 Flat Rack
42HR40 Insulated
20BU20 Bulk
29PL20 Platform
22VH20 Ventilated
22UP20 Hard Top
22PC20 Collapsible Flat Rack
22PF20 Flat Rack
22HR20 Insulated

There are 3 folders in this collection which have examples for each variable of API call possible for this use case

In the above definition of the leg object, if dry_run is set to true, the shipment weight is excluded from the total weight and only used to calculate the axle and unladen weight of the truck but not for truecost - This is applicable only when transportation_type is truck.

Response Schema

NameDescriptionType
messageA human readable string describing response for the given request.string
truecostThis object contains the calculated truecost values in Kg CO2e for the request.object
total_truecostThis is the total amount of Kg CO2e for the requestnumber
legsThis key has the breakdown of the Kg CO2e emissions per leg sent in the request.This is in the exact order as legs sent in the request.array
equivalentsThis object contains the equivalents for the calculated truecost values of legs in request.object
trash_collectedIts the total number of trash bags collected for recycle for the response's total_truecoststring
trees_plantedIts the total number of seedlings planted and grown for 10 years for the amount of response's total_truecoststring
lamps_collectedIts the total lamps' electricity saved for the response's total_truecoststring