Material
Update Material
Auth Token
Database
Product
Material
Switch
Supplier
Org
Scope
Taxonomy
Unit
Material
Update Material
Update a material
PATCH
/
v1
/
material
/
:uuid
curl --request PATCH \
--url https://app.variable.global/api/v1/material/:uuid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataSource": "model",
"name": "Product Name",
"description": "A descriptive description",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"unit": "kg",
"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": ""
}
},
"dataQualityIndicators": {
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"slug": "electricity",
"path": "energy/electricity"
},
"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"
}'
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataSource": "model",
"name": "Material Name",
"description": "A descriptive description",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"unit": "kg",
"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": {
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1,
"averagePercent": 60,
"temporalDQR": 3
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"slug": "electricity",
"path": "energy/electricity"
},
"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",
"dataQualityRating": 1.4,
"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"
}
}
Requires permission:
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
A material
The response is of type object
.
curl --request PATCH \
--url https://app.variable.global/api/v1/material/:uuid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataSource": "model",
"name": "Product Name",
"description": "A descriptive description",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"unit": "kg",
"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": ""
}
},
"dataQualityIndicators": {
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"slug": "electricity",
"path": "energy/electricity"
},
"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"
}'
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataSource": "model",
"name": "Material Name",
"description": "A descriptive description",
"sku": "SKU123",
"syncId": "sync123",
"cpcCode": "CPC123",
"unit": "kg",
"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": {
"documentationYear": 2019,
"coveragePercent": 80,
"specificPercent": 40,
"technologicalDQR": 1,
"geographicalDQR": 1,
"completenessDQR": 1,
"reliabilityDQR": 1,
"averagePercent": 60,
"temporalDQR": 3
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material",
"slug": "electricity",
"path": "energy/electricity"
},
"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",
"dataQualityRating": 1.4,
"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"
}
}