Skip to main content

Container | Truck | Unknown Unladen Weight, Capacity and Tare Weight | Climes API


Logistics Freights API's are useful to calculate the truecost value of a single shipment having multiple factors.

Request Parameters

Endpoint

/v3/logistics/freight

Method

POST

Headers

{
'x-api-key': 'API_KEY',
'Content-Type': 'application/json'
}

Payload

{
"configs": {
"region": "IN",
"transportation_type": "truck"
},
"queries": {
"legs": [
{
"shipping_method": "container",
"weight": 22000,
"distance": 19000,
"container_type": "22RT"
}
]
}
}

Response Parameters

Status Code

200

Response Data

The response will contain the truecost values in tonnes CO2e for each shipping_method as per the request order respectively.

{
"message": "Truecost calculated successfully",
"truecost": {
"total_truecost": 19244,
"legs": [
19244
],
"equivalents": {
"trash_collected": "817870",
"trees_planted": "317526",
"lamps_collected": "729348"
}
}
}
caution

The error message is for your information, not the end users.
Please use the status codes and communicate the error to user accordingly
The API returns the first validation error that is encountered even if there are multiple errors with the request

tip

Here the response will be in the same order as the request values.

Sample Request

curl --location --request POST 'BASE_URL/v3/logistics/freight'  
--header 'x-api-key: API_KEY'
--header 'Content-Type: application/json'
--data-raw '{
"configs": {
"region": "IN",
"transportation_type": "truck"
},
"queries": {
"legs": [
{
"shipping_method": "container",
"weight": 22000,
"distance": 19000,
"container_type": "22RT"
}
]
}
}'

Sample Response

Below are sample responses for the above request.

Responses

{
"message": "Truecost calculated successfully",
"truecost": {
"total_truecost": 19244,
"legs": [
19244
],
"equivalents": {
"trash_collected": "817870",
"trees_planted": "317526",
"lamps_collected": "729348"
}
}
}