Reporting Organisation Schema v0.1.0

The Reporting Organisation Schema defines the root structure for Technology Carbon Standard documents, including organisation details and the collection of emissions reports over time.

Purpose

The Reporting Organisation Schema provides:

Schema Information

Schema Structure

{
  "schema_version": "0.1.0",
  "organisation": {
    "organisation_name": "Example Corp",
    "description": "Description of the organisation",
    "open_corporates_url": "https://opencorporates.com/companies/gb/12345678",
    "registered_country": "England"
  },
  "emissions_reports": [
    {
      "schema_version": "0.0.1",
      // Emissions report content validated against v0.0.1 schema
    }
  ]
}

Root Level Fields

Schema Version (required)

Specifies the version of the Reporting Organisation Schema being used:

"schema_version": "0.1.0"
Field Type Required Description
schema_version string (enum) Yes Must be “0.1.0” for this schema version

Organisation (required)

Contains information about the reporting organisation:

"organisation": {
  "organisation_name": "Scott Logic",
  "description": "Software consultancy specialising in complex applications",
  "open_corporates_url": "https://opencorporates.com/companies/gb/05377430",
  "registered_country": "England"
}

Organisation Fields

Field Type Required Description
organisation_name string Yes Name of the reporting organisation
description string No Description of the reporting organisation
open_corporates_url string (URI) No Open Corporates URL for the reporting organisation
registered_country string No Country of registration of the reporting organisation

Emissions Reports (required)

An array containing one or more emissions reports. Each report can use a different schema version:

"emissions_reports": [
  {
    "schema_version": "0.0.1",
    "reporting_period": {
      "from_date": "2023-01-01",
      "to_date": "2023-12-31"
    },
    "verification": "self reported",
    "tech_carbon_standard": {
      "schema_version": "0.0.1"
    }
  }
]

Emissions Report Versioning

Each emissions report specifies its own schema version, allowing organisations to:

Currently supported emissions report schema versions:

Validation Rules

Required Fields

Additional Properties

Example Document

{
  "schema_version": "0.1.0",
  "organisation": {
    "organisation_name": "Scott Logic",
    "description": "Software consultancy and product development company",
    "open_corporates_url": "https://opencorporates.com/companies/gb/05377430",
    "registered_country": "England"
  },
  "emissions_reports": [
    {
      "schema_version": "0.0.1",
      "reporting_period": {
        "from_date": "2023-01-01",
        "to_date": "2023-12-31"
      },
      "verification": "self reported",
      "tech_carbon_standard": {
        "schema_version": "0.0.1",
        "upstream_emissions": {
          "employee_hardware": {
            "emissions": 55000,
            "notes": "Embodied carbon of purchased laptops and monitors"
          }
        },
        "direct_emissions": {
          "onsite_employee_hardware": {
            "emissions": 5000,
            "notes": "Office electricity consumption for employee devices",
            "method": "location-based"
          }
        }
      }
    }
  ]
}

Migration from v0.0.1

If migrating from the original schema (v0.0.1), key changes include:

  1. Root Structure: The document structure now explicitly separates organisation information from emissions reports
  2. Organisation Object: Organisation details are now grouped in a dedicated organisation object
  3. Schema Versioning: Both the root schema and emissions reports have explicit version declarations
  4. Report Array: Emissions reports are now contained in an array, allowing multiple reports per organisation

Testing

The schema includes a set of unit tests which use the Jest testing framework.

To run the tests:

  1. Ensure Node.js is installed (version 17+ is required)
  2. Install dependencies:
    npm install
    
  3. Run the tests:
    npm test
    

The tests are located in schemas/tests and load example data from the schemas/examples directory.

Any new tests with the extension .spec.ts will be picked up by the npm test command.

Validation

The schema includes a validation utility based on AJV (Another JSON Validator).

Running the Validator

To validate a TCS document:

  1. Ensure Node.js is installed
  2. Install dependencies:
    npm install ajv ajv-formats
    
  3. Run the validator:
    node schemas/validators/validate.js
    

The validator will:

Common Validation Errors

  1. Missing schema_version: Ensure the root level has "schema_version": "0.1.0"
  2. Missing organisation_name: The organisation object must include organisation_name
  3. Empty emissions_reports: At least one emissions report is required
  4. Invalid URI format: open_corporates_url must be a valid URI if provided

Resources