SQUAKE Integration Docs
  • πŸƒOverview
  • βœ‰οΈContact form
  • ⚠️Incident form
  • πŸ—„οΈCalculation API Examples
    • 🌐Travel
      • πŸ›ŒAccommodation
        • Accommodation: SQUAKE
      • 🚌Bus
        • Bus: SQUAKE
        • Bus: DEFRA πŸ‡¬πŸ‡§
      • πŸš—Car
        • Car: ACRISS
        • Car: DEFRA πŸ‡¬πŸ‡§
        • Car: EEA πŸ‡ͺπŸ‡Ί
        • Car: EPA πŸ‡ΊπŸ‡Έ
      • 🀝Event
        • Event: HCMI & CHSB
      • ⛴️Ferry
        • Ferry: ADEME πŸ‡«πŸ‡·
      • ✈️Flight
        • Flight: ADEME πŸ‡«πŸ‡·
        • Flight: Base Empreinte πŸ‡«πŸ‡·
        • Flight: CO2 emissiefactoren πŸ‡³πŸ‡±
        • Flight: DEFRA πŸ‡¬πŸ‡§
        • Flight: EPA πŸ‡ΊπŸ‡Έ
        • Flight: GATE4
        • Flight: ICAO
        • Flight: TIM
        • Flight: TU Chalmers πŸ‡ΈπŸ‡ͺ
      • 🏨Hotel
        • Hotel: DEFRA πŸ‡¬πŸ‡§
        • Hotel: HCMI & CHSB
        • Hotel: SQUAKE
      • πŸš†Train
        • Train: ADEME πŸ‡«πŸ‡·
        • Train: Base Empreinte πŸ‡«πŸ‡·
        • Train: CO2-emissiefactoren πŸ‡³πŸ‡±
        • Train: DEFRA πŸ‡¬πŸ‡§
        • Train: SQUAKE
    • πŸ“¦Logistics
      • ✈️Air Freight
        • Air Freight: DIN EN 16258
        • Air Freight: GLEC
      • πŸ›₯️Inland Waterways
        • Inland Waterways: GLEC
      • 🚧Logistics Site
        • Logistics Site: GLEC
      • 🚈Rail Freight
        • Rail Freight: DIN EN 16258
        • Rail Freight: ECTA
        • Rail Freight: GLEC
      • 🚚Road Freight
        • Road Freight: DIN EN 16258
        • Road Freight: GLEC
      • 🚒Sea Freight
        • Road Freight: Clean Cargo
        • Road Freight: DIN EN 16258
        • Road Freight: EMSA πŸ‡ͺπŸ‡Ί
        • Road Freight: GLEC
      • πŸš›Van
        • Van: EEA πŸ‡ͺπŸ‡Ί
  • πŸ†•Notable Changes
    • πŸ“ŠCalculation Changes
      • Events according to HCMI - 2024 updates
      • Train according to CO2 emissiefactoren - energy scope inclusion
      • Train: SQUAKE - April 2025 Update
      • Bus & Train According to DEFRA are Now Available
      • Base Empreinte for Flights and Trains Now Live
      • TIM Transition to Version 2.0
      • TIM & DEFRA: Distance Changes
      • Airline Code Support Update - December 2024
      • GLEC v3.1
      • Car: DEFRA is Now Available
      • Hotel: DEFRA is Now Available
      • Hotel: HCMI - 2024 Updates
      • Accommodation - September 2024 Updates
      • Bus: SQUAKE - September 2024 Update
      • Flight: DEFRA - July 2024 Update
      • GATE4 Methodology is Now Available
      • GLEC, ECTA, and CLEAN-CARGO November 2023 Update
      • Flight: ICAO v13 - July 2024 Update
      • TIM v1.3
      • Train: SQUAKE - August 2024 Update
  • πŸ’‘Use Cases
    • Fulfillment with API
    • Fulfillment with Self-Checkout
    • Webhooks
    • Webhooks API Reference
  • πŸ•΅οΈAudits
    • Retrieve the list of Audit logs
    • Retrieve a specific Audit log
  • πŸ§‘β€πŸ’»Migration Guide
    • From v1 to v2
  • ❓Sustainability FAQs
Powered by GitBook
On this page
  • Endpoint
  • GET /v2/audits/{id}
  • Path Parameters
  • Response Structure
  • Successful Response (200 OK)
  • Key Attributes
  • General Information
  • Request Details
  • Response Details
  • Calculation Details
  • Methodology Information
  • Error Handling
  • Example API Request (cURL)
  • Enabling Audit Logging

Was this helpful?

  1. Audits

Retrieve a specific Audit log

Retrieve Specific Audit Log

The Audit Log Details API allows authenticated clients to retrieve detailed information about a specific audit log entry using its unique identifier.

Endpoint

GET /v2/audits/{id}

Retrieves the details of a specific audit log entry.

Authentication

  • Requires Bearer Token authentication.

  • Audit logging must be enabled for the account (contact SQUAKE support for activation).

Path Parameters

Parameter
Type
Required
Description

id

string (UUID)

βœ… Yes

The unique identifier of the audit log to retrieve.

Response Structure

Successful Response (200 OK)

Returns a JSON object containing audit log details:

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

Key Attributes

General Information

  • id (UUID): Unique identifier for the audit log.

  • calculated_at (ISO 8601): Timestamp of when the calculation was performed.

Request Details

  • request: Contains the parameters used for the calculation (e.g., type, origin, destination, methodology).

Response Details

  • response: Stores the carbon emissions results, including:

    • carbon_quantity: Total emissions calculated.

    • carbon_unit: The unit of measurement (e.g., kilogram).

Calculation Details

  • calculation: Breakdown of calculation parameters:

    • distance: The original and corrected distances used.

    • emission_factors: Methodology-specific emission factors.

Methodology Information

  • methodology: Metadata about the calculation methodology, including:

    • name: Methodology used (e.g., ICAO, DEFRA).

    • version: Version of the methodology applied.

    • source: URL linking to the official methodology documentation.

Error Handling

Status Code
Meaning

200 OK

The request was successful, and audit details were returned.

404 Not Found

The specified audit log ID does not exist.

Example API Request (cURL)

curl \ 
 --request GET https://api.squake.earth/v2/audits/{id} \ 
 --header "Authorization: Bearer $ACCESS_TOKEN"

Enabling Audit Logging

Audit logs are available only if this feature is enabled for your account. Contact SQUAKE support to activate audit logging.

PreviousRetrieve the list of Audit logsNextMigration Guide

Last updated 1 month ago

Was this helpful?

For more details, refer to the official .

πŸ•΅οΈ
SQUAKE API documentation