Skip to main content
DELETE
/
public
/
v1
/
sales-lease-exchange
/
{listing_id}
curl -X DELETE "$base_url/public/v1/sales-lease-exchange/$listing_id" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id"
HTTP/1.1 204 No Content

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.

Permanently removes a listing owned by your organization. The listing row is hard-deleted; every attached file is best-effort deleted from Supabase Storage.
Irreversible. For a recoverable removal, PATCH status="archived" instead the listing drops out of the active marketplace feed but the row and attachments stay.

Headers

Authorization
string
required
Bearer tdao_live_…
X-Organization-Id
string
required
Your organization’s UUID.

Path parameters

listing_id
string (UUID)
required

Auth requirements

Requires the seller capability. Cross-org access returns 404 not_found.

What happens, in order

  1. Listing is fetched and ownership checked. Otherwise 404.
  2. listing.deleted audit row written with key fields snapshotted in previous_state (title, msn, listing_type, status, country).
  3. Every URL in documents[] and images[] is parsed and best-effort deleted from Supabase Storage. Individual failures are logged but don’t fail the call.
  4. The listing row is hard-deleted from the database in the same transaction as the audit write.
  5. 204 No Content returned.
No other table foreign-keys back to listings (verified across all current migrations), so there are no cascading dependents.

Response

204 No Content. Empty body.
curl -X DELETE "$base_url/public/v1/sales-lease-exchange/$listing_id" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id"
HTTP/1.1 204 No Content

Soft-delete alternative

curl -X PATCH "$base_url/public/v1/sales-lease-exchange/$listing_id" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id" \
  -H "Content-Type: application/json" \
  -d '{"status": "archived"}'
The listing’s status becomes archived, it drops out of browse results, but the row and attachments stay intact.

See also

  • Update for the soft-delete-via-PATCH pattern.
  • Errors for the 404 semantics.