Request
POST https://backend.net0.com/v1/sites/{siteId}/fuel
This endpoint allows you to record fuel consumption on a specified site. You are able to select the fuel type and quantity, which will automatically be converted into emissions through a relevant emission factor.
curl --location --request POST 'https://backend.net0.com/v1/sites/da450a9f-299a-467f-bb38-846476e33dd6/fuel' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"files": [
{
"id": 0,
"name": "Opman Files",
"url": "https://picsum.photos/seed/picsum/200/300"
}
],
"startDate": "2022-03-03T03:03:03.3Z",
"endDate": "2022-05-05T03:03:03.3Z",
"unitId": 0,
"value": 0,
"emissionFactorId": "2c910161-4cf6-4160-9513-b09bbca0e19e",
"totalEmission": 53,
"emissionId": "0166b835-555c-420a-9148-e82101d4e748",
"emissionKindId": "8cfa32be-a87e-4ec4-80bf-6f0382537df7",
"unit": {
"id": 13,
"name": "Liter",
"short_name": "l",
"multiplier": 1,
"parent_id": null,
"typeUnit": "VOLUME",
"createdAt": "2021-11-19T13:19:25.410Z",
"updatedAt": "2021-11-19T13:19:25.410Z"
}
}'
Request Body
{
"files": [
{
"id": "string",
"name": "string",
"url": "string"
}
],
"startDate": "string",
"endDate": "string",
"unitId": 0,
"value": 0,
"vendorId": "string",
"emissionFactorId": "string",
"comment": "string"
"totalEmission": 53,
"emissionId": "string",
"emissionKindId": "string",
"unit": "object"
}
Field Parameters
Attribute | Type | Description | Required | In |
---|---|---|---|---|
siteId | String | The id of the site. | true | path |
files | Array, String | This is an array of objects that contains the id , name , and url of the files. | true | Body |
startDate | String | This is the start date of the site fuel. | true | Body |
endDate | String | This describes the end date of the site fuel. | true | Body |
unitId | Number | The id of the unit | true | Body |
value | Number | The value of site fuel to be created | true | Body |
vendorId | String | This describes the id of the vendor. | false | body |
emissionFactorId | String | This is the id of the associated emission factor | true | body |
comment | String | An optional comment about the site fuel | false | body |
emissionId | String | The id of the emission associated with fuel consumption | true | body |
totalEmission | Number | The total emission generated by the | true | body |
emissionKindId | String | The id of the emission kind. | true | body |
unit | Object | This is an object containing all the parameters of units associated with the fuel consumption on a site. | true | body |
Response
The response is an object of the created site fuel consumption.
{
"id": "8efe2975-df97-4356-a042-5f60657f4f96",
"value": 78,
"totalEmission": 8006.93,
"startDate": "2021-01-01T06:00:00.000Z",
"endDate": "2021-02-02T06:00:00.000Z",
"comment": null,
"unitId": 13,
"vendorId": "8df19e8c-5acf-4d3c-92af-6b1870a8a7ed",
"siteId": "8fd23068-139b-44db-be74-1f8513715e9e",
"companyId": 2,
"emissionId": "0166b835-555c-420a-9148-e82101d4e748",
"emissionKindId": "8cfa32be-a87e-4ec4-80bf-6f0382537df7",
"emissionFactorId": "57b73dc9-4d37-496d-ab36-e803adfa97a6",
"createdAt": "2021-11-22T15:57:30.555Z",
"updatedAt": "2021-11-22T15:57:30.555Z",
"files": [],
"offsets": [],
"emissionKind": {
"id": "8cfa32be-a87e-4ec4-80bf-6f0382537df7",
"scope": "SCOPE_1",
"underScope": "Sites",
"activityTypeUnderScope": "FUEL",
"name": "Stationary Combustion",
"companyId": null,
"createdAt": "2021-11-19T13:19:25.410Z",
"updatedAt": "2021-11-19T13:19:25.410Z"
},
"unit": {
"id": 13,
"name": "Liter",
"short_name": "l",
"multiplier": 1,
"parent_id": null,
"typeUnit": "VOLUME",
"createdAt": "2021-11-19T13:19:25.410Z",
"updatedAt": "2021-11-19T13:19:25.410Z"
},
"emissionFactor": {
"id": "57b73dc9-4d37-496d-ab36-e803adfa97a6",
"name": "Petroleum Coke",
"source": "https://www.epa.gov/climateleadership/center-corporate-climate-leadership-ghg-emission-factors-hub",
"co2": 102.41,
"ch4": 0.003,
"n2o": 0.0006,
"co2e": 102.653,
"denominatorUnitId": 7,
"numeratorUnitId": 2,
"isCustom": false,
"companyId": null,
"createdAt": "2021-11-19T13:19:25.410Z",
"updatedAt": "2021-11-19T13:19:25.410Z",
"deletedAt": null
}
}