Add new electricity consumption to Site.

Request

POST https://backend.net0.com/v1/sites/{siteId}/energy

This endpoint allows you to create a record of new electricity consumption for a given site/location. You are able to customise the request by including specific information about type of electricity used, amount of electricity purchased, and further fine-tune the consumption with custom emission profile of a vendor (e.g. Market-Based electricity purchase).

{
  "files": [
    {
      "id": "string",
      "name": "string",
      "url": "string"
    }
  ],
  "value": 0,
  "endDate": "string",
  "startDate": "string",
  "emissionKindId": "string",
  "vendorId": "string",
  "percentageOfCleanEnergy": 0,
  "unitId": 0,
  "comment": "string",
  "customEmissionFactorId": "string"
}

Field Parameters

AttributeTypeDescriptionRequired
filesArrayAn array of object with id, name, and url.true
valueNumberThe value of the site energy.true
endDateStringThe end date of site energy.true
startDateStringThe start date of the site energy.true
emissionKindIdStringThis describes the id the emission kind.true
vendorIdStringThis describes the id of the vendorfalse
percentageOfCleanEnergyNumberThis describes the value of percentage of clean energy.true
unitIdNumberThe id of the unittrue
commentStringAn optional comment about the site energy.false
customEmissionFactorIdStringThis describes the id of the custom emission factor.false

Response

The response is a JSON-encoded value of the newly created site electricity.

{
        "id": "cf634fcf-304c-495e-9b81-e98590dbe370",
        "totalEmission": 17.02,
        "value": 73,
        "percentageOfCleanEnergy": 0,
        "comment": null,
        "startDate": "2021-11-16T00:00:00.000Z",
        "endDate": "2021-11-22T20:43:40.000Z",
        "createdAt": "2021-11-22T20:43:57.663Z",
        "updatedAt": "2021-11-22T20:43:57.663Z",
        "emissionId": "6ef705d3-5817-495b-a595-401c11cbf74b",
        "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": "661f2098-c629-4331-acfb-20ae6234b6bb",
                "name": "73kwh",
                "url": "https://proton-uploads-production.s3.amazonaws.com/f2a1ab17b842ca01a064712d4463d02dc5d3852e6805e578bf30427fafd5b056.jpg?orient",
                "createdAt": "2021-11-22T20:43:57.663Z",
                "updatedAt": "2021-11-22T20:43:57.663Z",
                "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": []
    },