Skip to main content
POST
Post Activity

Authorizations

Authorization
string
header
required

A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>

Headers

x-client-secret
string
required

A secret token identifying the client connecting to the API

Example:

"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"

Path Parameters

project_id
string
required
Required string length: 20 - 37
Examples:

"prj_1CTWZQGKE1S0VAXA"

"prj_1E0QTWB22SBX34D1"

Body

application/json
activity_type
string
required

The type of the activity. Use GET /projects/{project_id}/supported_activity_types to discover which types are valid for your project.

Example:

"reforestation_field_plot_measurement"

name
string
required

The name of the activity. Must be at most 100 characters long.

Required string length: 1 - 100
supplier_reference_id
string
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200
time
ActivityDate · object
required

When the activity happened. Its shape depends on the activity type, and it is null for activity types without a time.

additional_metadata
Additional Metadata · object | null

Metadata fields that the project's protocol does not define for this asset type.

description
string | null

Description for the activity. Must be at most 1000 characters long.

Maximum string length: 1000
happens_at_site_ids
string[] | null

Optional set of IDs of the sites this activity happens at. All sites must be of the same type.

Required string length: 20 - 37
measurements
CreateMeasurementRequest · object[] | null
metadata
Metadata · object

Metadata fields that the project's protocol defines for this asset type.

output_materials
CreateOutputMaterialRequest · object[] | null
parent_activity_ids
string[] | null

Optional set of activity IDs to set as parents of this activity.

Required string length: 20 - 37
preceding_activity_ids
string[] | null

Optional set of activity IDs that this activity follows.

Required string length: 20 - 37
referenced_material_ids
string[] | null

Optional set of material IDs that this activity references.

Required string length: 20 - 37

Response

Successful Response

activity_type
string
required

The type of the activity. Use GET /projects/{project_id}/supported_activity_types to discover which types are valid for your project.

Example:

"reforestation_field_plot_measurement"

additional_metadata
Additional Metadata · object
required

Metadata fields that the project's protocol does not define for this asset type.

description
string | null
required

Description for the activity. Must be at most 1000 characters long.

Maximum string length: 1000
id
string
required
Required string length: 20 - 37
Examples:

"atv_1CEGPMJQF1S0EHG0"

"atv_1EQ9F8WQ7SBXE3JC"

measurements
MeasurementValue · object[]
required
metadata
Metadata · object
required

Metadata fields that the project's protocol defines for this asset type.

name
string
required

The name of the activity. Must be at most 100 characters long.

Maximum string length: 100
project_id
string
required
Required string length: 20 - 37
Examples:

"prj_1CTWZQGKE1S0VAXA"

"prj_1E0QTWB22SBX34D1"

supplier_reference_id
string
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200
time
ActivityDate · object
required

When the activity happened. Its shape depends on the activity type, and it is null for activity types without a time.