Create Switch
Create a switch
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
"Switch Name"
The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the List Units endpoint.
"kg"
Response
A Switch
"Switch Name"
The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the List Units endpoint.
"kg"
"https://app.variable.global/uploads/image.jpg"
Deprecated — use impacts["GWP-fossil"]. Kept for backwards compatibility.
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.
{
"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"
}
}ISO 8601 date
"2021-01-01T00:00:00.000Z"
ISO 8601 date
"2021-01-31T23:59:59.000Z"