Retrieve an activity
Read one activity of a stored trip, with its traveler and every calculation SQUAKE stored for it.
Returns one activity of a trip. Activities are always addressed through their trip, so the request needs both identifiers. Take the activity ID from the trip's activity_ids, or from the trips array of the submission that created it.
Request
GET /v2/travel-data/trips/{trip_id}/activities/{activity_id}
trip_idstringrequiredThe trip's SQUAKE id (a UUID) or your own trip_reference.
activity_idstringrequiredThe activity's id (a UUID), as listed in the trip's activity_ids.
GET /v2/travel-data/trips/{trip_id}/activities/{activity_id} in the API referencecurl "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002/activities/c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03" \
--header "Authorization: Bearer $SQUAKE_API_KEY"Response
{
"id": "c84f1d27-3e95-4b60-a7d8-2f1b9e6c4a03",
"type": "car",
"trip_id": "7c9e6f2a-4b81-4d3e-9a52-1f0c8b3d5e47",
"client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5",
"external_reference": "ACTIVITY-CAR-001",
"origin": "London Heathrow Airport, United Kingdom",
"destination": "Canary Wharf, London, United Kingdom",
"fuel_type": "hev",
"traveler": {
"name": "Jane Doe",
"email": "jane.doe@example.com",
"traveler_type": "employee"
},
"calculations": [
{
"id": "6a2e8c40-7b19-4d35-9f68-1c4b7e2a5d93",
"methodology": "DEFRA",
"methodology_version": "2026",
"co2_in_grams": 14200.0,
"audit": null
},
{
"id": "f5b1d873-2c60-4e97-a1d4-8b3f6c9e2074",
"methodology": "US-EPA",
"methodology_version": "2026",
"co2_in_grams": 15100.0,
"audit": null
}
]
}This car ride has two calculations because the account is configured with two car methodologies, DEFRA and US EPA. The items array of the submission only reported the primary methodology. Both results are stored, and this endpoint returns them oldest first.
The key set depends on the activity type. A car or train activity carries origin, destination and fuel_type. A flight has no fuel_type, and a hotel stay has none of the three. co2_in_grams is in grams, not kilograms. For every field, see Activity fields.
Which methodologies run for each activity type depends on the client's methodology options. See Clients.
Errors
| Status | Code | Meaning |
|---|---|---|
401 | The API key is missing or invalid. | |
404 | travel_data_not_found | The trip doesn't exist or you can't access it, the activity belongs to another trip, the ID is a leg of a routed flight, or no activity has this ID. |
{
"errors": [
{
"code": "travel_data_not_found",
"detail": "The requested travel data does not exist or is not accessible."
}
]
}Related
- List the activities of a trip
- Retrieve an audit log
- Retrieve an Activity of a Travel Data Trip in the API reference