Introduction

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

Create

POST /users.json
Parameter Required Value
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
role no Either "subuser", "plus" or "pro". Upgrades the user to specific account type.
Only partner accounts can do "plus" or "pro" upgrades. Defaults to: "subuser"

{
   "email": "some@email.woohoo",
   "username": "my-awesome-username",
   "password": "sent-over-https",
   "measurement_system": "METRIC"
}
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",
    "role": "subuser"
}

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

Index

GET /users.json?page=1&per_page=50
Parameter Required Value
page no Page to paginate to, default: 1
per_page no Number of results to show per page, default: 50
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",
        "role": "free"
    }
]

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
user_id no The ID of the user which owns the project (only for partners)

{
  "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

Index

GET /projects.json?page=1&per_page=50
Parameter Required Value
page no Page to paginate to, default: 1
per_page no Number of results to show per page, default: 50
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

Not found

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

Update

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

Parameter Required Value
name no The name of the project
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

{
  "public": false,
  "name": "My new house",
  "description": "This is my first floor plan",
  "external_identifier": "ID3344"

}
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

Not found

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

Destroy

DELETE /projects/:id.json
Parameter Required Value
:id yes The project id of the project 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

Export 2D

POST /projects/:id/export.json
Parameter Required Value
:id yes Project id
designs no An array of design ids (present within the project) you want to export, defaults to null (includes all project designs)
fmt yes An array of formats in which you want to export the project, choices are png, pdf, jpg
width yes Width of export in pixels
height yes Height of export in pixels
type yes Type of export, use 2d
paper[combine] yes A boolean value to choose between merging the export on one page or exporting multiple pages
paper[orientation] no Either landscape or portrait, orientation of the export, default landscape
paper[size] no One of A4, A3, A2, A1, A0, LETTER, LEGAL - overrides width and height when used with fmt of pdf
paper[scale] no Use a fixed scale, either 50, 100, 200 or 500, the value represents a scale of 1:[N] where [N] is the supplied integer. Only available for fmt of pdf, default auto (auto fit)
paper[logo][url] no Specify the URL of a custom logo
paper[logo][position] no Specify the position of the logo. Bottom positions: BL, BC, BR. Top positions: TL, TC, TR.
paper[logo][scale] no Specify the scale of the logo. Quirck: the value 1 is used for auto scaling, please use 0.99 instead.
paper[margins][top] no Specify top margin in px, default 15
paper[margins][left] no Specify left margin in px, default 15
paper[margins][bottom] no Specify bottom margin in px, default 15
paper[margins][right] no Specify right margin in px, default 15
paper[scalebar][width] no Width of the scalebar in px, default 100
paper[scalebar][height] no Height of the scalebar in px, default 4
paper[scalebar][div] no Divisions in the scalebar in px, default 5
callback yes Specify a http endpoint or valid email addresss, when using a http endpoint, see an example response in the callback tab

{
  "id": 1,
  "designs": [32144, 32146],
  "fmt": ["jpg"],
  "width": 960,
  "height": 540,
  "type": "2d",
  "paper": {
    "combine": false,
    "orientation": "landscape",
    "size": null,
    "scale": null,
    "logo": {
      "url": "http://www.lewescoastandcountry.com/wp-content/uploads/site-materials/remax-balloon.png",
      "position": "BR",
      "scale": 0.99
    },
    "margins": {
        "top": 15,
        "left": 15,
        "bottom": 15,
        "right": 15
    },
    "scalebar": {
        "height": 4,
        "width": 100,
        "div": 5
    }
  }
}
HTTP 200

Unprocessable entity

One or more of the specified parameters isn't valid HTTP 422
{
  "error": "invalid parameters specified"
}
{
 "project": {
  "1": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/dbn1420sd.pdf"
  ]
 },
 "design": {
  "32144": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/rHQ646jDl.jpg",
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/BJ7pDSJ57.png"
  ],
  "32146": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/I7dygTD2ig.jpg",
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/d4GH97Sqd3.png"
  ]
 }
}

Export 3D

POST /projects/:id/export.json
Parameter Required Value
:id yes Project id
designs no An array of design ids (present within the project) you want to export, defaults to null (includes all project designs)
fmt yes An array of formats in which you want to export the project, choices are png, pdf, jpg
width yes Width of export in pixels
height yes Height of export in pixels
type yes Type of export, use 3d
views[type] yes One of top, ne, se, sw, nw, tilted, photo, panorama or stereo (for a left and right panorama)
views[camera_id] no Specify a camera to use when rendering, only applied with views[type] of photo, panorama or stereo
views[section] no Specify a section height in centimeters, for example 180. Walls, doors & windows are cut off at this height. When set it overwrites the value from FML.
views[wall_top_color] no Specify the color of the wall tops, for example 666666. When set it overwrites the value from FML.
paper[combine] yes A boolean value to choose between merging the export on one page or exporting multiple pages
paper[orientation] no Either landscape or portrait, orientation of the export, default landscape
paper[size] no One of A4, A3, A2, A1, A0, LETTER, LEGAL - overrides width and height
paper[logo][url] no Specify the URL of a custom logo
paper[logo][position] no Specify the position of the logo. Bottom positions: BL, BC, BR. Top positions: TL, TC, TR.
paper[logo][scale] no Specify the scale of the logo. Quirck: the value 1 is used for auto scaling, please use 0.99 instead.
paper[margins][top] no Specify top margin in px, default 15
paper[margins][left] no Specify left margin in px, default 15
paper[margins][bottom] no Specify bottom margin in px, default 15
paper[margins][right] no Specify right margin in px, default 15
callback yes Specify a http endpoint or valid email addresss, when using a http endpoint, see an example response in the callback tab

{
  "id": 1,
  "designs": [12345, 12346],
  "fmt": ["jpg"],
  "width": 960,
  "height": 540,
  "type": "3d",
  "views": [
    {"type": "top"},
    {"type": "nw", "section": 180, "wall_top_color": "cccccc"},
    {"type": "panorama", "camera_id": 1}
  ],
  "paper": {
    "combine": false,
    "orientation": "landscape",
    "size": null,
    "scale": null,
    "logo": {
      "url": "http://www.lewescoastandcountry.com/wp-content/uploads/site-materials/remax-balloon.png",
      "position": "BR",
      "scale": 0.99
    },
    "margins": {
        "top": 15,
        "left": 15,
        "bottom": 15,
        "right": 15
    },
    "scalebar": {
        "height": 4,
        "width": 100,
        "div": 5
    }
  }
}
HTTP 200

Unprocessable entity

One or more of the specified parameters isn't valid HTTP 422
{
  "error": "invalid parameters specified"
}
{
 "project": {
  "1": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/rJG6HpVVje.pdf"
  ]
 },
 "design": {
  "12345": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/rJ6H64Vol.jpg",
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/BJ7pBaVNjx.png"
  ],
  "12346": [
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/HygTB6E4ig.jpg",
   "https://s3-eu-west-1.amazonaws.com/fpdata/exports/2d/Sy4aHpE4ig.png"
  ]
 }
}

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>
  <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>
  <!-- ... -->
</design>
HTTP 200
  <?xml version="1.0" encoding="UTF-8"?>
  <design>
    <id>3535343</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>

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
  <?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>

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

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