Bathrooms

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

Overview

This resource represents the rental’s bathrooms. This resource is mostly static information used for presentational purposes.

Parameters

Name Type Read/Write Description
account Integer Read Account’s ID related to the Bathroom
rental Integer Read Rental’s ID related to the Bathroom
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 Constraints
account Integer Read Account’s ID related to the Bathroom  
rental Integer Read Rental’s ID related to the Bathroom  
id Integer Read Bathroom’s id.  
name Object Read/Write Bathroom’s name, list of locales described in enums section. Required, maximum length: 25
bath_count Integer Read/Write Bathroom’s number of baths. integer only, greater than or equal to: 0
shower_count Integer Read/Write Bathroom’s number of showers. integer only, greater than or equal to: 0
wc_count Integer Read/Write Bathroom’s number of wc’s. integer only, greater than or equal to: 0
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": "2022-03-23T16:56:21Z",
      "updated_at": "2022-03-23T16:56:21Z",
      "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": "2022-03-23T16:56:21Z",
      "updated_at": "2022-03-23T16:56:21Z",
      "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": "2022-03-23T16:56:21Z",
      "updated_at": "2022-03-23T16:56:21Z",
      "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": "2022-03-23T16:56:21Z",
      "updated_at": "2022-03-23T16:56:21Z",
      "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