Co2_API
A scalable, production-ready REST API built with Java 17 and Spring Boot 3 for estimating CO₂ emissions from freight shipments. Clients submit shipment weight, travel distance, and transport mode, and the API returns total CO₂ emissions in kilograms along with the emission factor applied for full transparency and consistent reporting. Beyond single-shipment calculations, the API supports batch…
Co2_API endpoints
| Method | Endpoint | Description |
|---|---|---|
| Transport Types | ||
| GET |
getTransportTypes /api/v1/transport-types |
Returns the transport types supported by the API together with their emission factors. |
| GET |
getTransportType /api/v1/transport-types/{code} |
Returns the emission factor and metadata for a specific transport type code (e.g. TRAIN, FLIGHT). |
| CO2 Comparison | ||
| POST |
compare /api/v1/compare |
Provide two shipment options and receive both calculated emissions plus a comparison result. |
| POST |
findBestRoute /api/v1/compare/best |
Provide shipment weight and distance and receive all transport options ranked from lowest to highest CO2 emission. |
| CO2 Emission Calculation | ||
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. The endpoint accepts the standard X-API-KEY header and also supports… |
| Custom Estimate | ||
| POST |
estimate /api/v1/estimate |
Provide shipment weight (kg), distance (km), and your own emission factor (kg CO2 / t·km) to receive the estimated CO2 in kg. |
| Batch CO2 Calculation | ||
| POST |
calculateBatch /api/v1/calculate/batch |
Provide a list of shipments and receive one emission result per shipment plus the total CO2. |
| Other endpoints | ||
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. |
| POST |
calculateBatch /api/v1/calculate/batch |
Submit up to 100 shipments in one request and receive individual emission results plus a total CO2 sum. |
| GET |
getTransportTypes /api/v1/transport-types |
Returns all transport types supported by the API, including their CO2 emission factors (kg CO2 per ton-km) and descriptions. |
| POST |
compare /api/v1/compare |
Provide two shipment options (A and B) to compare their CO2 emissions side by side. The response includes the emission result for each option, the absolute and percentage… |
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. |
| POST |
calculateBatch /api/v1/calculate/batch |
Provide a list of shipments and receive one emission result per shipment plus the total CO2. |
| PUT |
compare /api/v1/compare |
Provide two shipment options and receive both calculated emissions plus a comparison result. |
| GET |
getTransportTypes /api/v1/transport-types |
Returns the transport types supported by the API together with their emission factors. |
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. The endpoint accepts the standard X-API-KEY header and also supports… |
| POST |
findBestRoute /api/v1/compare/best |
Provide shipment weight and distance and receive all transport options ranked from lowest to highest CO2 emission. |
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. The endpoint accepts the standard X-API-KEY header and also supports… |
| POST |
estimate /api/v1/estimate |
Provide shipment weight (kg), distance (km), and your own emission factor (kg CO2 / t·km) to receive the estimated CO2 in kg. |
| POST |
calculateBatch /api/v1/calculate/batch |
Provide a list of shipments and receive one emission result per shipment plus the total CO2. |
| POST |
compare /api/v1/compare |
Provide two shipment options and receive both calculated emissions plus a comparison result. |
| GET |
getTransportTypes /api/v1/transport-types |
Returns the transport types supported by the API together with their emission factors. |
| GET |
getTransportType /api/v1/transport-types/{code} |
Returns the emission factor and metadata for a specific transport type code (e.g. TRAIN, FLIGHT). |
| POST |
findBestRoute /api/v1/compare/best |
Provide shipment weight and distance and receive all transport options ranked from lowest to highest CO2 emission. |
| GET |
getTransportType /api/v1/transport-types/{code} |
Returns the emission factor and metadata for a specific transport type code (e.g. TRAIN, FLIGHT). |
| POST |
calculate /api/v1/calculate |
Provide shipment weight (kg), distance (km), and transport type to receive the estimated CO2 emission in kg. The endpoint accepts the standard X-API-KEY header and also supports… |
| POST |
estimate /api/v1/estimate |
Provide shipment weight (kg), distance (km), and your own emission factor (kg CO2 / t·km) to receive the estimated CO2 in kg. |
| GET |
getTransportTypes /api/v1/transport-types |
Returns the transport types supported by the API together with their emission factors. |
| POST |
calculateBatch /api/v1/calculate/batch |
Provide a list of shipments and receive one emission result per shipment plus the total CO2. |
| POST |
compare /api/v1/compare |
Provide two shipment options and receive both calculated emissions plus a comparison result. |
Co2_API pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | — |
|
| PRO | $2.99 / month | 2000 / hour |
|
| ULTRA | $5.9 / month | 5000 / hour |
|