Skip to main content
GET
/
v1
/
switch
Get a list of Switches
curl --request GET \
  --url https://app.variable.global/api/v1/switch \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "syncId": "sync123",
      "name": "Switch Name",
      "unit": "kg",
      "image": "https://app.variable.global/uploads/image.jpg",
      "sources": [
        {
          "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "Name"
        }
      ],
      "footprint": {
        "CO2e": {
          "productCarbonFootprint": "1234.5678",
          "A1_A3": "1234.5678"
        }
      },
      "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"
        }
      },
      "created": "2021-01-01T00:00:00.000Z",
      "updated": "2021-01-31T23:59:59.000Z"
    }
  ]
}
Requires permission:
Read more about the Switch data model.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

impacts
string

Which environmental impact indicators to include in the impacts field. Absent or empty returns only GWP-fossil. Pass all for every indicator, or a comma-separated list of canonical codes to filter (case-insensitive). all is only honored on its own — combining it with other codes (e.g. all,gwp-fossil) is treated as an unknown code. An unknown code returns 400. See the Impacts concept and the full indicator catalog.

Example:

"gwp-fossil,odp,ap"

Response

A list of Switches

data
object[]
required