Introduction

This is still a draft! It is unfinished and there for preview purposes at the moment.

This document exposes the functionality of the new Floorplanner API version 2. It is completely built from scratch, using json instead of xml as default format (except for fml which is still based on xml).

Table of contents

Authentication

Many Floorplanner API methods require authentication. All responses are relative to the context of the authenticating user. For example, an attempt to retrieve project information of a private project will fail. HTTP Basic Authentication is the supported authentication scheme. When authenticating via Basic Authentication, use your API key as username and x as password.

Parameter Required Value
username yes [Your API key]
password yes x

API Endpoints

All the API endpoints use a base url:

URLhttps://floorplanner.com/api/v2

This means that when you see a path like /room_type_sets in the url scheme of a request your url will look like:

URLhttps://floorplanner.com/api/v2/room_type_sets

Users

Index

GET /users.json
HTTP 200
[
    {
        "country_code": null,
        "created_at": "2015-06-01T14:08:32.000Z",
        "creator_id": null,
        "currency": null,
        "email": "some@email.test",
        "external_identifier": "ID12346",
        "id": 6,
        "language": null,
        "last_seen_at": null,
        "measurement_system": "METRIC",
        "newsletter": null,
        "parent_id": 5,
        "signup_method": null,
        "updated_at": "2016-06-01T14:08:32.000Z",
        "username": "test"
    }
]

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Show

