ESG Carbon Emission API Module
The HousesRenovators ESG Carbon API provides a comprehensive carbon management solution, from carbon emission calculation to carbon credit trading and ESG report generation, meeting all corporate carbon management needs in one place.
Carbon Emission Calculation API
Accurately calculates Scope 1, 2, and 3 carbon emissions, supporting multiple calculation methods and emission factor sources.
Request Example
{
"activity_type": "energy",
"activity_data": {
"energy_type": "electricity",
"amount": 1250,
"unit": "kWh",
"location": "TW"
},
"calculation_method": "location-based"
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v2/carbon/calculate';
$data = [
'activity_type' => 'energy',
'activity_data' => [
'energy_type' => 'electricity',
'amount' => 1250,
'unit' => 'kWh',
'location' => 'TW'
],
'calculation_method' => 'location-based'
];
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v2/carbon/calculate"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"activity_type": "energy",
"activity_data": {
"energy_type": "electricity",
"amount": 1250,
"unit": "kWh",
"location": "TW"
},
"calculation_method": "location-based"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import org.json.JSONObject;
public class CarbonCalculate {
public static void main(String[] args) throws Exception {
String url = "https://api.faucetsolution.com.tw/v2/carbon/calculate";
String apiKey = "YOUR_API_KEY";
JSONObject data = new JSONObject();
data.put("activity_type", "energy");
JSONObject activityData = new JSONObject();
activityData.put("energy_type", "electricity");
activityData.put("amount", 1250);
activityData.put("unit", "kWh");
activityData.put("location", "TW");
data.put("activity_data", activityData);
data.put("calculation_method", "location-based");
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(data.toString()))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v2/carbon/calculate"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
},
Content = new StringContent(
"{\"activity_type\":\"energy\"," +
"\"activity_data\":{" +
"\"energy_type\":\"electricity\"," +
"\"amount\":1250," +
"\"unit\":\"kWh\"," +
"\"location\":\"TW\"}," +
"\"calculation_method\":\"location-based\"}",
Encoding.UTF8,
"application/json")
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
Carbon Credits and Trading Chain API
Manage carbon credit assets, track blockchain carbon transactions, and achieve carbon offsetting.
Request Example
{
"action": "purchase",
"amount": 100,
"unit": "kgCO₂e",
"currency": "TWD",
"payment_method": "credit_card"
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v2/carbon/credits/transaction';
$data = [
'action' => 'purchase',
'amount' => 100,
'unit' => 'kgCO₂e',
'currency' => 'TWD',
'payment_method' => 'credit_card'
];
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v2/carbon/credits/transaction"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"action": "purchase",
"amount": 100,
"unit": "kgCO₂e",
"currency": "TWD",
"payment_method": "credit_card"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import org.json.JSONObject;
public class CarbonTransaction {
public static void main(String[] args) throws Exception {
String url = "https://api.faucetsolution.com.tw/v2/carbon/credits/transaction";
String apiKey = "YOUR_API_KEY";
JSONObject data = new JSONObject();
data.put("action", "purchase");
data.put("amount", 100);
data.put("unit", "kgCO₂e");
data.put("currency", "TWD");
data.put("payment_method", "credit_card");
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(data.toString()))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v2/carbon/credits/transaction"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
},
Content = new StringContent(
"{\"action\":\"purchase\"," +
"\"amount\":100," +
"\"unit\":\"kgCO₂e\"," +
"\"currency\":\"TWD\"," +
"\"payment_method\":\"credit_card\"}",
Encoding.UTF8,
"application/json")
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
ESG Self-Assessment and Reporting API
Automatically generates ESG reports compliant with GRI, SASB, TCFD and other standards.
Request Example
{
"organization_id": "org_12345",
"reporting_period": {
"start_date": "2023-01-01",
"end_date": "2023-12-31"
},
"framework": "GRI",
"language": "zh-TW"
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v2/esg/report';
$data = [
'organization_id' => 'org_12345',
'reporting_period' => [
'start_date' => '2023-01-01',
'end_date' => '2023-12-31'
],
'framework' => 'GRI',
'language' => 'zh-TW'
];
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v2/esg/report"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"organization_id": "org_12345",
"reporting_period": {
"start_date": "2023-01-01",
"end_date": "2023-12-31"
},
"framework": "GRI",
"language": "zh-TW"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import org.json.JSONObject;
public class ESGReport {
public static void main(String[] args) throws Exception {
String url = "https://api.faucetsolution.com.tw/v2/esg/report";
String apiKey = "YOUR_API_KEY";
JSONObject data = new JSONObject();
data.put("organization_id", "org_12345");
JSONObject reportingPeriod = new JSONObject();
reportingPeriod.put("start_date", "2023-01-01");
reportingPeriod.put("end_date", "2023-12-31");
data.put("reporting_period", reportingPeriod);
data.put("framework", "GRI");
data.put("language", "zh-TW");
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(data.toString()))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v2/esg/report"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
},
Content = new StringContent(
"{\"organization_id\":\"org_12345\"," +
"\"reporting_period\":{" +
"\"start_date\":\"2023-01-01\"," +
"\"end_date\":\"2023-12-31\"}," +
"\"framework\":\"GRI\"," +
"\"language\":\"zh-TW\"}",
Encoding.UTF8,
"application/json")
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
ESG Score and Carbon Summary API
Query an organization's ESG score and carbon emission summary information.
Request Parameters
Parameter
Type
Description
organization_id
string
Required, organization unique identifier
year
number
Optional, year, defaults to current year
Response Example
{
"status": "success",
"data": {
"organization_id": "org_12345",
"year": 2023,
"esg_score": 78.5,
"esg_rating": "A",
"carbon_footprint": {
"scope_1": 1250.5,
"scope_2": 2450.2,
"scope_3": 3820.7,
"unit": "kgCO₂e"
},
"carbon_intensity": 12.5,
"intensity_unit": "kgCO₂e/10k revenue",
"reduction_target": 30.0,
"target_year": 2030,
"compliance": [
"ISO 14064",
"GHG Protocol",
"TCFD"
]
}
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v1/esg/report?organization_id=org_12345&year=2023';
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v1/esg/report"
params = {
"organization_id": "org_12345",
"year": 2023
}
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class ESGReportSummary {
public static void main(String[] args) throws Exception {
String organizationId = "org_12345";
int year = 2023;
String url = "https://api.faucetsolution.com.tw/v1/esg/report?organization_id=" +
URLEncoder.encode(organizationId, StandardCharsets.UTF_8) +
"&year=" + year;
String apiKey = "YOUR_API_KEY";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v1/esg/report?organization_id=org_12345&year=2023"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
}
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
Carbon Footprint Query API
Query detailed carbon footprint information for a single device or department.
Request Parameters
Parameter
Type
Description
entity_id
string
Required, device or department ID
entity_type
string
Required, entity type (device, department)
year
number
Optional, year, defaults to current year
granularity
string
Optional, data granularity (month, quarter, year), defaults to month
Response Example
{
"status": "success",
"data": {
"entity_id": "dev_12345",
"entity_type": "device",
"year": 2023,
"total_carbon_footprint": 1250.5,
"unit": "kgCO₂e",
"breakdown": {
"electricity": 850.3,
"fuel": 250.2,
"water": 50.0,
"waste": 100.0
},
"monthly_trend": [
{
"month": "2023-01",
"carbon_footprint": 105.2,
"electricity_usage": 720.5,
"unit": "kWh"
},
{
"month": "2023-02",
"carbon_footprint": 98.7,
"electricity_usage": 680.3,
"unit": "kWh"
}
],
"comparison": {
"industry_average": 1500.0,
"best_practice": 800.0
}
}
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v1/esg/carbon-footprint?entity_id=dev_12345&entity_type=device&year=2023';
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v1/esg/carbon-footprint"
params = {
"entity_id": "dev_12345",
"entity_type": "device",
"year": 2023
}
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class CarbonFootprint {
public static void main(String[] args) throws Exception {
String entityId = "dev_12345";
String entityType = "device";
int year = 2023;
String url = "https://api.faucetsolution.com.tw/v1/esg/carbon-footprint?entity_id=" +
URLEncoder.encode(entityId, StandardCharsets.UTF_8) +
"&entity_type=" + URLEncoder.encode(entityType, StandardCharsets.UTF_8) +
"&year=" + year;
String apiKey = "YOUR_API_KEY";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v1/esg/carbon-footprint?entity_id=dev_12345&entity_type=device&year=2023"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
}
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}
Carbon Credit Estimation API
Estimates the number of carbon credits (Carbon Credit) that can be generated from energy-saving measures.
Request Parameters
Parameter
Type
Description
project_id
string
Required, energy-saving project ID
methodology
string
Optional, carbon credit calculation methodology, defaults to ACM0002
Response Example
{
"status": "success",
"data": {
"project_id": "proj_12345",
"methodology": "ACM0002",
"estimated_credits": 125.5,
"unit": "tCO₂e",
"credits_per_year": 25.1,
"estimated_revenue": 12550.0,
"currency": "TWD",
"verification_cost": 2500.0,
"currency": "TWD",
"breakdown": {
"baseline_emissions": 150.2,
"project_emissions": 24.7,
"leakage": 0.0,
"unit": "tCO₂e/year"
},
"certification_process": [
"PDD Development",
"Third-party Verification",
"Registration",
"Monitoring",
"Issuance"
],
"estimated_timeline": {
"pdd_development": 30,
"validation": 60,
"registration": 90,
"first_verification": 180,
"unit": "days"
}
}
}
Code Examples
PHP
Python
Java
C#
// PHP Example
$url = 'https://api.faucetsolution.com.tw/v1/esg/carbon-credit-estimate?project_id=proj_12345&methodology=ACM0002';
$options = [
'http' => [
'header' => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
# Python Example
import requests
url = "https://api.faucetsolution.com.tw/v1/esg/carbon-credit-estimate"
params = {
"project_id": "proj_12345",
"methodology": "ACM0002"
}
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
// Java Example
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class CarbonCreditEstimate {
public static void main(String[] args) throws Exception {
String projectId = "proj_12345";
String methodology = "ACM0002";
String url = "https://api.faucetsolution.com.tw/v1/esg/carbon-credit-estimate?project_id=" +
URLEncoder.encode(projectId, StandardCharsets.UTF_8) +
"&methodology=" + URLEncoder.encode(methodology, StandardCharsets.UTF_8);
String apiKey = "YOUR_API_KEY";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer " + apiKey)
.header("Content-Type", "application/json")
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
// C# Example
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program {
static async Task Main() {
var client = new HttpClient();
var request = new HttpRequestMessage {
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.faucetsolution.com.tw/v1/esg/carbon-credit-estimate?project_id=proj_12345&methodology=ACM0002"),
Headers = {
{ "Authorization", "Bearer YOUR_API_KEY" }
}
};
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}