Skip to main 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.

The document endpoints for a listing your org owns. Same shape as the teardown document endpoints file goes up, URL gets appended to the listing’s documents[], optional audience form field updates the listing’s visibility in the same transaction.

Upload

POST /public/v1/sales-lease-exchange/documents/{listing_id}

Headers

Authorization
string
required
Bearer tdao_live_…
X-Organization-Id
string
required
Content-Type
string
required
multipart/form-data

Form fields

file
file
required
audience
string (CSV)
Optional. Comma-separated list of company types. See audience.

File rules

Same as teardown documents max 50 MB, PDF / XLSX / XLS / DOCX / DOC / CSV / images.

Storage path

{SUPABASE_URL}/storage/v1/object/public/teardowns-media/listings/<listing_id>/documents/<8-hex>_<filename>

Response

200 OK:
{
  "url": "https://.../teardowns-media/listings/<id>/documents/abcd1234_traceability.pdf",
  "filename": "traceability.pdf",
  "size": 123456,
  "content_type": "application/pdf"
}
curl -X POST "$base_url/public/v1/sales-lease-exchange/documents/$listing_id" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id" \
  -F "file=@/absolute/path/to/traceability.pdf"

Delete by URL

DELETE /public/v1/sales-lease-exchange/documents/{listing_id}/by-url?url=<encoded-url>
Removes a single document URL from the listing’s documents[]. Best-effort deletes the underlying storage file. Idempotent.

Query parameters

url
string
required
URL-encoded.

Response

200 OK:
{ "status": "ok" }
encoded_url=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))" "$DOC_URL")

curl -X DELETE "$base_url/public/v1/sales-lease-exchange/documents/$listing_id/by-url?url=$encoded_url" \
  -H "Authorization: Bearer $api_key" \
  -H "X-Organization-Id: $org_id"

See also