Prepared for Puro.earth. Api Integration Spec. Draft in review.
This document serves as a comprehensive technical specification for the API-based data exchange between DaedArch Corporation and Puro.earth. The integration aims to facilitate the seamless transfer of carbon removal credit data and ensure compliance with Puro.earth's standards for carbon removal credits. This API will enable DaedArch to submit verified data from its sensor-based MRV platform to Puro.earth, which focuses exclusively on engineered carbon removal solutions including biochar, BECCS, enhanced weathering, and direct air capture.
The document outlines the authentication mechanisms, API endpoints, data models, error handling procedures, and rate limits that DaedArch must adhere to in order to achieve compliance with Puro.earth’s requirements.
Puro.earth employs OAuth 2.0 for API authentication. DaedArch shall implement the following steps to authenticate API requests:
Request Format: ` POST /oauth/token HTTP/1.1 Host: api.puro.earth Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET} `
Response Format: `json { "access_token": "eyJz93a...k4laUWw", "token_type": "Bearer", "expires_in": 3600 } `
Example: ` Authorization: Bearer {access_token} `
Access tokens are valid for 1 hour (3600 seconds). DaedArch shall implement a token refresh mechanism to ensure continuous access without interruption.
Endpoint: /api/v1/carbon-removal-credits
Method: POST
Description: This endpoint allows DaedArch to submit verified carbon removal credit data.
Request Format: `json { "credit_id": "string", "project_id": "string", "methodology": "string", "amount": "number", "unit": "string", "timestamp": "string", "metadata": { "sensor_data": { "temperature": "number", "humidity": "number", "co2_capture": "number" }, "location": { "latitude": "number", "longitude": "number" }, "additional_info": "string" } } `
Required Fields:
credit_id: Unique identifier for the carbon credit (string, required).project_id: Unique identifier for the project (string, required).methodology: The methodology used for carbon removal (string, must be one of: "biochar", "BECCS", "enhanced weathering", "direct air capture").amount: The amount of carbon removed (number, required).unit: The unit of measurement for carbon removal (string, required, must be "tonnes").timestamp: ISO 8601 formatted date-time string (string, required).metadata: Object containing additional information about the carbon removal process.Response Format: `json { "status": "success", "message": "Carbon removal credit data submitted successfully.", "data": { "submission_id": "string", "timestamp": "string" } } `
Endpoint: /api/v1/carbon-removal-credits/{credit_id}
Method: GET
Description: This endpoint allows DaedArch to retrieve details of a specific carbon removal credit.
Response Format: `json { "credit_id": "string", "project_id": "string", "methodology": "string", "amount": "number", "unit": "string", "timestamp": "string", "metadata": { "sensor_data": { "temperature": "number", "humidity": "number", "co2_capture": "number" }, "location": { "latitude": "number", "longitude": "number" }, "additional_info": "string" } } `
Endpoint: /api/v1/carbon-removal-credits/batch
Method: POST
Description: This endpoint allows DaedArch to submit multiple carbon removal credit records in a single request.
Request Format: `json { "credits": [ { "credit_id": "string", "project_id": "string", "methodology": "string", "amount": "number", "unit": "string", "timestamp": "string", "metadata": { "sensor_data": { "temperature": "number", "humidity": "number", "co2_capture": "number" }, "location": { "latitude": "number", "longitude": "number" }, "additional_info": "string" } } ] } `
Response Format: `json { "status": "success", "message": "Batch submission processed successfully.", "data": [ { "submission_id": "string", "timestamp": "string" } ] } `
The following data model shall be used for representing carbon removal credits:
| Field Name | Data Type | Description | Required | |--------------------|-----------|--------------------------------------------------------------|----------| | credit_id | String | Unique identifier for the carbon credit | Yes | | project_id | String | Unique identifier for the project | Yes | | methodology | String | Methodology used for carbon removal | Yes | | amount | Number | Amount of carbon removed in tonnes | Yes | | unit | String | Unit of measurement ("tonnes") | Yes | | timestamp | String | ISO 8601 formatted timestamp of the submission | Yes | | metadata | Object | Additional metadata related to the credit | Yes |
The metadata object shall follow the structure outlined below:
| Field Name | Data Type | Description | Required | |--------------------|-----------|--------------------------------------------------------------|----------| | sensor_data | Object | Data captured from sensors | Yes | | location | Object | Geographical location of the carbon removal process | Yes | | additional_info | String | Any additional information relevant to the credit | No |
The sensor_data object shall contain the following fields:
| Field Name | Data Type | Description | Required | |--------------------|-----------|--------------------------------------------------------------|----------| | temperature | Number | Temperature reading from the sensor | Yes | | humidity | Number | Humidity reading from the sensor | Yes | | co2_capture | Number | Amount of CO2 captured as measured by the sensor | Yes |
The location object shall include:
| Field Name | Data Type | Description | Required | |--------------------|-----------|--------------------------------------------------------------|----------| | latitude | Number | Latitude of the carbon removal site | Yes | | longitude | Number | Longitude of the carbon removal site | Yes |
In the event of an error, Puro.earth shall return an error response in the following format:
`json { "status": "error", "error_code": "string", "message": "string" } `
| Error Code | Description | |---------------------|--------------------------------------------------------------| | INVALID_REQUEST | The request format is invalid or missing required fields. | | UNAUTHORIZED | Authentication failed or token is expired. | | NOT_FOUND | The specified resource was not found. | | INTERNAL_SERVER_ERROR| An internal error occurred while processing the request. |
Puro.earth enforces rate limits to ensure fair usage of the API. The following limits shall apply:
If DaedArch exceeds the rate limit, the API shall return the following response:
`json { "status": "error", "error_code": "rate_limit_exceeded", "message": "Rate limit exceeded. Please try again later." } `
DaedArch shall implement logging mechanisms to monitor API usage and ensure compliance with the rate limits. Regular audits shall be performed to verify adherence to the specified limits.
This API Integration Specification outlines the requirements and protocols necessary for DaedArch Corporation to integrate with Puro.earth's systems for the submission of carbon removal credit data. By adhering to the specified authentication methods, data formats, error handling procedures, and rate limits, DaedArch shall ensure compliance with Puro.earth's standards and facilitate the efficient exchange of carbon removal credit information.
All implementations must be thoroughly tested against the outlined specifications prior to deployment. Regular updates to this document may occur as standards evolve, and DaedArch shall remain compliant with the latest specifications issued by Puro.earth.