curl --request PUT \
--url https://app.variable.global/api/v1/dataset/{uuid}/impacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"GWP-fossil": {
"A1": "4",
"A3": "6"
},
"ODP": {
"A1": "1.2e-6"
}
}
'import requests
url = "https://app.variable.global/api/v1/dataset/{uuid}/impacts"
payload = {
"GWP-fossil": {
"A1": "4",
"A3": "6"
},
"ODP": { "A1": "1.2e-6" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({'GWP-fossil': {A1: '4', A3: '6'}, ODP: {A1: '1.2e-6'}})
};
fetch('https://app.variable.global/api/v1/dataset/{uuid}/impacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.variable.global/api/v1/dataset/{uuid}/impacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'GWP-fossil' => [
'A1' => '4',
'A3' => '6'
],
'ODP' => [
'A1' => '1.2e-6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.variable.global/api/v1/dataset/{uuid}/impacts"
payload := strings.NewReader("{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.variable.global/api/v1/dataset/{uuid}/impacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.variable.global/api/v1/dataset/{uuid}/impacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Steel billet, hot rolled",
"description": "A descriptive description",
"notes": "Internal notes about this product",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"supplierPartId": "PART-123",
"unit": "kg",
"weight": {
"quantity": 100,
"unit": "kg"
},
"packagingWeight": {
"quantity": 10,
"unit": "kg"
},
"recycledPercent": 30,
"footprint": {
"CO2e": {
"A1": "1200.0",
"A2": "30.0",
"A3": "4.0",
"A4": "0.5",
"B1": "0.06",
"B2": "0.007",
"B3": "0.0008",
"B4": "",
"B5": "",
"C1": "",
"C2": "",
"C3": "",
"C4": "",
"D": "",
"totalCarbonFootprint": "1234.5678",
"productCarbonFootprint": "1234.0",
"upstream": "1230.0",
"direct": "4.0",
"downstream": "0.5678",
"A1_A3": "1234.0"
}
},
"dataQualityIndicators": {
"description": "Primary data from the 2022 production year; background datasets from ecoinvent 3.9.",
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"temporalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1,
"averagePercent": 60
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"path": "material"
},
"geoLocation": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pittsburgh, PA"
},
"location": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pittsburgh Office"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z",
"image": "https://app.variable.global/uploads/image.jpg",
"impacts": {
"GWP-fossil": {
"unit": "kgCO2e",
"method": "Mixed",
"totalCarbonFootprint": "10",
"A1_A3": "10"
},
"ODP": {
"unit": "kgCFC11e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "0.0000012"
},
"AP": {
"unit": "molH+e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "2"
}
},
"dataQualityRating": 1.4,
"versionState": "draft",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"supplier": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"syncId": "sync123",
"name": "Company Name"
}
}{
"message": "token expired"
}Set Dataset Impacts
Set a draft dataset’s impact indicators, keyed by EN 15804+A2 code
curl --request PUT \
--url https://app.variable.global/api/v1/dataset/{uuid}/impacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"GWP-fossil": {
"A1": "4",
"A3": "6"
},
"ODP": {
"A1": "1.2e-6"
}
}
'import requests
url = "https://app.variable.global/api/v1/dataset/{uuid}/impacts"
payload = {
"GWP-fossil": {
"A1": "4",
"A3": "6"
},
"ODP": { "A1": "1.2e-6" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({'GWP-fossil': {A1: '4', A3: '6'}, ODP: {A1: '1.2e-6'}})
};
fetch('https://app.variable.global/api/v1/dataset/{uuid}/impacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.variable.global/api/v1/dataset/{uuid}/impacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'GWP-fossil' => [
'A1' => '4',
'A3' => '6'
],
'ODP' => [
'A1' => '1.2e-6'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.variable.global/api/v1/dataset/{uuid}/impacts"
payload := strings.NewReader("{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.variable.global/api/v1/dataset/{uuid}/impacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.variable.global/api/v1/dataset/{uuid}/impacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"GWP-fossil\": {\n \"A1\": \"4\",\n \"A3\": \"6\"\n },\n \"ODP\": {\n \"A1\": \"1.2e-6\"\n }\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Steel billet, hot rolled",
"description": "A descriptive description",
"notes": "Internal notes about this product",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"supplierPartId": "PART-123",
"unit": "kg",
"weight": {
"quantity": 100,
"unit": "kg"
},
"packagingWeight": {
"quantity": 10,
"unit": "kg"
},
"recycledPercent": 30,
"footprint": {
"CO2e": {
"A1": "1200.0",
"A2": "30.0",
"A3": "4.0",
"A4": "0.5",
"B1": "0.06",
"B2": "0.007",
"B3": "0.0008",
"B4": "",
"B5": "",
"C1": "",
"C2": "",
"C3": "",
"C4": "",
"D": "",
"totalCarbonFootprint": "1234.5678",
"productCarbonFootprint": "1234.0",
"upstream": "1230.0",
"direct": "4.0",
"downstream": "0.5678",
"A1_A3": "1234.0"
}
},
"dataQualityIndicators": {
"description": "Primary data from the 2022 production year; background datasets from ecoinvent 3.9.",
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"temporalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1,
"averagePercent": 60
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"path": "material"
},
"geoLocation": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pittsburgh, PA"
},
"location": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pittsburgh Office"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z",
"image": "https://app.variable.global/uploads/image.jpg",
"impacts": {
"GWP-fossil": {
"unit": "kgCO2e",
"method": "Mixed",
"totalCarbonFootprint": "10",
"A1_A3": "10"
},
"ODP": {
"unit": "kgCFC11e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "0.0000012"
},
"AP": {
"unit": "molH+e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "2"
}
},
"dataQualityRating": 1.4,
"versionState": "draft",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"supplier": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"syncId": "sync123",
"name": "Company Name"
}
}{
"message": "token expired"
}A1–A5, B1–B7, C1–C4, D); totals are computed
server-side. The dataset must be in draft state, and indicators you omit are left unchanged.
Accounts without all impact indicators enabled may only write the canonical GWP-fossil indicator;
sending any other indicator returns a 403 and saves nothing. Contact Variable to enable the full
indicator set.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Impact indicators keyed by canonical EN 15804+A2 code (e.g. GWP-fossil, ODP, AP), case-insensitive. An unknown code returns 400. Indicators you omit are left unchanged.
Life-cycle stage values for one indicator — A1–A5, B1–B7, C1–C4, D — as numbers, numeric strings, or null (clears the stage). At least one stage is required. Sending an indicator replaces its full stage profile: any stage you omit is cleared, so send every stage you want kept. Totals (A1_A3, upstream, direct, downstream, productCarbonFootprint, totalCarbonFootprint) are derived server-side and ignored if sent.
Show child attributes
Show child attributes
{ "A1": "4", "A3": "6" }
Response
The updated dataset
"Steel billet, hot rolled"
"A descriptive description"
"Internal notes about this product"
"SKU123"
"CPC123"
The supplier's part identifier for this product.
"PART-123"
The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the List Units endpoint.
"kg"
The user-declared weight of the product. On read responses, compare with the server-computed modeledWeight to mass-balance the product against its bill of materials.
Show child attributes
Show child attributes
The user-declared weight of the product's packaging. On read responses, compare with the server-computed modeledPackagingWeight to mass-balance packaging against its bill of materials.
Show child attributes
Show child attributes
The user-declared recycled content of the product as a percentage (0–100). A 0 is a declared zero; omit the field when undeclared. On read responses, compare with the server-computed modeledRecycledPercent.
30
Deprecated — use impacts["GWP-fossil"]. Kept for backwards compatibility.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A reference to a taxonomy category, including its machine-readable path.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
ISO 8601 date
"2021-01-01T00:00:00.000Z"
ISO 8601 date
"2021-01-01T00:00:00.000Z"
"https://app.variable.global/uploads/image.jpg"
Environmental impact indicators keyed by canonical code (e.g. GWP-fossil, ODP, AP). Which indicators appear is controlled by the impacts query parameter — by default only GWP-fossil is returned.
Show child attributes
Show child attributes
{
"GWP-fossil": {
"unit": "kgCO2e",
"method": "Mixed",
"totalCarbonFootprint": "10",
"A1_A3": "10"
},
"ODP": {
"unit": "kgCFC11e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "0.0000012"
},
"AP": {
"unit": "molH+e",
"method": "EN15804+A2 - Core impact categories and indicators",
"A1_A3": "2"
}
}
1.4
Read-only. Where the record sits in its version workflow. draft is the editable
working copy; every other state is immutable. locked is finalized but not reviewed,
in_review has been picked up by a verifier, rejected was refused with a reason,
and verified is signed off. Ignored on POST/PATCH.
draft, locked, in_review, rejected, verified "draft"
ISO 8601 date
"2021-01-01T00:00:00.000Z"
ISO 8601 date
"2021-01-31T23:59:59.000Z"
Show child attributes
Show child attributes