GET /users/:id.json
Parameter Required Value
:id yes The user id of the user you want to find
HTTP 200
{
    "country_code": null,
    "created_at": "2015-06-01T14:08:32.000Z",
    "creator_id": null,
    "currency": null,
    "email": "some@email.test",
    "external_identifier": "ID12346",
    "id": 6,
    "language": null,
    "last_seen_at": null,
    "measurement_system": "METRIC",
    "newsletter": null,
    "parent_id": 5,
    "signup_method": null,
    "updated_at": "2016-06-01T14:08:32.000Z",
    "username": "test"
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update

PUT /users/:id.json PATCH /users/:id.json

Parameter Required Value
:id yes The user id of the user you want to update
email yes The email address of the user
username yes The username of the user
password yes Don’t make it too easy
country_code no The country_code in 2 letter format
measurement_system no Either "METRIC" or "IMPERIAL", Used measurement system to display units
language no The editor language used when opening the project
external_identifier no Your own non-numerical ID to use for fetching users

{
   "email": "some@email.woohoo",
   "username": "my_awesome_username",
   "password": "sent_over_https",
   "measurement_system": "IMPERIAL"
}
HTTP 200
{
    "country_code": null,
    "created_at": "2015-06-01T14:08:32.000Z",
    "creator_id": null,
    "currency": null,
    "email": "some@email.woohoo",
    "external_identifier": "ID12346",
    "id": 6,
    "language": null,
    "last_seen_at": null,
    "measurement_system": "IMPERIAL",
    "newsletter": null,
    "parent_id": 5,
    "signup_method": null,
    "updated_at": "2016-06-01T14:08:32.000Z",
    "username": "my_awesome_username"
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Destroy

DELETE /users/:id.json
Parameter Required Value
:id yes The user id of the user you want to destroy
HTTP 200

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Token

GET /users/:id/token.json
Parameter Required Value
:id yes The user id of the user you want a token from
HTTP 200
{
    "id": 1,
    "token": "36db96d625be097617dda5624b2550e7",
    "valid_until": "2017-01-01T12:08:32.000Z",
    "creator_id": null,
    "comment": null,
    "user_id": 5,
    "created_at": "2015-06-01T14:08:32.000Z",
    "updated_at": "2016-06-01T14:08:32.000Z"
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Projects

Create

POST /projects.json
Parameter Required Value
name no The name of the project, defaults to: New floorplan
description no The description of the project
external_identifier no You can specify a token of your own to identify a project, without using Floorplanner’s numerical IDs
public no Make the project public or private
project_template_attributes[template_id] no The ID of a project template to use

{
  "project": {
    "name": "My new house",
    "description": "This is my first floor plan",
    "external_identifier": "ID3344",
    "project_template_attributes": {
      "template_id": 10
    }
  }
}
HTTP 200
{
  "id": 170280,
  "user_id": 103,
  "public": false,
  "name": "My new house",
  "description": "This is my first floor plan",
  "project_url": "2fv03b",
  "created_at": "2017-03-23T15:48:19.000Z",
  "updated_at": "2017-03-23T15:48:19.000Z",
  "enable_autosave": false,
  "external_identifier": "ID3344",
  "exported_at": null
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Export

POST /projects/:id/export.json
Parameter Required Value
:id yes The numeric ID of the Project to export
type yes Either 2d or 3d, defines the type of export you want to receive
fmt yes Either pdf, png or jpg, specify output format of the export
width yes Specify width at which the project will be rendered
height yes Specify height at which the project will be rendered
size yes Either SD (960px * 540px), HD (1920px * 1080px), A4, specify size of output document
orientation yes Either landscape or portrait, specify the orientation that will be used while rendering
callback yes Either a web URL or an email address, in case of email, the result gets mailed to the user. In case of a web URL, a POST request containing the data will be sent to that URL
combine yes Either true or false, (always true for fmt: pdf), tries to combine the plan into one file
paper_scale yes if type is 2d This option can only be used when the type is set to 2d
renderer yes if type is 3d irt is currently the only supported renderer
section yes if type is 3d Default 1500, cut off the plan offset from the floor by the specified amount (calculated in cm, 1500 = 1 meter and 50 cm)
wall_top_color yes if type is 3d Default null, otherwise a different color can be specified using hex format: 0x000000
num_frames yes if type is 3d Default 100, mainly used within iray renders to increase quality
view yes if type is 3d One of top, ne, nw, se, sw, specify the viewpoint of the camera

{
  "type": "3d",
  "renderer": "irt",
  "width": 960,
  "num_frames": 100,
  "fmt": "pdf",
  "section": null,
  "wall_top_color": "0x000000",
  "orientation": "landscape",
  "size": "A4",
  "height": 540,
  "view": "ne",
  "combine": true
}
HTTP 200

Unprocessable entity

One or more of the specified parameters isn't valid HTTP 422
{
  "error": "invalid parameters specified"
}

Designs

Create

POST /projects/:project_id/floors/:floor_id/designs.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to create the design
name no The name of the design

{
   "design" : {
      "name" : "my floor design name"
   }
}
HTTP 200
{
   "user_id" : null,
   "floor_id" : 186986,
   "name" : "my floor design name",
   "design_hash" : null,
   "id" : 647781965,
   "thumb_url" : null,
   "project_id" : 195783,
   "created_at" : "2016-11-15T09:48:09.000Z",
   "thumb_3d_generated_at" : null,
   "design_type" : "save",
   "thumb_2d_generated_at" : null,
   "original_design_id" : null,
   "updated_at" : "2016-11-15T09:48:09.000Z"
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Create with FML

This method allows you to create a design by passing FML contents in the body of the request.

POST /projects/:project_id/floors/:floor_id/designs.fml
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to create the design

<?xml version="1.0" encoding="UTF-8"?>
<design>
  <id>647781965</id>
  <name>my floor design name</name>
  <design-type>save</design-type>
  <created-at>2016-11-15T09:48:09.000Z</created-at>
  <updated-at>2016-11-15T09:48:09.000</updated-at>
  <project-id>195783</project-id>
  <floor-id>186986</floor-id>
  <!-- ... -->
</design>
HTTP 200
{
   "user_id" : null,
   "floor_id" : 186986,
   "name" : "my floor design name",
   "design_hash" : null,
   "id" : 647781965,
   "thumb_url" : null,
   "project_id" : 195783,
   "created_at" : "2016-11-15T09:48:09.000Z",
   "thumb_3d_generated_at" : null,
   "design_type" : "save",
   "thumb_2d_generated_at" : null,
   "original_design_id" : null,
   "updated_at" : "2016-11-15T09:48:09.000Z"
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Show

GET /projects/:project_id/floors/:floor_id/designs/:id.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the design
:id yes The design you want to find within specified project and floor
HTTP 200
{
   "user_id" : null,
   "design_hash" : null,
   "project_id" : 195783,
   "thumb_2d_generated_at" : null,
   "original_design_id" : null,
   "floor_id" : 186986,
   "thumb_3d_generated_at" : null,
   "design_type" : "save",
   "created_at" : "2016-11-15T09:47:47.000Z",
   "name" : "my floor design name",
   "updated_at" : "2016-11-15T09:47:47.000Z",
   "thumb_url" : null,
   "id" : 647781962
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update

PUT /projects/:project_id/floors/:floor_id/designs/:id.json PATCH /projects/:project_id/floors/:floor_id/designs/:id.json

Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the design
:id yes The design you want to find within specified project and floor
name no The new name of the design

{
   "design" : {
      "name" : "my floor design name updated"
   }
}
HTTP 200
{
   "design_type" : "save",
   "updated_at" : "2016-11-15T09:51:10.000Z",
   "original_design_id" : null,
   "user_id" : null,
   "created_at" : "2016-11-15T09:47:47.000Z",
   "project_id" : 195783,
   "floor_id" : 186986,
   "thumb_url" : null,
   "thumb_2d_generated_at" : null,
   "design_hash" : null,
   "thumb_3d_generated_at" : null,
   "name" : "my floor design name updated",
   "id" : 647781962
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update with FML

This method allows you to update a design by passing FML contents in the body of the request.

PUT /projects/:project_id/floors/:floor_id/designs/:id.fml PATCH /projects/:project_id/floors/:floor_id/designs/:id.fml

Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to create the design

<?xml version="1.0" encoding="UTF-8"?>
<design>
  <id>647781965</id>
  <name>my floor design name</name>
  <design-type>save</design-type>
  <created-at>2016-11-15T09:48:09.000Z</created-at>
  <updated-at>2016-11-15T09:48:09.000</updated-at>
  <project-id>195783</project-id>
  <floor-id>186986</floor-id>
  <!-- ... -->
</design>
HTTP 200
{
   "user_id" : null,
   "floor_id" : 186986,
   "name" : "my floor design name",
   "design_hash" : null,
   "id" : 647781965,
   "thumb_url" : null,
   "project_id" : 195783,
   "created_at" : "2016-11-15T09:48:09.000Z",
   "thumb_3d_generated_at" : null,
   "design_type" : "save",
   "thumb_2d_generated_at" : null,
   "original_design_id" : null,
   "updated_at" : "2016-11-15T09:48:09.000Z"
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Destroy

DELETE /projects/:project_id/floors/:floor_id/designs/:id.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the design
:id yes The design id you want to destroy within specified project and floor
HTTP 200

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Export

POST /projects/:project_id/floors/:floor_id/designs/:id/export.json
Parameter Required Value
:project_id yes The numeric ID of the project
:floor_id yes The numeric ID of the project floor
:id yes The numeric ID of the design within the project floor to export
type yes Always panorama
size yes The desired width of the output panorama, the height of the panorama will be based on a 2/1 aspect ratio (height of the panorama is calculated using size / 2)
callback yes Either a web URL or an email address, in case of email, the result gets mailed to the user. In case of a web URL, a POST request containing the data will be sent to that URL
camera_id yes The camera ID of the camera used to create the panorama

{
  "type": "panorama",
  "size": 1920,
  "camera_id": 2,
  "callback": "https://mywebsite.com/my_post_callback_endpoint"
}
HTTP 200

Unprocessable entity

One or more of the specified parameters isn't valid HTTP 422
{
  "error": "invalid parameters specified"
}

Since it takes some time to export a design we provide a callback parameter that will receive a POST request containing information about the requested export. This means you’ll have to setup a URL that accepts a POST request if you want to know when an export is finished.

Task

POST your_url.com/your/post/endpoint
{
  "export_id": 1,
  "project_id": 2,
  "state": "success",
  "type": "panorama",
  "fmt": "jpg",
  "combine": true,
  "width": 100,
  "height": 100,
  "images": ["https://s3-eu-west-1.amazonaws.com/fpdata/exports/project/panorama/2/designs/1.jpg"]
}

Floors

Create

POST /projects/:project_id/floors.json
Parameter Required Value
:project_id yes The project_id in which to create the floor
name no The name of the floor
level no On which level this floor is present
height no Height of the floor
drawing[filename] no Specify image used for drawing in either jpg, png or pdf format

{
   "floor" : {
      "name" : "test floor",
      "drawing" : {
        "filename": "https://somenewfilenameurl.com/img.png"
      }
   }
}
HTTP 200
{
   "project_id" : 195783,
   "name" : "test floor",
   "id" : 186992,
   "updated_at" : "2016-11-14T16:07:08.000Z",
   "height" : "2.8",
   "created_at" : "2016-11-14T16:07:08.000Z",
   "level" : 0
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Show

GET /projects/:project_id/floors/:id.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:id yes The floor you want to find within specified project
HTTP 200
{
   "project_id" : 195783,
   "name" : "test floor",
   "id" : 186992,
   "updated_at" : "2016-11-14T16:07:08.000Z",
   "height" : "2.8",
   "created_at" : "2016-11-14T16:07:08.000Z",
   "level" : 0
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update

PUT /projects/:project_id/floors/:id.json PATCH /projects/:project_id/floors/:id.json

Parameter Required Value
:project_id yes The project_id in which to create the floor
:id yes The ID project floor you wish to update
name no The new name of the floor
level no New level on which this floor is present
height no New eight of the floor
drawing[filename] no Specify image used for drawing in either jpg, png or pdf format

{
   "floor" : {
      "name" : "test floor updated",
      "level": 1,
      "height": 2.5,
      "drawing" : {
        "filename": "https://somenewfilenameurl.com/img.png"
      }
   }
}
HTTP 200
{
   "project_id" : 195783,
   "name" : "test floor updated",
   "id" : 186992,
   "updated_at" : "2016-11-14T16:07:08.000Z",
   "height" : "2.5",
   "created_at" : "2016-11-14T16:07:08.000Z",
   "level" : 1
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Destroy

DELETE /projects/:project_id/floors/:id.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:id yes The floor you want to destroy within specified project
HTTP 200

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Drawings

Create

POST /projects/:project_id/floors/:floor_id/drawing.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to create the drawing
filename no Uploaded file io, either in png, jpg or pdf format
remote_filename_url no Remote file location for drawing
placement_width no Size of the drawing in the editor
placement_height no Size of the drawing in the editor
alpha no Default 50. Transparency of drawing in percentage
position no Default 0.00 0.00 0.00. Position offset of the drawing in the editor. Only first two values are used, X and Y
rotation no Default 0.00 0.00 0.00. Rotation of the drawing in the editor
visible no Default 1. A true or false value for displaying the drawing

{
   "drawing" : {
      "remote_filename_url" : "https://some-domain.com/myimage.png"
   }
}
HTTP 200
{
    "alpha": 50,
    "content_type": null,
    "floor_id": 186986,
    "height": null,
    "id": 1034,
    "position": "0.00 0.00 0.00",
    "rotation": "0.00 0.00 0.00",
    "size": "0.00 0.00 0.00",
    "url": "https://fpcdn_dev.s3.amazonaws.com/uploads/drawings/1034/myimage.png",
    "visible": 1,
    "width": null
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Show

GET /projects/:project_id/floors/:floor_id/drawing.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the drawing
HTTP 200
{
    "alpha": 50,
    "content_type": null,
    "floor_id": 186986,
    "height": null,
    "id": 1034,
    "position": "0.00 0.00 0.00",
    "rotation": "0.00 0.00 0.00",
    "size": "0.00 0.00 0.00",
    "url": "https://fpcdn_dev.s3.amazonaws.com/uploads/drawings/1034/myimage.png",
    "visible": 1,
    "width": null
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update

PUT /projects/:project_id/floors/:floor_id/drawing.json

Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the drawing
filename no Uploaded file io, either in png, jpg or pdf format
remote_filename_url no Remote file location for drawing
placement_width no Size of the drawing in the editor
placement_height no Size of the drawing in the editor
alpha no Default 50. Transparency of drawing in percentage
position no Default 0.00 0.00 0.00. Position offset of the drawing in the editor. Only first two values are used, X and Y
rotation no Default 0.00 0.00 0.00. Rotation of the drawing in the editor
visible no Default 1. A true or false value for displaying the drawing

{
    "filename": "https://someother.com/image.pdf"
}
HTTP 200
{
  "alpha": 50,
  "content_type": null,
  "floor_id": 186986,
  "height": null,
  "id": 1034,
  "position": "0.00 0.00 0.00",
  "rotation": "0.00 0.00 0.00",
  "size": "0.00 0.00 0.00",
  "url": "https://fpcdn_dev.s3.amazonaws.com/uploads/drawings/1034/image.pdf",
  "visible": 1,
  "width": null
}

Forbidden

The supplied cookies, api key or token are invalid or the requested project is set to public: false

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Destroy

DELETE /projects/:project_id/floors/:floor_id/drawing.json
Parameter Required Value
:project_id yes The project_id in which to find the floor
:floor_id yes The floor_id in which to find the drawing
HTTP 200

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

RoomTypeSets

Create

POST /room_type_sets.json
Parameter Required Value
set_name yes Specify the name of the RoomTypeSet

{
  "set_name": "some set name"
}
HTTP 200
{
   "id" : 11,
   "deleted_at" : null,
   "set_name" : "some set name",
   "updated_at" : "2016-11-01T12:37:37.000Z",
   "created_at" : "2016-11-01T12:37:37.000Z",
   "user_id" : 19449306,
   "is_default" : null
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Index

GET /room_type_sets.json
Parameter Required Value
offset no Default 0, specify result offset, will skip the first n (where n is the amount of results you want to skip) results
HTTP 200
[
   {
      "id" : 1,
      "updated_at" : "2016-10-13T14:10:00.000Z",
      "user_id" : null,
      "created_at" : "2016-10-11T08:14:28.000Z",
      "deleted_at" : null,
      "is_default" : true,
      "set_name" : "set name 1"
   },
   {
      "is_default" : null,
      "set_name" : "some set name",
      "deleted_at" : null,
      "id" : 10,
      "updated_at" : "2016-11-01T12:37:29.000Z",
      "created_at" : "2016-11-01T12:37:29.000Z",
      "user_id" : 19449306
   },
   {
      "created_at" : "2016-11-01T12:37:37.000Z",
      "user_id" : 19449306,
      "updated_at" : "2016-11-01T12:37:37.000Z",
      "id" : 11,
      "is_default" : null,
      "set_name" : "some set name",
      "deleted_at" : null
   }
]

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Show

GET /room_type_sets/:id.json
Parameter Required Value
:id yes The numeric ID of the RoomTypeSet to find
HTTP 200
{
   "deleted_at" : null,
   "created_at" : "2016-11-01T12:37:29.000Z",
   "id" : 10,
   "set_name" : "some set name",
   "is_default" : null,
   "updated_at" : "2016-11-01T12:37:29.000Z",
   "user_id" : 19449306
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Update

POST /room_type_sets/:id/update.json PUT /room_type_sets/:id.json PATCH /room_type_sets/:id.json

Parameter Required Value
:id yes The numeric ID of the RoomTypeSet to find
set_name no Specify the new set name

{
  "set_name": "some set name updated"
}
HTTP 200
{
   "deleted_at" : null,
   "created_at" : "2016-11-01T12:37:29.000Z",
   "id" : 10,
   "set_name" : "some set name updated",
   "is_default" : null,
   "updated_at" : "2016-11-01T12:37:29.000Z",
   "user_id" : 19449306
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403

Not found

The requested resource could not be found in our database. HTTP 404

Destroy

POST /room_type_sets/:id/destroy.json DELETE /room_type_sets/:id.json

Parameter Required Value
:id yes The numeric ID of the RoomTypeSet to find
HTTP 200
{
   "status": "ok"
}

Forbidden

The supplied cookies, api key or token are invalid or you are not the owner of the room type set.

HTTP 403
{
   "status": "forbidden"
}

Not found

The requested resource could not be found in our database. HTTP 404

RoomTypes

Create

POST /room_type_sets/:room_type_set_id/room_types.json
Parameter Required Value
:room_type_set_id yes The numerical set ID of which you want to add this item to
name yes Specify the name of the RoomType
style yes A hex value to be used as a color for the RoomType
row_order_position no Control the index of this item within the list of items from the set

{
  "name": "room type 1",
  "style": "#09c"
}
HTTP 200
{
   "room_type_set_id" : 10,
   "deleted_at" : null,
   "style" : "#09c",
   "id" : 55,
   "row_order" : 4194304,
   "name" : "room type 1"
}

Forbidden

The supplied cookies, api key or token are invalid.

HTTP 403
{
   "status": "forbidden"
}

Not found

The requested resource could not be found in our database. HTTP 404

Index

GET /room_type_sets/:room_type_set_id/room_types.json
Parameter Required Value
offset no Default 0, specify result offset, will skip the first n (where n is the amount of results you want to skip) results
HTTP 200
[
   {
      "deleted_at" : null,
      "name" : "room type 1",
      "row_order" : 0,
      "style" : "#09c",
      "room_type_set_id" : 10,
      "id" : 54
   },
   {
      "room_type_set_id" : 10,
      "style" : "#09c",
      "id" : 55,
      "deleted_at" : null,
      "name" : "room type 1",
      "row_order" : 4194304
   }
]

Forbidden

The supplied cookies, api key or token are invalid or you are not the owner of the room types.

HTTP 403

Show

GET /room_type_sets/:room_type_set_id/room_types/:id.json
Parameter Required Value
:room_type_set_id yes The numeric ID of the RoomTypeSet to find
:id yes The numeric ID of the RoomType to find
HTTP 200
{
   "row_order" : 0,
   "deleted_at" : null,
   "room_type_set_id" : 10,
   "style" : "#09c",
   "name" : "room type 1",
   "id" : 54
}

Not found

The requested resource could not be found in our database or does not belong to the specified RoomTypeSet HTTP 404

Update

POST /room_type_sets/:room_type_set_id/room_types/:id/update.json PUT /room_type_sets/:room_type_set_id/room_types/:id.json PATCH /room_type_sets/:room_type_set_id/room_types/:id.json

Parameter Required Value
:room_type_set_id yes The numeric ID of the RoomTypeSet in which to look for the RoomType
:id yes The numeric ID of the RoomType to update within the specified RoomTypeSet
name no Specify the new name
style no Specify a new style
row_order_position no Control the index of this item within the list of items from the set

{
   "style" : "#d22",
   "name" : "updated room type name"
}
HTTP 200
{
   "deleted_at" : null,
   "row_order" : 0,
   "style" : "#d22",
   "id" : 54,
   "room_type_set_id" : 10,
   "name" : "updated room type name"
}

Not found

The requested resource could not be found in our database or does not belong to the specified RoomTypeSet HTTP 404

Destroy

POST /room_type_sets/:room_type_set_id/room_types/:id/destroy.json DELETE /room_type_sets/:room_type_set_id/room_types/:id.json

Parameter Required Value
:room_type_set_id yes The numeric ID of the RoomTypeSet in which to look for the RoomType
:id yes The numeric ID of the RoomTypeSet to delete
HTTP 200
{
   "status": "ok"
}

Forbidden

The supplied cookies, api key or token are invalid or you are not the owner of the set / type

HTTP 403
{
   "status": "forbidden"
}

Not found

The requested resource could not be found in our database. HTTP 404