Switch
Edit Switch
Auth Token
Database
Product
Material
Switch
Supplier
Org
Scope
Taxonomy
Unit
Switch
Edit Switch
Edit a switch
PATCH
/
v1
/
switch
/
:uuid
curl --request PATCH \
--url https://app.variable.global/api/v1/switch/:uuid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"syncId": "sync123",
"name": "Switch Name",
"unit": "kg"
}'
{
"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"
}
},
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z"
}
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 Switch
The response is of type object
.
curl --request PATCH \
--url https://app.variable.global/api/v1/switch/:uuid \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"syncId": "sync123",
"name": "Switch Name",
"unit": "kg"
}'
{
"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"
}
},
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z"
}