Data Ingestion

Submit electricity consumption data

Submit electricity consumption data directly to the Unravel Carbon platform for processing and carbon footprint calculation.

This endpoint allows you to:

  • Ingest electricity data: Submit consumption records with facility and supplier information
  • Automatic processing: Data is automatically grouped by facility and processed for carbon calculations
  • Deduplication: Use unique transaction IDs to prevent duplicate data processing

Each facility receives its own dedicated upload job for optimal processing and tracking.

Note: This endpoint is designed for direct API integration and replaces the need for manual file uploads.

post/ingest/electricity

Request

  • Base URL
    https://api.unravelcarbon.com/api/v1
  • Auth
    HTTP bearer

Headers

Authorizationstring required
Example:Bearer <your_api_key>

Bearer token (API Key)

Request body

Example request

{
  "records": [
    {
      "transaction_id": "ELEC_01_2024_01_1",
      "date": "2024-01-16",
      "consumption_kwh": 1150.5,
      "facility_name": "Alpha Llama Lima HQ",
      "subfacility_code": "BF0",
      "supplier_name": "Supplier A"
    }
  ]
}

Response

Electricity data successfully ingested

status'success'

Processing status

messagestring

Success message

Example response

{
  "status": "success",
  "message": "Successfully processed electricity data for 1 facilities",
  "data": {
    "facilities_processed": [
      {
        "facility_name": "Alpha Llama Lima HQ",
        "status": "updated",
        "records_count": 4,
        "total_consumption_kwh": 4602,
        "date_range": {
          "start_date": "2024-01-16",
          "end_date": "2024-01-19"
        }
      }
    ],
    "summary": {
      "total_facilities": 1,
      "total_records": 4,
      "total_consumption_kwh": 4602,
      "new_facilities": [],
      "existing_facilities": [
        "Alpha Llama Lima HQ"
      ],
      "date_range": {
        "start_date": "2024-01-16",
        "end_date": "2024-01-19"
      }
    },
    "next_steps": [
      "Your scope2 electricity data has been successfully uploaded",
      "Carbon calculations will be processed automatically",
      "You can view results in your dashboard within 5-10 minutes",
      "Check your email for processing confirmation"
    ]
  }
}

Changes

No recorded changes to this operation across all 4 revisions of this API.