PATCH
Reorder photos

Overview

Updates the display order of photos on the caller’s current-home listing. The client sends a list of { photoId, orderIndex } pairs; the server $sets each pair atomically against the embedded current_homes.photos[] subdocuments. Every photoId in the payload must already exist on the caller’s listing — unknown ids return 404 NOT_FOUND. The cover flag (isCover) is not changed by this endpoint; use Set cover photo for that. Partial reorders are allowed: photos you do not include in the payload keep their existing orderIndex. If you submit overlapping orderIndex values across photos the server still writes them as-is — the client is responsible for sending a sensible permutation.

Authentication

Bearer <accessToken> required. Scope: user.

Path parameters

None.

Query parameters

None.

Request body

OrderEntry object

Example payload

Response — 200 OK

Returns the updated Home object with the new photos[].orderIndex values applied.

Error responses

Example error — 404

Side effects

  • $sets photos.$.orderIndex for each pair on the caller’s current_homes document.
  • updatedAt is bumped.
  • No image.process job is enqueued (no new bytes).
  • No match.recompute is triggered (photo order does not affect matching).

See also

curl