Rentals amenities

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

Parameters

Name Type Read/Write Description
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
id Integer Read Rentals Amenity’s id.
amenity_id Integer Write Required. Amenity id related to the Rentals Amenity.
details Object Read/Write 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.

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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "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