Bedrooms

  1. List bedrooms
  2. Get a single bedroom
  3. Create a new bedroom
  4. Update a bedroom
  5. Destroy a bedroom

Parameters

Name Type Read/Write Description
id Integer Read Bedroom’s id.
name Object Read Bedroom’s name, list of locales described in enums section.
bunk_beds_count Integer Read Bedroom’s number of bunk beds.
double_beds_count Integer Read Bedroom’s number of double beds.
kingsize_beds_count Integer Read Bedroom’s number of kingsize beds.
queensize_beds_count Integer Read Bedroom’s number of queensize beds.
single_beds_count Integer Read Bedroom’s number of single beds.
sofa_beds_count Integer Read Bedroom’s number of sofa beds.
created_at Time Read Bedroom’s create time.
updated_at Time Read Bedroom’s update time.
Name Type Read/Write Description
id Integer Read Bedroom’s id.
name Object Read/Write Required. Bedroom’s name, list of locales described in enums section.
bunk_beds_count Integer Read/Write Bedroom’s number of bunk beds.
double_beds_count Integer Read/Write Bedroom’s number of double beds.
kingsize_beds_count Integer Read/Write Bedroom’s number of kingsize beds.
queensize_beds_count Integer Read/Write Bedroom’s number of queensize beds.
single_beds_count Integer Read/Write Bedroom’s number of single beds.
sofa_beds_count Integer Read/Write Bedroom’s number of sofa beds.
created_at Time Read Bedroom’s create time.
updated_at Time Read Bedroom’s update time.

List bedrooms

List all bedrooms for a given account.

GET /bedrooms

Response

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

Get a single bedroom

Returns a single bedroom identified by ID.

GET /bedrooms/:bedroom_id

Response

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

Create a new bedroom

Creates a bedroom for given rental.

POST /rentals/:rental_id/bedrooms

Example JSON request

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

Response

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

Update a bedroom

Returns an updated bedroom identified by ID.

PUT /bedrooms/:bedroom_id

Example JSON request

{
  "bedrooms": [
    {
      "bunk_beds_count": 0,
      "double_beds_count": 1,
      "kingsize_beds_count": 0,
      "name": {
        "en": "bedroom"
      },
      "queensize_beds_count": 0,
      "single_beds_count": 2,
      "sofa_beds_count": 1
    }
  ]
}

Response

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

Destroy a bedroom

Required OAuth scope: :rentals_write

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

DELETE /bedrooms/:bedroom_id