Auditable Reporting
SQUAKE provides auditable reporting capabilities to bring transparency, traceability, and confidence to your carbon calculations. With Audit Logs, you can retrieve detailed records of each calculation request and its outcome, supporting compliance and verification needs.
β
What is Audit Logging?
Audit logging is a core feature of the SQUAKE API that creates immutable records of your calculation requests. These logs store details including:
Input parameters (e.g., activity type, route, methodology)
Results (carbon quantities, units, breakdown per activity if applicable)
Methodology references (including document sources and versions)
Calculation specifics (e.g., emission factors, distance corrections, assumptions applied)
Timestamps of the calculation event
π How do I enable Audit Logging?
Audit logging is automatically included when enabled for your account by your Account Manager.
Please contact [email protected]
or your dedicated account manager to activate.
π API Endpoints Overview
GET /v2/audits
Retrieve a list of all audit logs for your account
β
GET /v2/audits/{id}
Retrieve detailed information of a specific audit log
β
π Authentication
All requests require Bearer Token authentication. Example:
curl --request GET https://api.squake.earth/v2/audits \
--header "Authorization: Bearer YOUR_ACCESS_TOKEN"
π₯ Retrieve Audit Logs List
Retrieve the list of audit logs for your account:
GET https://api.squake.earth/v2/audits
Successful Response Example:
[
{
"id": "0194d6b4-8711-7873-899d-c8133cd742f8",
"request": {...},
"response": {...},
"calculated_at": "2025-02-18T16:39:10Z"
}
]
π₯ Retrieve Specific Audit Log
Retrieve the detailed breakdown of a specific log entry:
GET https://api.squake.earth/v2/audits/{id}
Example Response:
{
"id": "0194d6b4-8711-7873-899d-c8133cd742f8",
"request": {...},
"response": {...},
"methodology": {...},
"calculation": {...},
"calculated_at": "2025-02-18T16:39:10Z"
}
π‘ Example Calculation Request with Audit Logging Enabled
{
"expand": [
"items"
],
"audit_for": {
"legal_name": "Sample Company AG",
"external_id": "string"
},
"items": [
{
"audit": true,
"type": "flight",
"methodology": "tim",
"external_reference": "string",
"origin": "FRA",
"destination": "JFK",
"booking_class": "business",
"airline": "LH"
},
{
"expand": [
"items"
],
"items": [
{
"audit": true,
"type": "hotel",
"methodology": "HCMI",
"external_reference": "string",
"country": "US",
"stars": 5,
"number_of_nights": 3
}
]
},
{
"audit": true,
"type": "flight",
"methodology": "tim",
"external_reference": "string",
"origin": "JFK",
"destination": "FRA",
"booking_class": "business",
"airline": "LH"
}
]
}
π What Data Is Included in an Audit Log?
id
Unique audit log ID (UUID)
calculated_at
Timestamp (ISO 8601) when the calculation was performed
request
Input parameters: activity type, origin, destination, methodology, etc.
response
Carbon quantity, unit, detailed per activity if applicable
methodology
Methodology name, version, source URL
calculation
Calculation details: distances, emission factors, corrections, assumptions
π Process Flow
flowchart TD
A[Calculation Request
audit=true] --> B[Audit Log Created
with request & response details]
B --> C[Retrieve Logs List]
C[GET /v2/audits]
C --> D[Select Log ID]
D --> E[Retrieve Full Log Details]
E[GET /v2/audits/:id]
E --> F[Use for Reporting,
Compliance, Verification]
π Useful References
Contact:
[email protected]
Last updated
Was this helpful?