Get Detailed Financial Information
curl --request GET \
--url https://api.terraspect.earth/financials/details/{project_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.terraspect.earth/financials/details/{project_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.terraspect.earth/financials/details/{project_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.terraspect.earth/financials/details/{project_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.terraspect.earth/financials/details/{project_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.terraspect.earth/financials/details/{project_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.terraspect.earth/financials/details/{project_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"project_id": "proj_789012",
"revenue_share_percentage": 30.5,
"payment_types": {
"planting": 5000,
"labour": 3000,
"lease": 2000,
"revenue-share": 10000,
"equipment": 4000,
"expenses": 1500,
"training": 2500,
"seedlings": 1200,
"technical": 3000,
"health": 500,
"audit": 1000,
"taxes": 600,
"maintenance": 700,
"loans": 800,
"savings": 900,
"insurance": 1000,
"pension": 1100
},
"payment_distribution": {
"payment_direct": 70,
"payment_group": 30
},
"payment_methods": {
"payment_mobile_money": 60,
"payment_bank_transfer": 35,
"payment_unknown": 5
},
"payment_frequency": 30,
"revenue_share_amount_usd": 1500000,
"total_community_income_usd": 2000000
}Financials
Details
Get detailed financials for a project
GET
/
financials
/
details
/
{project_id}
Get Detailed Financial Information
curl --request GET \
--url https://api.terraspect.earth/financials/details/{project_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.terraspect.earth/financials/details/{project_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.terraspect.earth/financials/details/{project_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.terraspect.earth/financials/details/{project_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.terraspect.earth/financials/details/{project_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.terraspect.earth/financials/details/{project_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.terraspect.earth/financials/details/{project_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"project_id": "proj_789012",
"revenue_share_percentage": 30.5,
"payment_types": {
"planting": 5000,
"labour": 3000,
"lease": 2000,
"revenue-share": 10000,
"equipment": 4000,
"expenses": 1500,
"training": 2500,
"seedlings": 1200,
"technical": 3000,
"health": 500,
"audit": 1000,
"taxes": 600,
"maintenance": 700,
"loans": 800,
"savings": 900,
"insurance": 1000,
"pension": 1100
},
"payment_distribution": {
"payment_direct": 70,
"payment_group": 30
},
"payment_methods": {
"payment_mobile_money": 60,
"payment_bank_transfer": 35,
"payment_unknown": 5
},
"payment_frequency": 30,
"revenue_share_amount_usd": 1500000,
"total_community_income_usd": 2000000
}Authorizations
Extended access token required for more sensitive data, in the format Authorization: Bearer <token>
Path Parameters
Unique identifier of the project
Query Parameters
Start date for financial data (ISO 8601 format)
Example:
"2024-01-01"
End date for financial data (ISO 8601 format)
Example:
"2024-12-31"
Response
Detailed financial information successfully retrieved
Project identifier
Example:
"proj_789012"
Percentage of revenue shared with community
Required range:
0 <= x <= 100Example:
30.5
Breakdown of different payment types and their amounts
Show child attributes
Show child attributes
Example:
{
"planting": 5000,
"labour": 3000,
"lease": 2000,
"revenue-share": 10000,
"equipment": 4000,
"expenses": 1500,
"training": 2500,
"seedlings": 1200,
"technical": 3000,
"health": 500,
"audit": 1000,
"taxes": 600,
"maintenance": 700,
"loans": 800,
"savings": 900,
"insurance": 1000,
"pension": 1100
}
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Average payment frequency in days
Required range:
x >= 1Example:
30
Total amount shared with community in USD
Example:
1500000
Total income received by community in USD
Example:
2000000