LivingRooms

  1. List living_rooms
  2. Get a single living_room
  3. Create a new living_room
  4. Update a living_room
  5. Destroy a living_room

Parameters

Name Type Read/Write Description
id Integer Read LivingRoom’s id.
bunk_beds_count Integer Read LivingRoom’s number of bunk beds.
double_beds_count Integer Read LivingRoom’s number of double beds.
kingsize_beds_count Integer Read LivingRoom’s number of kingsize beds.
queensize_beds_count Integer Read LivingRoom’s number of queensize beds.
single_beds_count Integer Read LivingRoom’s number of single beds.
sofa_beds_count Integer Read LivingRoom’s number of sofa beds.
created_at Time Read LivingRoom’s create time.
updated_at Time Read LivingRoom’s update time.
Name Type Read/Write Description
id Integer Read LivingRoom’s id.
bunk_beds_count Integer Read/Write LivingRoom’s number of bunk beds.
double_beds_count Integer Read/Write LivingRoom’s number of double beds.
kingsize_beds_count Integer Read/Write LivingRoom’s number of kingsize beds.
queensize_beds_count Integer Read/Write LivingRoom’s number of queensize beds.
single_beds_count Integer Read/Write LivingRoom’s number of single beds.
sofa_beds_count Integer Read/Write LivingRoom’s number of sofa beds.
created_at Time Read LivingRoom’s create time.
updated_at Time Read LivingRoom’s update time.

List living_rooms

List all living_rooms for a given account.

GET /living_rooms

Response

{
  "links": {
    "living_rooms.rental": "https://www.bookingsync.com/api/v3/rentals/{living_rooms.rental}"
  },
  "living_rooms": [
    {
      "id": 1,
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Get a single living_room

Returns a single living_room identified by ID.

GET /living_rooms/:living_room_id

Response

{
  "links": {
    "living_rooms.rental": "https://www.bookingsync.com/api/v3/rentals/{living_rooms.rental}"
  },
  "living_rooms": [
    {
      "id": 1,
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Create a new living_room

Creates a living_room for given rental.

POST /rentals/:rental_id/living_rooms

Example JSON request

{
  "living_rooms": [
    {
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1
    }
  ]
}

Response

{
  "links": {
    "living_rooms.rental": "https://www.bookingsync.com/api/v3/rentals/{living_rooms.rental}"
  },
  "living_rooms": [
    {
      "id": 1,
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Update a living_room

Returns an updated living_room identified by ID.

PUT /living_rooms/:living_room_id

Example JSON request

{
  "living_rooms": [
    {
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1
    }
  ]
}

Response

{
  "links": {
    "living_rooms.rental": "https://www.bookingsync.com/api/v3/rentals/{living_rooms.rental}"
  },
  "living_rooms": [
    {
      "id": 1,
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Destroy a living_room

Required OAuth scope: :rentals_write

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

DELETE /living_rooms/:living_room_id