Skip to main content

Container | Custom Tare Weight | Rail | 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": "rail"
},
"queries": {
"legs": [{
"shipping_method": "container",
"weight": 19000,
"distance": 18000,
"container_type": "45GP",
"container_tare_weight": 1600
}]
}
}

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": 3523,
"legs": [
3523
],
"equivalents": {
"trash_collected": "149728",
"trees_planted": "58130",
"lamps_collected": "133522"
}
}
}
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 :::

Sample Request​

curl --location --request POST 'BASE_URL/logistics/freight'  
--header 'x-api-key: API_KEY'
--header 'Content-Type: application/json'
--data-raw '{
"configs": {
"region": "IN",
"transportation_type": "rail"
},
"queries": {
"legs": [{
"shipping_method": "container",
"weight": 19000,
"distance": 18000,
"container_type": "45GP",
"container_tare_weight": 1600
}]
}
}
'

Sample Response​

Below are sample responses for the above request.

Responses

{
"message": "Truecost calculated successfully",
"truecost": {
"total_truecost": 3523,
"legs": [
3523
],
"equivalents": {
"trash_collected": "149728",
"trees_planted": "58130",
"lamps_collected": "133522"
}
}
}