Activity
Create Activity
Auth Token
Database
Product
Material
Switch
Supplier
Org
Scope
Taxonomy
Unit
Activity
Create Activity
Create a new activity
POST
/
v1
/
activity
curl --request POST \
--url https://app.variable.global/api/v1/activity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"syncId": "sync123",
"description": "<string>",
"quantity": 150,
"unit": "kg",
"UpstreamCO2e": "1234",
"DownstreamCO2e": "0.5678",
"product": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Product Name"
},
"scope": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Scope 2: Electricity"
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material"
},
"org": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Org Unit"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z"
}'
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"syncId": "sync123",
"description": "<string>",
"quantity": 150,
"unit": "kg",
"UpstreamCO2e": "1234",
"DownstreamCO2e": "0.5678",
"product": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Product Name"
},
"scope": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Scope 2: Electricity"
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material"
},
"org": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Org Unit"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z",
"CO2e": "1234.5678"
}
Requires permission:
Read more about the Activity data models.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
Activity data
The response is of type object
.
curl --request POST \
--url https://app.variable.global/api/v1/activity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"syncId": "sync123",
"description": "<string>",
"quantity": 150,
"unit": "kg",
"UpstreamCO2e": "1234",
"DownstreamCO2e": "0.5678",
"product": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Product Name"
},
"scope": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Scope 2: Electricity"
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material"
},
"org": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Org Unit"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z"
}'
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name",
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-31T23:59:59.000Z",
"syncId": "sync123",
"description": "<string>",
"quantity": 150,
"unit": "kg",
"UpstreamCO2e": "1234",
"DownstreamCO2e": "0.5678",
"product": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Product Name"
},
"scope": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Scope 2: Electricity"
},
"taxonomy": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Material"
},
"org": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Org Unit"
},
"startDate": "2021-01-01T00:00:00.000Z",
"endDate": "2021-01-01T00:00:00.000Z",
"CO2e": "1234.5678"
}