> ## 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.

# Update a sales / lease / exchange

> Partial update on a sales / lease / exchange your org owns.

PATCH a listing your organization owns. Sparse only fields on the
request body are written. Omitted fields are untouched.

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer tdao_live_…`
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  Your organization's UUID.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Path parameters

<ParamField path="listing_id" type="string (UUID)" required />

## Body

Every field is optional. Common fields you'll update:

<ParamField body="title / description / msn / condition" type="string" />

<ParamField body="price_usd" type="number" />

<ParamField body="country" type="string">
  ISO country code.
</ParamField>

<ParamField body="manufacturer / part_number" type="string" />

<ParamField body="cycles_remaining" type="number" />

<ParamField body="audience" type="array | null">
  Restrict (or clear) document visibility. Pass `null` to clear.
  See [audience](/concepts/audience).
</ParamField>

<ParamField body="status" type="string">
  One of `active`, `under_offer`, `sold`, `leased`, `exchanged`,
  `suspended`, `archived`, `draft`, `pending_review`. PATCH is the
  only way to change a listing's status today there's no separate
  transition endpoint for listings.
</ParamField>

<ParamField body="aircraft_type / engine_model / apu_model" type="string">
  Re-classify by **name** (e.g. `A320-200`). Case-insensitive same
  resolution as the create endpoint. APU and landing-gear vocab fields
  aren't supported via the public surface beyond the three listed
  here landing-gear classification cannot be set via the API.
</ParamField>

<ParamField body="images / documents" type="array of URLs">
  Direct overwrite. Usually you want the upload / delete-by-url
  endpoints instead.
</ParamField>

## Response

`200 OK`. The updated listing in the same shape every GET returns.

<RequestExample>
  ```bash drop the price theme={null}
  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 '{"price_usd": 225000}'
  ```

  ```bash mark sold theme={null}
  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": "sold"}'
  ```

  ```bash set audience theme={null}
  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 '{"audience": ["Airline", "MRO"]}'
  ```

  ```python python theme={null}
  import requests
  resp = requests.patch(
      f"{base_url}/public/v1/sales-lease-exchange/{listing_id}",
      headers={"Authorization": f"Bearer {api_key}", "X-Organization-Id": org_id},
      json={"price_usd": 225000},
  )
  resp.raise_for_status()
  ```
</RequestExample>

<ResponseExample>
  ```jsonc 200 OK theme={null}
  {
    "id": "df1e...",
    "price_usd": 225000,
    ...
  }
  ```

  ```jsonc 404 Not Found theme={null}
  { "detail": "Listing not found" }
  ```
</ResponseExample>

## Audit trail

PATCH writes:

* `listing.updated` generic with `previous_state` and `new_state`.
* `listing.audience.set` or `listing.audience.changed` when audience
  is touched. Two separate codes so support can filter first-time
  restriction vs subsequent change.

## See also

* [Audience](/concepts/audience) for the visibility model.
* [Delete](/api-reference/listings/delete) for hard removal.
