How it is organized
Custom factors live in three levels, the same way public databases do:Records: units, gases and tags
A record’sunit_id is the unit of the activity (kilograms of waste, kWh, litres…). Each factor gives the
emissions for one of those units, per gas:
The record’s
tag says which gases it carries:
A factor can be limited in time with
start_date and end_date; by default it applies from 1970-01-01 onwards.
Activity categories
activity_categories says which kind of data may use the record. A record is only offered, and only accepted, for
the categories it lists. For wastes, include wastes.
Other values include stationary, electricity, transport, purchases, water, travels and hotel_stays. An
unknown value is rejected with CUSTOM_RECORD_INVALID_CATEGORIES.
Using a record in your data
Pass the record’sid where the data asks for a custom factor. For wastes, that is custom_ef_record_id in
POST /v2/wastes:
From zero to a usable factor
1
Create a database
POST /v1/emission-factors/custom-databases → keep its id.2
Create a version
POST /v1/emission-factors/custom-databases/{database_id}/versions → keep its id (the source_id).3
Create a record
POST /v1/emission-factors/custom-databases/{database_id}/versions/{source_id}/records → its id is the record id your data references.Authentication
Every endpoint takes the same headers as the rest of the API:x-api-key and x-organization-id. Only the
organization that owns a database can change it, its versions and its records (otherwise 403 CUSTOM_DATABASE_NOT_OWNER); organizations it is shared with can read and use its records.
Endpoints
List Databases
Databases visible to your organization
Create Database
A new database owned by your organization
List Versions
Versions of a database
Create Version
A new version of a database
List Records
Records of a version, with search and paging
Get Record
One record by id
Create Record
A new emission factor
Update Record
Change a record
Delete Record
Remove a record