HabiTerre API (1.0.0)

Download OpenAPI specification:Download

Introduction

The HabiTerre API enables access to full net-GHG calculation including both baseline & historical calculations​ and scenario forecasting.

Authentication

HabiTerre API uses OAuth2 access tokens for authentication, which are required to access all the resource endpoints. Users can get access to data while protecting their account credentials. OAuth2 is also a safer and more secure way to provide users access to their data.

OAuth2

In order to obtain an OAuth2 access token, the user can fetch it via the authorization tool in their request client or via code. The client_id and client_secret needs to be provided in the authorization body After the token is issued, the user can use it to access any endpoints in the HabiTerre API. The token is valid for 60 minutes from the time it was generated.

Security Scheme Type: OAuth2
Flow type: clientCredentials
Token URL: https://api.habiterre.com/oauth2/token

Orders

GHG quantification order with historical information for each field.

Create a new order

Order Requirement types

Requirements for Intervention Orders:
  • Crop, tillage, fertilizer, and manure data for the year of practice change.
  • Three prior years of historical crop, tillage, fertilizer, and manure data.
  • Fertilizers: 10-34-0, Anhydrous Ammonia, TS, Custom Blend (liquid), KTS, UAN-28, UAN-32 → must be applied in gal/ac
  • Fertilizers: Ammonium Nitrate, AMS, Custom Blend (solid), DAP, K Mag, MAP, MESZ 12-40, NPSZ 12-45, Potash, Urea, Potassium Sulfate, ESN (Slow Release), Super U (Slow Release) → must be applied in lbs/ac
  • Manure: Lagoon liquid and Slurry liquidgal/ac, Semi-dry or drylbs/ac
Requirements for Inventory Orders:
  • Crop, tillage, fertilizer, and manure data for the project year.
  • Fertilizers: 10-34-0, Anhydrous Ammonia, TS, Custom Blend (liquid), KTS, UAN-28, UAN-32 → must be applied in gal/ac
  • Fertilizers: Ammonium Nitrate, AMS, Custom Blend (solid), DAP, K Mag, MAP, MESZ 12-40, NPSZ 12-45, Potash, Urea, Potassium Sulfate, ESN (Slow Release), Super U (Slow Release) → must be applied in lbs/ac
  • Manure: Lagoon liquid and Slurry liquidgal/ac, Semi-dry or drylbs/ac
Authorizations:
OAuth2
Request Body schema: application/json
One of
project_id
required
string <uuid>

The project ID under which this order will be submitted.

name
string

Order Name.

crs
string <crs>
Default: "EPSG:4326"

The Coordinate Reference System (CRS) for the field boundary geometries in this order.

required
Array of objects

A list of field objects containing geometry and field historical information.

Responses

Request samples

Content type
application/json
Example
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "name": "My new order",
  • "crs": "EPSG:4326",
  • "fields": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "project_type": "Intervention",
  • "name": "My new order",
  • "crs": "EPSG:4326",
  • "fields": [
    ]
}

Get Order by ID

Get the details of a submitted order.

Authorizations:
OAuth2
path Parameters
id
required
string <uuid>

The UUID of the order

Responses

Response samples

Content type
application/json
Example
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "project_type": "Intervention",
  • "name": "My new order",
  • "crs": "EPSG:4326",
  • "fields": [
    ]
}

Update an order

Order Requirement types

Requirements for Intervention Orders:
  • Crop, tillage, fertilizer, and manure data for the year of practice change.
  • Three prior years of historical crop, tillage, fertilizer, and manure data.
  • Fertilizers: 10-34-0, Anhydrous Ammonia, TS, Custom Blend (liquid), KTS, UAN-28, UAN-32 → must be applied in gal/ac
  • Fertilizers: Ammonium Nitrate, AMS, Custom Blend (solid), DAP, K Mag, MAP, MESZ 12-40, NPSZ 12-45, Potash, Urea, Potassium Sulfate, ESN (Slow Release), Super U (Slow Release) → must be applied in lbs/ac
  • Manure: Lagoon liquid and Slurry liquidgal/ac, Semi-dry or drylbs/ac
Requirements for Inventory Orders:
  • Crop, tillage, fertilizer, and manure data for the project year.
  • Fertilizers: 10-34-0, Anhydrous Ammonia, TS, Custom Blend (liquid), KTS, UAN-28, UAN-32 → must be applied in gal/ac
  • Fertilizers: Ammonium Nitrate, AMS, Custom Blend (solid), DAP, K Mag, MAP, MESZ 12-40, NPSZ 12-45, Potash, Urea, Potassium Sulfate, ESN (Slow Release), Super U (Slow Release) → must be applied in lbs/ac
  • Manure: Lagoon liquid and Slurry liquidgal/ac, Semi-dry or drylbs/ac
Authorizations:
OAuth2
path Parameters
id
required
string <uuid>

The UUID of the order

Request Body schema: application/json
One of
project_id
required
string <uuid>

The project ID under which this order will be submitted.

name
string

Order Name.

crs
string <crs>
Default: "EPSG:4326"

The Coordinate Reference System (CRS) for the field boundary geometries in this order.

required
Array of objects

A list of field objects containing geometry and field historical information.

Responses

Request samples

Content type
application/json
Example
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "name": "My new order",
  • "crs": "EPSG:4326",
  • "fields": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
  • "project_type": "Intervention",
  • "name": "My new order",
  • "crs": "EPSG:4326",
  • "fields": [
    ]
}

Delete an order

Delete an order. An order can only be deleted when its status is still SUBMITTED.

Authorizations:
OAuth2
path Parameters
id
required
string <uuid>

The UUID of the order

Responses

Response samples

Content type
application/json
{
  • "message": "The incoming token has expired"
}

Reports

When orders finish processing, reports for the fields will be available for downloading.

Get Ecosys report

Get crop history and carbon analysis for fields by order UUID and/or with user-given field ID(s).

Authorizations:
OAuth2
path Parameters
order_id
required
string <uuid>

UUID of the order

query Parameters
user_fid
Array of strings

A comma separated list of user-given field IDs belonging to an order

Responses

Request samples

curl --location 'https://api.habiterre.com/reports/ecosys/<order_id>?user_fid=<user_fid>' \
--header 'Authorization: Bearer <auth_token>'

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Comet-planner report

Get the carbon sequestration and greenhouse gas emission reduction estimates for an order and fields using order_id and/or user_fids during the cps year.

Authorizations:
OAuth2
path Parameters
order_id
required
string <uuid>

UUID of the order

query Parameters
user_fid
Array of strings

A comma separated list of user-given field IDs belonging to an order

Responses

Request samples

curl --location 'https://api.habiterre.com/reports/comet-planner/<order_id>?user_fid=<user_fid>' \
--header 'Authorization: Bearer <auth_token>'

Response samples

Content type
application/json
{
  • "data": {
    },
  • "version": {
    }
}

Field Boundaries

HabiTerre provides proprietary farm field boundaries that can be searched by providing a GPS coordinate.

Get Field Boundaries

Get the geometry of a field boundary based on latitude and longitude.

Authorizations:
OAuth2
query Parameters
latitude
required
string

Latitude

longitude
required
string

Longitude

header Parameters
project_id
required
string <uuid>

Project ID associated with this request

Responses

Request samples

curl --location 'https://api.habiterre.com/field_boundaries?latitude=<latitude>&longitude=<longitude>' \
--header 'Authorization: Bearer <auth_token>' \
--header 'project_id: <project_id>' \

Response samples

Content type
application/json
{
  • "data": {
    },
  • "version": {
    }
}