Edit and publish listings
Changing an existing listing, managing its stored photos, and submitting a saved draft for verification.
Where it lives
| Route | View or component file | Access |
|---|---|---|
/listings/:id/edit | src/views/app/listings/edit-listing.tsx | signed-in, agent or landlord |
| Step 1 | src/views/app/listings/components/step-basic-info.tsx (shared with create) | same |
| Step 2 | src/views/app/listings/components/step-edit-media.tsx | same |
| Step 3 | src/views/app/listings/components/step-review.tsx (shared with create) | same |
The requests are updateListing, addPropertyImages, reorderPropertyImages, tagPropertyImages and publishListing in src/services/listings/listings-api.ts.
Before you start
- Signed in as an agent or landlord, with a listing of your own.
- Open the editor from the pencil icon in the listings table. The Edit buttons on the listing detail page are not wired up.
Flow
Opening the page sends GET /api/v1/property/:id and GET /api/v1/settings. The form is filled from the listing once, when the data arrives. The step indicator reads 01 EDIT DETAILS, 02 UPDATE MEDIA, 03 CONFIRM CHANGES.
Step 1: Edit details
Header: "Edit Property Details", with "Modify the core information of your listing. All changes are saved when you confirm on the final step."
- The form is the same as step 1 of Create a listing, pre-filled. Listing Type is set to Rent when the listing has a rent price, otherwise Sale. Minimum Nights and Maximum Nights are not shown for a Shortlet.
- Change what you need and press Update Media. There is no validation at this step.
- Cancel Editing returns to
/listings/:idand discards the changes.
Only some fields are saved
Step 2: Update media
Header: "Update Media & Amenities". Stored photos and newly picked photos share one grid, grouped by room. See Listing photos and media for the group picker and crop dialog.
| Action | On a stored photo | On a new photo |
|---|---|---|
| Set as main | Moves it to the front; saved on confirm | Not available |
| Move to another group | Saved on confirm | Applied before upload |
| Remove (X) | Removed from the form | Removed from the form |
-
Add, regroup, reorder or remove photos. The counter reads "N of 20 photos"; stored and new photos count together toward the 4 minimum and 20 maximum.
-
Adjust amenities exactly as in the create flow (presets, Select All Common, Custom Amenity). The listing's current amenities start switched on.
-
Press Review Changes.
Check Toast Fewer than 4 photos in total "A listing needs at least 4 photos. You have N." Geotagging on and a new photo breaks the rule "New photos:" followed by the problem, for 10 seconds Stored photos are not re-checked for location.
Removing a stored photo is not saved
Step 3: Confirm changes
Header: "Confirm & Save Changes". This is the same review screen as the create flow, with stored photos first in the carousel and the same Listing readiness checklist. A blocking item disables the primary button.
| Listing status | Primary button | While running |
|---|---|---|
Anything except draft | Save changes | "Saving..." |
draft | Publish listing | "Publishing..." |
There is no Save as draft button here.
Pressing the primary button runs up to five requests in order. Each must succeed before the next starts.
- New photos, if any:
POST /api/v1/property/:id/images(multipart) with theimagesfiles andimagesMetadata(street address, listing coordinates, each photo'sgpswhen present, and its group astag). - Cover change, if Set as main was used on a stored photo:
PATCH /api/v1/property/:id/images/reorderwithimageUrlsin the new order. - Regrouped stored photos, if any:
PATCH /api/v1/property/:id/images/tagswith a list ofurlandtagpairs. - Listing fields:
PATCH /api/v1/property/:id(see below). - Drafts only:
POST /api/v1/property/:id/publish.
Then a toast and a redirect to /listings/:id:
- Draft: "Draft submitted for verification!"
- Otherwise: "Listing updated successfully!"
On any failure the sequence stops and a toast shows the API message, or "Failed to update listing. Please try again."
What is sent
The body of PATCH /api/v1/property/:id:
| Field | Source in the form |
|---|---|
title | Property Title |
description | Property Description |
pricing.rentPrice and pricing.rentDurationYears | Price and Rent Collected Up Front, when Listing Type is Rent |
pricing.salePrice | Price, when Listing Type is Sale |
availability.availableTo | The Available From date |
details.features | Always an empty list |
amenities | The full list of selected presets and custom amenities (replaces the stored list) |
Available From is sent as availableTo
availableFrom into the Available From field, but on save sends that date as availability.availableTo. This looks unintended. Until it is fixed, editing a listing sets its available-to date to whatever the Available From field shows.Publish a saved draft
- In the listings table, find the row with the DRAFT badge and click its pencil icon.
- Complete anything missing in steps 1 and 2 (a draft may have been saved without a price or with a short description).
- On step 3, clear every blocking item in the readiness checklist, then press Publish listing.
- The changes are saved first, then
POST /api/v1/property/:id/publishsubmits the draft for verification.
A draft cannot be saved again as a draft from this screen. The only action on step 3 saves and publishes in one go; to keep it private, leave with Back and Cancel Editing, which discards the edits.
States and edge cases
- Loading. A full-height spinner until the listing arrives.
- Not found or failed to load. "Failed to load listing" with a Back to Listings button.
- Partial saves. The five requests are not a transaction. If the field update fails after photos were uploaded, the new photos are already on the listing. Retrying from the same screen uploads them a second time.
- Draft publish fails after the update. The field changes are saved but the listing stays a draft; the error toast shows why.
- Shortlet. Stay length cannot be edited. A Shortlet has a rent price, so it loads as Rent and the Rent Collected Up Front selector is hidden; the nightly rate inside the stay terms is not part of the update request.
- No pin check. Unlike the create flow, step 1 does not insist on map coordinates. The geotag check in strict mode will still refuse new photos for a listing without a pin.
- Leaving mid-edit. Edits live in component state; reloading or navigating away discards them.
- Upload indicator. "Uploading…" appears in the gallery header while new photos are being sent.
What happens next
- Published draft. The toast says it was submitted for verification; the review screen explains that legal partners review the title documents before the listing goes live. In the table its badge changes from DRAFT once the API updates the status.
- Saved changes. The listing and "my listings" caches are invalidated, so the detail page the user lands on shows the new values.
- Assigning a lawyer and tracking the legal review happen on the listing detail page and are documented in the legal section.
HomeLink Hub