Request
PATCH https://backend.net0.com/v1/sites/{siteId}/energy/{energyId}
This endpoint allows for the partial update of an existing site (physical location) energy consumption available on your Net0 account.
curl --location --request PATCH 'https://backend.net0.com/v1/sites/8fd23068-139b-44db-be74-1f8513715e9e/energy/b1b565c2-49e0-404e-90ee-9f3a8a33642e' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"value",
"endDate",
"startDate",
"percentageOfCleanEnergy",
"emissionKindId",
"unitId"
}'
Field Parameters
Attribute | Type | Description | In | Required |
---|---|---|---|---|
siteId | String | The id of the site. | path | true |
energyId | String | The id of the site energy. | path | true |
body | PatchOperation | The update operation to be performed on the existing site energy. | body | true |
value | Number | The value of the site enegy. | body | true |
endDate | String | The end date of the site energy. | body | true |
startDate | String | The start date of the site energy. | body | true |
percentageOfCleanEnergy | Number | The percentage of clean energy. | body | true |
emissionKindId | String | The emission kind id . | body | true |
unitId | Number | The id of the unit. | body |
Response
The response returns the updated site energy if all the parameters are correct.
{
"id": "b1b565c2-49e0-404e-90ee-9f3a8a33642e",
"totalEmission": 14.45,
"value": 62,
"percentageOfCleanEnergy": 0,
"comment": null,
"startDate": "2021-11-16T00:00:00.000Z",
"endDate": "2021-11-22T20:43:14.000Z",
"createdAt": "2021-11-22T20:43:22.304Z",
"updatedAt": "2021-11-22T20:43:22.304Z",
"emissionId": "a83da00e-b2fa-4d24-b5aa-fc5960cd81e8",
"emissionKindId": "371c65d8-2a3f-48e5-a24c-d6ca6929faba",
"siteId": "8fd23068-139b-44db-be74-1f8513715e9e",
"companyId": 2,
"vendorId": "5144968f-1e1c-4106-96ff-ebd06b09d442",
"unitId": 4,
"customEmissionFactorId": null,
"files": [
{
"id": "19d7dac0-71e9-41c2-ac22-ac778debd867",
"name": "62kwh",
"url": "",
"createdAt": "2021-11-22T20:43:22.304Z",
"updatedAt": "2021-11-22T20:43:22.304Z",
"deletedAt": null
}
],
"unit": {
"id": 4,
"name": "Kilowatt hour",
"short_name": "kWh",
"multiplier": 1,
"parent_id": null,
"typeUnit": "ELECTRICITY",
"createdAt": "2021-11-19T13:19:25.410Z",
"updatedAt": "2021-11-19T13:19:25.410Z"
},
"offsets": []
}