Skip to main content
POST
/
v1
/
activity
/
bulk
Create activities in bulk
curl --request POST \
  --url https://app.variable.global/api/v1/activity/bulk \
  --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"
  }
]
'
{
  "jobId": "job_123456",
  "status": "processing",
  "totalOperations": 100,
  "message": "Bulk operation job created. Use GET /v1/job/<job_id> to check status."
}
Requires permission:
Requires permission:
Read more about the Activity data models.
Bulk operations take a maximum of 1,000 items per request.

Authorizations

Authorization
string
header
required

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

Body

application/json
uuid
string<UUID>
name
string
Example:

"Name"

created
string

ISO 8601 date

Example:

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

updated
string

ISO 8601 date

Example:

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

syncId
string

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

Example:

"sync123"

description
string
quantity
number
Example:

150

unit
string

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

Example:

"kg"

UpstreamCO2e
string

if passed, the value will be used instead of the computed value

Example:

"1234"

DownstreamCO2e
string

if passed, the value will be used instead of the computed value

Example:

"0.5678"

product
object
scope
object
taxonomy
object
org
object
startDate
string

ISO 8601 date

Example:

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

endDate
string

ISO 8601 date

Example:

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

Response

Job status

jobId
string
Example:

"job_123456"

status
string
Example:

"processing"

totalOperations
integer
Example:

100

message
string
Example:

"Bulk operation job created. Use GET /v1/job/<job_id> to check status."