Delete a trip

Delete a stored trip with its activities and calculations. Audit logs are kept.

Deletes a trip and everything stored under it: its activities, including the legs of routed flights, and their calculations. Use it to remove test data, duplicates, or a trip you shouldn't have sent.

Request

DELETE /v2/travel-data/trips/{id}

idstringrequired

The trip's SQUAKE id (a UUID) or your own trip_reference.

See every field of DELETE /v2/travel-data/trips/{id} in the API reference
curl --request DELETE "https://api.sandbox.squake.earth/v2/travel-data/trips/TRIP-EXAMPLE-002" \
  --header "Authorization: Bearer $SQUAKE_API_KEY"

Response

A successful delete returns 204 No Content with an empty body. From then on, the trip endpoints no longer return the trip or its activities.

What a delete changes

  • Audit logs stay. They're an immutable record of what SQUAKE calculated, so the audit logs created by the trip's calculations remain readable. See List audit logs.
  • Reporting catches up later. Dashboards and reporting views refresh periodically, so the trip can still appear there until the next refresh.
  • A delete can't be undone. To restore the trip, submit it again to POST /v2/travel-data. SQUAKE recalculates its emissions, and the trip and its activities get new IDs.

Check before you delete

A trip_reference is easy to mistype, and a delete is permanent. If you're not sure which trip a reference points to, read it first with Retrieve a trip.

Errors

StatusCodeMeaning
401The API key is missing or invalid.
404travel_data_not_foundNo trip has this ID or reference, or the trip belongs to a client you can't access. Nothing is deleted.

On this page

DELETE/v2/travel-data/trips/{id}

Run this request against the sandbox with your test key.

Open in API reference