Rentals amenities

  1. Overview
  2. Obsolete amenities
  3. List rentals amenities
  4. Get a single rentals amenity
  5. Create a new rentals amenity
  6. Update a rentals amenity
  7. Destroy a rentals amenity

Overview

This resource represents the Rentals Amenities, that establish relationship between Rentals and Amenities.

Obsolete amenities

Right now, 3 amenities are marked as obsolete and are replaced with Rental#checkin_type attribute: contactless_check_in_and_check_out, self_checkin, and 24h_checkin. It is impossible to assign those amenities to rentals directly or unassign them from rentals.

Instead, these 3 amenities are assigned/unassigned automatically on Rental#checkin_type update for backwards compatibility.

All obsolete amenities will be removed in April 2023. Please use Rental#checkin_type instead.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Rentals Amenity
rental Integer Read Rental’s ID related to the Rentals Amenity
amenity Integer Read Amenity’s ID related to the Rentals Amenity
id Integer Read Rentals Amenity’s id.
details Object Read Rentals Amenity’s details, list of locales described in enums section.
created_at Time Read Rentals Amenity’s create time.
updated_at Time Read Rentals Amenity’s update time.
Name Type Read/Write Description Constraints
account Integer Read Account’s ID related to the Rentals Amenity  
rental Integer Read Rental’s ID related to the Rentals Amenity  
amenity Integer Read Amenity’s ID related to the Rentals Amenity  
id Integer Read Rentals Amenity’s ID.  
amenity_id Integer Write Amenity’s ID related to the Rentals Amenity Required.
details Object Read/Write Rentals Amenity’s details, list of locales described in enums section. Maximum length: 100
created_at Time Read Rentals Amenity’s create time.  
updated_at Time Read Rentals Amenity’s update time.  

List rentals amenities

List all rentals amenities for a given account.

GET /rentals_amenities

Response

{
  "links": {
    "rentals_amenities.amenity": "https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}",
    "rentals_amenities.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"
  },
  "rentals_amenities": [
    {
      "id": 3,
      "details": {
        "en": "Amenity details"
      },
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "amenity": 82,
        "rental": 1
      }
    }
  ]
}

Get a single rentals amenity

Returns a single rentals amenity identified by ID.

GET /rentals_amenities/:rentals_amenity_id

Response

{
  "links": {
    "rentals_amenities.amenity": "https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}",
    "rentals_amenities.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"
  },
  "rentals_amenities": [
    {
      "id": 3,
      "details": {
        "en": "Amenity details"
      },
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "amenity": 82,
        "rental": 1
      }
    }
  ]
}

Create a new rentals amenity

Creates a rentals amenity for given rental.

POST /rentals/:rental_id/rentals_amenities

Example JSON request

{
  "rentals_amenities": [
    {
      "amenity_id": "82",
      "details_en": "Amenity details"
    }
  ]
}

Response

{
  "links": {
    "rentals_amenities.amenity": "https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}",
    "rentals_amenities.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"
  },
  "rentals_amenities": [
    {
      "id": 3,
      "details": {
        "en": "Amenity details"
      },
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "amenity": 82,
        "rental": 1
      }
    }
  ]
}

Update a rentals amenity

Returns an updated rentals amenity identified by ID.

PUT /rentals_amenities/:rentals_amenity_id

Example JSON request

{
  "rentals_amenities": [
    {
      "amenity_id": "82",
      "details_en": "Amenity details"
    }
  ]
}

Response

{
  "links": {
    "rentals_amenities.amenity": "https://www.bookingsync.com/api/v3/amenities/{rentals_amenities.amenity}",
    "rentals_amenities.rental": "https://www.bookingsync.com/api/v3/rentals/{rentals_amenities.rental}"
  },
  "rentals_amenities": [
    {
      "id": 3,
      "details": {
        "en": "Amenity details"
      },
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "links": {
        "amenity": 82,
        "rental": 1
      }
    }
  ]
}

Destroy a rentals amenity

Required OAuth scope: :rentals_write

Returns an empty response with ‘204 No Content’ status code on success.

DELETE /rentals_amenities/:rentals_amenity_id