Retrieve a specific Audit log

GET
/v2/audits/{id}

Retrieves detailed information about a specific Audit log

Authorization

Bearer-Auth
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

OK

application/json
  1. response

When Audit mode is enabled for a client, SQUAKE will generate audit logs if it's requested within the calculations request body. These logs are immutable; once they are created they cannot be altered—please use this feature only for final calculations.

Operational notes:

  • Use audit mode whenever a calculation is for past activity / post-booking (post-validated) (e.g., ticketed & already-flown flights, completed stays/trips, historical backfills, invoice reconciliation/true-ups, corrections). These records are final and must be immutable.
  • Audit mode must not be used for future-looking / pre-booking or other non-final use cases (e.g., shopping/quotes, draft or tentative itineraries, forecasting/scenario planning, preliminary estimates, or POS value requests). These are expected to change.
  • Post-booking (finalized) calculations MUST be performed with audit mode enabled.
  • Pre-booking (non-audit) calculated values must not be carried over into post-booking reporting; after the activity is finalized, the calculation must be re-run with audit mode enabled.
  • Requests that handle points-of-sale (POS) values or other preview/estimation-only calls MUST be sent without audit mode.

Rule of thumb: Past/post-validated = audit mode; Future/pre-booking = no audit mode.

id?string

A unique identifier for the audit, represented as a universally unique identifier (UUID)

Formatuuid
calculated_at?string

The date of the calculation requested.

Formatdate-time
request?

The item from the request body used for the calculation. The structure of this property may vary based on the parameters of the calculation request.

response?

The calculation results provided in the response by SQUAKE.

calculation?

More details information like the distance and the emission factors used during the calculation. To have this feature enabled, please contact SQUAKE support

methodology?

Information about the methodology used for the calculation.

audit_for?string

If you make a calculation on behalf of a specific legal entity, you can specify the ID of the auditable entity.

Example Request
curl -X GET 'https://api.sandbox.squake.earth/v2/audits/string'
Example Response
{  "id": "0194d6b4-8711-7873-899d-c8133cd742f8",  "calculated_at": "2025-02-18T16:39:10Z",  "request": {    "type": "flight",    "methodology": "ICAO",    "origin": "SAF",    "destination": "ATL"  },  "response": {    "carbon_quantity": 302.75,    "carbon_unit": "kilogram"  },  "calculation": {    "distance": {      "corrected": {        "distance": 3438,        "distance_unit": "kilometer"      },      "original": {        "distance": 3437.83,        "distance_unit": "kilometer"      }    },    "emission_factors": {      "co2_per_passenger": 0.5,      "flight_type": "long_haul"    }  },  "methodology": {    "name": "ICAO",    "version": "1.0",    "source": "https://applications.icao.int/icec/Methodology%20ICAO%20Carbon%20Emissions%20Calculator_v13_Final.pdf"  }}