Skip to main content
POST
Create a Switch
Requires permission:

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
Example:

"Switch Name"

syncId
string

An identifier to use when syncing data with other systems. Read more

Example:

"sync123"

unit
string

The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the List Units endpoint.

Example:

"kg"

Response

A Switch

uuid
string<uuid>
syncId
string

An identifier to use when syncing data with other systems. Read more

Example:

"sync123"

name
string
Example:

"Switch Name"

unit
string

The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the List Units endpoint.

Example:

"kg"

image
string
Example:

"https://app.variable.global/uploads/image.jpg"

sources
object[]
footprint
object
deprecated

Deprecated — use impacts["GWP-fossil"]. Kept for backwards compatibility.

impacts
object

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.

Example:
created
string

ISO 8601 date

Example:

"2021-01-01T00:00:00.000Z"

updated
string

ISO 8601 date

Example:

"2021-01-31T23:59:59.000Z"