---
title: "PATCH /rentals/{rental_id}/image-order"
method: PATCH
path: "/rentals/{rental_id}/image-order"
tags: ["rentalImages"]
---

# PATCH /rentals/{rental_id}/image-order

`PATCH /rentals/{rental_id}/image-order`

Updates position on rental images and optionally set new primary image

## Path parameters

- `rental_id` integer, required

## Request body

- ImageOrder[]
  - `id` integer
  - `interior_primary` boolean
  - `primary` boolean

## Response `200`

- RentalImage[]
  - `ai_aesthetic_score` number, double
  - `ai_description` string
  - `ai_position` integer
  - `ai_summary` string
  - `amenity` RentalImageAmenity — RentalImageAmenity is used to relate a RentalImage with an Amenity (this is a 1 to 1 relationship)
    - `description` string
    - `name` string
    - `slug` string
  - `best` boolean
  - `category` MediaCategory
    - `name` string
    - `slug` string
  - `description` string
  - `height` integer
  - `id` integer
  - `ignore_rejected` boolean
  - `interior_primary` boolean
  - `position` integer
  - `primary` boolean
  - `rental_id` integer
  - `review` RentalImageReview
    - `apply_credit` boolean — special incoming field, not stored in DB
    - `booking_id` integer
    - `booking_summary` BookingSummary
      - `from` string
      - `id` integer
      - `to` string
    - `can_edit` boolean
    - `can_edit_until` string
    - `cleanliness_score` number, double
    - `communication_score` number, double
    - `deleted` string, date-time — clocks.RfcTime was resulting in 0001-01-01 which I want to avoid. it should be null or a real date
    - `exclude_from_rating` boolean
    - `id` integer
    - `images` string[] — DBStringSlice is a []string with database conversion methods
    - `imported` boolean — used for imported reviews only
    - `listing_score` number, double
    - `mechanical_score` number, double
    - `name` string
    - `outdoorsy_only` boolean
    - `owner` ReviewOwner
      - `avatar_url` string
      - `first_name` string
      - `id` integer
      - `last_name` string
    - `owner_can_respond` boolean
    - `owner_response` OwnerResponseReview
      - `text` string
      - `timestamp` string
    - `published` boolean
    - `rental_id` integer
    - `rental_summary` RentalSummary
      - `campsite_summary` CampsiteSummary
        - `beds` integer
        - `campground_id` integer
        - `campground_name` string
        - `campground_sitemap_url` string
        - `display_campsite_type` string
        - `display_max_vehicle_length` string
        - `display_site_type` string
        - `is_odn` boolean
        - `rental_id` integer
        - `site_type` string
        - `sleeps` integer
        - `type` string
      - `disallow_movement` boolean
      - `display_type` string
      - `formatted_length` string
      - `id` integer
      - `interior_primary_image_url` string
      - `internal_id` string
      - `location` string
      - `name` string
      - `primary_image_url` string
      - `rental_category` string
      - `sleeps` integer
      - `slug` string
      - `stay_summary` StaySummary
        - `baths` integer
        - `bedrooms` integer
        - `beds` integer
        - `check_in_type` string
        - `display_stay_type` string
        - `location_description` string
        - `max_parking_spaces` integer
        - `parking_onsite` boolean
        - `rental_id` integer
        - `sleeps` integer
        - `type` string
      - `style` string
      - `type` string
    - `rental_tags` TagRental[]
      - `Created` string
      - `ID` integer
      - `Name` string
      - `Slug` string
      - `Updated` string
      - `position` integer
      - `usage_by_rental_count` integer
    - `review_image_id` string
    - `review_images` ReviewImage[]
      - `created` string, date-time
      - `id` string — ID is the type used throughout the system to identify a unique object. It properly handles marshaling for both json and sql databases. It properly handles null values in the database as well.
      - `lat` number, double
      - `lng` number, double
      - `rental_id` string
      - `review_id` string
      - `reviewed` boolean
      - `reviewed_by` string
      - `status` string
      - `updated` string, date-time
      - `url` string
    - `reviewer` Reviewer
      - `avatar_url` string
      - `first_name` string
      - `id` integer
      - `last_name` string
    - `reviewer_id` integer
    - `score` number, double — Review Types
    - `source_page` string
    - `tags` Tag[] — Tags are saved on tag_rental_join
      - `allow_for_review` boolean
      - `created` string
      - `description` string
      - `id` integer
      - `name` string
      - `owner_user_id` integer, nullable
      - `position` integer
      - `slug` string
      - `updated` string
    - `text` string
    - `timestamp` string
    - `user_id` integer
    - `user_recommend` boolean
    - `value_score` number, double
  - `skip_enhance` boolean
  - `status` string
  - `tags` string
  - `title` string
  - `url` string
  - `video` boolean
  - `width` integer

## Other responses

- `401` — Unauthorized error
- `default` — An unknown, unexpected error.

---

[API](https://skmtc.net/outdoorsy/apis/outdoorsy-api-documentation.md) · [All operations](https://skmtc.net/outdoorsy/apis/outdoorsy-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/outdoorsy/outdoorsy-api-documentation/revisions/f0cf8f605ea0/schema)
