openapi: 3.0.0
info:
title: Altruistiq Datasource API
x-logo:
url: ./aq.svg
altText: Altruistiq Logo
version: 1.0.0
description: "# Definitions\n\nAn **Activity** is a business process that has taken place, which is relevant for emissions\
\ measurement. Examples of an **Activity** in Altruistiq\u2019s data model are **ElectricityUse** or **WasteGenerated**.\n\
A **Calculation Method** is an GHG Protocol compliant method to calculate emissions from Activity data. Calculation Methods\
\ have a unique set of data requirements, but are not unique to an **Activity**.\nA **Datasource** is a single data format\
\ that your data is shared with Altruistiq in. Alongside this function, a **Datasource** plays the role of linking a data\
\ format to key contextual information (e.g. relevant **Facilities**, relevant **Activities**, owner, chosen **Calculation\
\ Methods**, status).\n**Datasets** are then individual files ingested via that Datasource. Each **Dataset** has a live\
\ status for full data lineage and transparency that you can track in the application.\n\n# Datasource API Outline\n\n\
Primarily, Altruistiq\u2019s Datasource API enables the creation and management of Datasources and the upload of new Datasets.\
\ Alongside this there are a number of supporting functions.\n\nThe Datasource API is governed by the oauth2 protocol.\n\
\nThe Datasource API by default does not expect sudden bursts of data upload (e.g. 25x5GB of data transferred at once),\
\ but instead delta datasets. When uploading to the upload endpoint the files uploaded must be chunked into chunks < 100mb\
\ and if there are more than 1 part then chunks must be > 5mb (the last part can be below this). If this is not the case\
\ for your business, do raise this at your Kick Off call and we will accommodate this.\n\n# PACT API Outline\n\nPrimarily,\
\ Altruistiq\u2019s PACT API allows customers to export Product Carbon Footprint (PCF) data in a PACT conformant way.\
\ PACT is the Partnership for Carbon Transparency, a WRI and WBCSD funded NGO that is setting the calculation and technological\
\ standard for the exchange for Product Carbon Footprints between businesses. Today, Altruistiq is 1 of ~10 PACT conformant\
\ solutions globally.\n\nThe PACT API is is governed by the oauth2 protocol (see Security).\n\nFor full documentation\
\ of our PACT API, please go to https://wbcsd.github.io/data-exchange-protocol/v2/#api-examples. This provides the full\
\ documentation for product data exports, and the associated data model."
servers:
- url: https://app.altruistiq.com/
description: Altruistiq Server
tags:
- name: Security
description: "The Altruistiq API uses TLS and follows the OAuth 2.0 Client credentials flow as per [RFC 6749](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4)\n\
\n### Generating `client_id` and `client_secret`\n\nIn order to generate your `client_id` and `client_secret`, go to the\
\ altruistiq application\u2019s organisation settings."
- name: Datasource
description: "### Altruistiq\u2019s datasource API enables you to:\n\n - Create new datasources\n - Manage existing datasources\
\ (read, update)\n - Upload data to a datasource\n\nA datasource is the place where you will share a single data format\
\ with altruistiq and where you will categorise it so that we can calculate emissions in an automated way."
- name: Export
description: "### Altruistiq\u2019s Export API enables you to:\n\n - Export corporate data\n\nExporting data is a key part\
\ of the Altruistiq platform. It allows you to take your data and use it in other systems, or to share it with other stakeholders.\n\
\nCurrently, our Export API allows you to export your Corporate Emissions data available in Altruistiq, down to a daily\
\ grain. We are working hard to also add Product Emissions data to your Export API. If you need to share Product emissions\
\ data today, see the PACT API.\n\nSchema of files which can be retrieved via this API (data dictionary):
\n
| Column | Data Type | Format | Optional | Description |
|---|---|---|---|---|
| fact_uuid | \nstring | \nuuid | \nno | \nUnique identifier\ \ for emission record. | \n
| calendar_date | \nstring | \ndate | \n\ \no | \nDate of the emission record. | \n
| calendar_year | \n\ \integer | \n\n | no | \nYear of the emission record. | \n \ \
| emission_quantity | \nnumber | string | \ndecimal(28, 10) | \n\ \no | \nQuantity of the emission record. | \n
| emission_unit | \n\ \string | \n\n | no | \nUnit the emissions are in. | \n
| calculation_input_quantity | \nnumber | string | null | \ndecimal(28,\ \ 10) | \nyes | \nInput quantity used for the actual emission calculation (if applicable). | \n\ \
| calculation_input_quantity_unit | \nstring | null | \n\n\ \ | yes | \nUnit of the input quantity used for the actual emission calculation(if applicable). | \n\ \
| spend_usd | \nnumber | string | null | \ndecimal(28, 10) | \n\ \yes | \nSpend in USD used for the actual emission calculation (if applicable). | \n
| spend_eur | \nnumber | string | null | \ndecimal(28, 10) | \n \ \yes | \nSpend in EUR used for the actual emission calculation (if applicable). | \n
| spend_gbp | \nnumber | string | null | \ndecimal(28, 10) | \n \ \yes | \nSpend in EUR used for the actual emission calculation (if applicable). | \n
| per_unit | \nstring | \n\n | no | \nEmission\ \ Factor divisor. | \n
| input_dimensionality | \nstring | \n\n\ \ | no | \nDimensionality of the input quantity for the emission factor. | \n
| scope_category | \nstring | \n\n | no | \nScope categories\ \ are a subdivision of GHG Scopes with more detail about the emission\u2019s cause. Scope categories are similar to, and\ \ overlapping with Activities. | \n
| scope | \nstring | \n\n\ \ | no | \nRefers to the three scopes of the GHG Protocol. | \n
| activity_area_name | \n\ \string | \n\n | no | \nActivity areas are groups of activities\ \ that have similar emissions calculation methodologies in the Altruistiq platform. | \n
| activity_name | \nstring | \n\n | no | \nActivities areas\ \ are activities of a customer causing emissions. | \n
| sub_activity_name | \n \ \string | \n\n | no | \nSub-Activities areas are a sub-dicision activities\ \ of a customer causing emissions. | \n
| aq_calc_method | \nstring | \n\ \\n | no | \nCalculation Methodology used in the Altruistiq platform. | \n \ \
| ghg_calc_method | \nstring | \n\n | no | \n\ \Calculation Methodology according to the GHG protocol. | \n
| ef_specificity | \n\ \string | \n\n | no | \nSpecificity level that Emission Factors\ \ refer to, e.g. Global Average or Country Average. | \n
| accuracy_score | \n \ \integer | \n\n | no | \nA measure of how accurate emissions calculations\ \ are for a particular activity, based on the quality of data available and the calculation methodology applied as a result. | \n\ \
| accuracy_score_name | \nstring | \n\n | no | \n\ \A measure of how accurate emissions calculations are for a particular activity, based on the quality of data\ \ available and the calculation methodology applied as a result. | \n
| lifecycle | \n\ \string | \n\n | no | \nEmissions caused by an activity can be further\ \ subdivided by the lifecycle they are associated with. For example, a business trip in a company car will cause emissions\ \ from vehicle use (i.e. burning the fuel) and well-to-tank emissions (i.e. drilling for oil, fuel production, and any\ \ other activities in the supply chain). | \n
| bu_uuid | \nstring | \n\ \uuid | \nno | \nUnique identifier for a BU. | \n
| bu_name | \nstring | \n\n | no | \nName of the BU this\ \ record belongs to. | \n
| root_org_uuid | \nstring | \nuuid | \n\ \no | \nUnique identifier of the root organisation. | \n
| root_org_name | \n\ \string | \n\n | no | \nName of the root organisation this record\ \ belongs to. | \n
| facility_name | \nstring | null | \n\n\ \ | yes | \nName of the facility this record belongs to (if it is assigned at facility level). | \n\ \
| facility_uuid | \nstring | null | \n\n | yes | \n\ \Unique identifier of the facility. | \n
| facility_country_name | \n \ \string | null | \n\n | yes | \nCountry this facility belongs to. | \n\ \
| facility_country_code | \nstring | null | \n\n \ \ | yes | \nCountry code of the country this facility belongs to. | \n
| facility_post_code | \nstring | null | \n\n | yes | \nPost\ \ code of this facility. | \n
| facility_type | \nstring | null | \n \ \\n | yes | \nType of this facility. | \n
| facility_capacity_ratio | \n\ \number | string | null | \ndecimal(28, 10) | \nyes | \nCapacity\ \ of this facility. | \n
| data_source_name | \nstring | \n\n\ \ | yes | \nName of the datasource which was used for this record. | \n
| file_name | \nstring | \n\n | no | \nName of the\ \ file which was used for this record. | \n
| supplier_legal_name | \nstring\ \ | null | \n\n | yes | \nSupplier legal name (if applicable). | \n
| supplier_country_code | \nstring | null | \n\n | yes | \n\ \Supplier country code (if applicable). | \n
| supplier_country_name | \n\ \string | null | \n\n | yes | \nSupplier country name (if applicable). | \n\ \
| supplier_vat_number | \nstring | null | \n\n \ \ | yes | \nSupplier VAT number (if applicable). | \n
| tags | \n \ \object | \n\n | no | \nMapping of tag category -> value (e.g.\
\ energy_type -> mixed).\n PREVIEW WARNING: THESE ARE CURRENTLY BEING CHANGED, SO ARE NOT STABLE! \n\ \Categories: \n
| \n
| financial_year | \n\ \integer | \n\n | no | \n\n |
| custom_analytics_fields | \n\ \object | \n\n | no | \nCustom Analytics Fields. | \n
| custom_tags | \nobject | \n\n | no | \nFields\ \ used to tag/classify the record. | \n
| emission_factor_name | \nstring\ \ | null | \n\n | no | \nName of the emission factor used for this record. | \n\ \
| emission_factor_specificity | \nstring | null | \n\n\ \ | no | \nSpecificity of the emission factor used for this record. | \n
| emission_factor_specificity_code | \nstring | null | \n\n | no | \n\ \Specificity Code of the emission factor used for this record. | \n
| emission_factor_source | \n\ \string | null | \n\n | no | \nSource of the emission factor used\ \ for this record. | \n
| emission_factor_source_version | \nstring | null | \n\ \\n | no | \nSource version of the emission factor used for this record. | \n\ \
| created_at | \nstring | \ndate-time | \nno | \n\ \Timestamp when the record was created. NOTE: this might change if we do a full refresh in the backend. | \n\ \
| updated_at | \nstring | \ndate-time | \nno | \n\ \Timestamp when the record was updated. NOTE: this might change if we do a full refresh in the backend. | \n\ \