Retrieve all fuel consumption of a Vehicle.

Request

GET https://backend.net0.com/v1/vehicles/{vehicleId}/emissions

This endpoint allows for the retrieval of all fuel consumption information of a particular vehicle, including the emission profile of each recorded fuel purchase.

curl --location --request GET 'https://backend.net0.com/v1/vehicles/948bde0e-e8b9-4e9e-af74-d605b48d1f57/emissions' \
--header 'x-api-key: <API_KEY>'

Field Parameters

AttributeTypeDescriptionRequiredIn
vehicleIdStringThis describes the id of the vehicle.truepath

Response

The response returns an object containing an array of all the emissions for a vehicle.

{
    "data": [
        {
            "id": "dfb35c1d-79d4-4b14-809f-e0013a6972aa",
            "amount": 2,
            "comment": "Vehicle has emssions",
            "startDate": "2021-11-28T02:03:30.512Z",
            "endDate": "2021-11-29T02:03:30.512Z",
            "totalEmission": 3.88,
            "emissionId": "d468771a-867e-4e3b-8be0-66b05ab914e1",
            "vehicleId": "948bde0e-e8b9-4e9e-af74-d605b48d1f57",
            "companyId": 2,
            "createdAt": "2021-11-27T16:03:26.082Z",
            "updatedAt": "2021-11-27T16:03:26.082Z",
            "emission": {
                "id": "d468771a-867e-4e3b-8be0-66b05ab914e1",
                "co2": 3.8626600001319806,
                "ch4": 0.004281151495020996,
                "n2o": 0.010619235430886761,
                "co2e": 3.88,
                "createdAt": "2021-11-27T16:03:26.074Z",
                "updatedAt": "2021-11-27T16:03:26.074Z",
                "unitId": 2,
                "companyId": 2,
                "unit": {
                    "id": 2,
                    "name": "Kilogram",
                    "short_name": "kg",
                    "multiplier": 1,
                    "parent_id": null,
                    "typeUnit": "WEIGHT",
                    "createdAt": "2021-11-19T13:19:25.410Z",
                    "updatedAt": "2021-11-19T13:19:25.410Z"
                }
            },
            "offsets": []
        },
        {
            "id": "87b680ef-c8ae-486d-9094-67421ab8a6ca",
            "amount": 0,
            "comment": "this is test",
            "startDate": "2021-11-26T04:00:00.000Z",
            "endDate": "2021-11-27T04:00:00.000Z",
            "totalEmission": 0,
            "emissionId": "2fbda136-af48-4696-ae24-7de291a958a6",
            "vehicleId": "948bde0e-e8b9-4e9e-af74-d605b48d1f57",
            "companyId": 2,
            "createdAt": "2021-11-26T16:20:41.458Z",
            "updatedAt": "2021-11-26T16:20:41.458Z",
            "emission": {
                "id": "2fbda136-af48-4696-ae24-7de291a958a6",
                "co2": 0,
                "ch4": 0,
                "n2o": 0,
                "co2e": 0,
                "createdAt": "2021-11-26T16:20:41.451Z",
                "updatedAt": "2021-11-26T16:20:41.451Z",
                "unitId": 2,
                "companyId": 2,
                "unit": {
                    "id": 2,
                    "name": "Kilogram",
                    "short_name": "kg",
                    "multiplier": 1,
                    "parent_id": null,
                    "typeUnit": "WEIGHT",
                    "createdAt": "2021-11-19T13:19:25.410Z",
                    "updatedAt": "2021-11-19T13:19:25.410Z"
                }
            },
            "offsets": []
        },
        {
            "id": "df66872e-8aed-49b3-bac2-1b4b8bf694c5",
            "amount": 1,
            "comment": "testing",
            "startDate": "2021-11-01T19:00:00.000Z",
            "endDate": "2021-11-05T19:00:00.000Z",
            "totalEmission": 1.94,
            "emissionId": "be3eeba7-dc69-49ed-8eec-4ae3f5af84b8",
            "vehicleId": "948bde0e-e8b9-4e9e-af74-d605b48d1f57",
            "companyId": 2,
            "createdAt": "2021-11-26T16:17:18.955Z",
            "updatedAt": "2021-11-26T16:17:18.955Z",
            "emission": {
                "id": "be3eeba7-dc69-49ed-8eec-4ae3f5af84b8",
                "co2": 1.9313300000659903,
                "ch4": 0.002140575747510498,
                "n2o": 0.005309617715443381,
                "co2e": 1.94,
                "createdAt": "2021-11-26T16:17:18.944Z",
                "updatedAt": "2021-11-26T16:17:18.944Z",
                "unitId": 2,
                "companyId": 2,
                "unit": {
                    "id": 2,
                    "name": "Kilogram",
                    "short_name": "kg",
                    "multiplier": 1,
                    "parent_id": null,
                    "typeUnit": "WEIGHT",
                    "createdAt": "2021-11-19T13:19:25.410Z",
                    "updatedAt": "2021-11-19T13:19:25.410Z"
                }
            },
            "offsets": []
        },
        {
            "id": "f1ca85ed-d063-4ef9-8338-a8c072aba834",
            "amount": 8,
            "comment": "test",
            "startDate": "2021-11-04T19:00:00.000Z",
            "endDate": "2021-11-05T19:00:00.000Z",
            "totalEmission": 15.51,
            "emissionId": "ea1a0de3-de8a-441e-b98f-376ef3415702",
            "vehicleId": "948bde0e-e8b9-4e9e-af74-d605b48d1f57",
            "companyId": 2,
            "createdAt": "2021-11-25T15:36:03.384Z",
            "updatedAt": "2021-11-25T15:36:03.384Z",
            "emission": {
                "id": "ea1a0de3-de8a-441e-b98f-376ef3415702",
                "co2": 15.450640000527923,
                "ch4": 0.017124605980083984,
                "n2o": 0.042476941723547046,
                "co2e": 15.51,
                "createdAt": "2021-11-25T15:36:03.365Z",
                "updatedAt": "2021-11-25T15:36:03.365Z",
                "unitId": 2,
                "companyId": 2,
                "unit": {
                    "id": 2,
                    "name": "Kilogram",
                    "short_name": "kg",
                    "multiplier": 1,
                    "parent_id": null,
                    "typeUnit": "WEIGHT",
                    "createdAt": "2021-11-19T13:19:25.410Z",
                    "updatedAt": "2021-11-19T13:19:25.410Z"
                }
            },
            "offsets": []
        }
    ],
    "count": 4,
    "total": 4,
    "page": 1,
    "pageCount": 1
}