Bathrooms

  1. TOC

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 Bathroom’s name, list of locales described in enums section.  
name_locale String Write Bathroom’s name, used in write operations. Replace the locale with one of the locales described in enums section (e.g. name_en). Multiple of these attributes could be passed in the same operation, as long as they each have a unique locale (e.g name_en and name_fr) Required for Account’s default locale, 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": "2023-12-11T08:26:25Z",
      "updated_at": "2023-12-11T08:26:25Z",
      "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": "2023-12-11T08:26:25Z",
      "updated_at": "2023-12-11T08:26:25Z",
      "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_en": "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": "2023-12-11T08:26:25Z",
      "updated_at": "2023-12-11T08:26:25Z",
      "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_en": "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": "2023-12-11T08:26:25Z",
      "updated_at": "2023-12-11T08:26:25Z",
      "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