Teardowns
Delete a teardown
Hard delete removes the row + storage files.
DELETE
Permanently removes a teardown owned by your organization. The teardown row is hard-deleted from the database; every attached file is best-effort deleted from Supabase Storage.Documentation Index
Fetch the complete documentation index at: https://teardowns.aero/docs/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Bearer tdao_live_…Your organization’s UUID.
Path parameters
Auth requirements
Requires theseller capability on the user who minted the key
(same gate as create / update). Cross-org access returns 404
not_found never reveals existence in another org.
What happens, in order
- The teardown row is fetched and ownership checked. If it doesn’t belong to your org, 404.
- A
teardown.deletedaudit row is written with key fields snapshotted inprevious_state(tail_number, msn, status, label, start_date, country). Theentity_idkeeps pointing at the deleted teardown’s UUID audit logs outlive the entity. - Every URL in
documents[],images[], and the four slot fields (harvest_list,occm,aircraft_details_doc,non_incident_statement) is parsed back to its Supabase Storage path and deleted. Individual file failures are logged but never fail the call storage orphans are recoverable; a failed delete is not. - The teardown row is hard-deleted from the database in the same transaction as the audit write.
204 No Contentis returned with an empty body.
teardowns (verified across
migrations 001-023), so there are no cascading dependents to clean up.
Response
204 No Content. Empty body.
Soft delete (recoverable alternative)
If you want the teardown to disappear from browse / search but keep the data and the row for compliance / restoration:status becomes archived, it drops out of browse
results, but the row, attachments, and audit history all stay intact.
A subsequent {"action":"restore"} transition puts it back as a
draft.
Idempotency
DELETE is not idempotent in the strict HTTP sense: the second call returns404 Teardown not found because the row is gone after
the first call.
If your ERP needs idempotent semantics, treat both 204 and 404 as
“effectively deleted” the end-state is the same.
See also
- Transition for soft deletes.
- Errors for
404semantics.

