Bathrooms

  1. List bathrooms
  2. Get a single bathroom
  3. Create a new bathroom
  4. Update a bathroom
  5. Destroy a bathroom

Parameters

Name Type Read/Write Description
id Integer Read Bathroom’s id.
name Object Read Bathroom’s name, list of locales described in enums section.
bath_count Integer Read Bathroom’s number of baths.
shower_count Integer Read Bathroom’s number of showers.
wc_count Integer Read Bathroom’s number of wc’s.
created_at Time Read Bathroom’s create time.
updated_at Time Read Bathroom’s update time.
Name Type Read/Write Description
id Integer Read Bathroom’s id.
name Object Read/Write Required. Bathroom’s name, list of locales described in enums section.
bath_count Integer Read/Write Bathroom’s number of baths.
shower_count Integer Read/Write Bathroom’s number of showers.
wc_count Integer Read/Write Bathroom’s number of wc’s.
created_at Time Read Bathroom’s create time.
updated_at Time Read Bathroom’s update time.

List bathrooms

List all bathrooms for a given account.

GET /bathrooms

Response

{
  "links": {
    "bathrooms.rental": "https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"
  },
  "bathrooms": [
    {
      "id": 1,
      "bath_count": 1,
      "name": {
        "en": "bathroom"
      },
      "shower_count": 0,
      "wc_count": 2,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Get a single bathroom

Returns a single bathroom identified by ID.

GET /bathrooms/:bathroom_id

Response

{
  "links": {
    "bathrooms.rental": "https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"
  },
  "bathrooms": [
    {
      "id": 1,
      "bath_count": 1,
      "name": {
        "en": "bathroom"
      },
      "shower_count": 0,
      "wc_count": 2,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Create a new bathroom

Creates a bathroom for given rental.

POST /rentals/:rental_id/bathrooms

Example JSON request

{
  "bathrooms": [
    {
      "bath_count": 1,
      "name": "bathroom",
      "shower_count": 0,
      "wc_count": 2
    }
  ]
}

Response

{
  "links": {
    "bathrooms.rental": "https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"
  },
  "bathrooms": [
    {
      "id": 1,
      "bath_count": 1,
      "name": {
        "en": "bathroom"
      },
      "shower_count": 0,
      "wc_count": 2,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Update a bathroom

Returns an updated bathroom identified by ID.

PUT /bathrooms/:bathroom_id

Example JSON request

{
  "bathrooms": [
    {
      "bath_count": 1,
      "name": "bathroom",
      "shower_count": 0,
      "wc_count": 2
    }
  ]
}

Response

{
  "links": {
    "bathrooms.rental": "https://www.bookingsync.com/api/v3/rentals/{bathrooms.rental}"
  },
  "bathrooms": [
    {
      "id": 1,
      "bath_count": 1,
      "name": {
        "en": "bathroom"
      },
      "shower_count": 0,
      "wc_count": 2,
      "created_at": "2017-11-09T09:08:16Z",
      "updated_at": "2017-11-09T09:08:16Z",
      "links": {
        "rental": 1
      }
    }
  ],
  "meta": {
  }
}

Destroy a bathroom

Required OAuth scope: :rentals_write

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

DELETE /bathrooms/:bathroom_id