Skip to content

Space API Reference v2

Rest version

Space API Reference overview

All resources represent physical or conceptual elements in form of GeoJSON compliant Features, with the following restrictions and additional foreign members per Sec. 6.1:

  • A Resource object must contain the GeoJSON id member with a UUID value.
  • A Resource object must contain a resourceType member with a Resource type value.

User Teams

You can restrict access to certain floors with the Teams feature. It allows you to assign both users and floors to the teams and prevents the floors from being opened or edited by people who are not part of said team.

  • A user can belong to 1 team, multiple teams or no teams.
  • A floor can belong either to 1 team or no teams.
  • A team can have multiple users and multiple floors.

In the Space API floors can be filtered by a team ID only if the User Teams feature is enabled in an organization.

Floor resource

Floor resource

The Floor object

js
{
  type: 'Feature',
  resourceType: 'Floor',
  id: '1ca271b9-7975-4a2c-8b62-ca118d374295',
  properties: {
    archived: false, // whether the floor is archived or not
    area: 500, // Area in square meters
    name: "5th floor", // name of the floor
    elevation: 2.1, // meters vertically measured from point 0
    northDirection: [1, 0], // 2D vector pointing north
    private: false, // whether the floor is private or not
    createdAt: "2021-07-09T12:32:23.533Z", // when the floor was created
    teamId: "f621036e-a32f-4c2c-ba6f-66ae164041d9", // id of the team that owns the floor, is optional.
    floorNumber: "5", // optional property, description of the floor level (string field, not neccessary parsable to number)
    labels: [ // user-defined labels attached to the floor
              {
                "color": "#ffab00",
                "title": "Corporate"
              }
            ]
  },
  resourceRelations: {
    // is empty for archived floors
    spaces: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f',
      '5ecee0b6-743f-4731-b294-d841a44814d1'
    ],
    // is empty for archived floors
    assets: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c',
      '24413ed3-de99-4402-a879-2d5e93bc53eb',
      '6ff729e9-9111-49ec-8330-b2341151a5af'
    ]
  },
  geometry: {
    // Describes the contour / outer shape of a Floor in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9895336425684, 40.7412823023507], [-73.98954794033,   40.7412868179835],
      [-73.9895528256612, 40.7412860863857], [-73.9895576054433, 40.7412848084612],
      [-73.9895680749846, 40.7412799280722], [-73.9895716707574, 40.7412768548214],
      [-73.9895745785771, 40.7412737107194], [-73.9895767813852, 40.7412708641736],
      [-73.9895765794105, 40.7412707741342], [-73.9898452450994, 40.7409021075081],
      [-73.98985039,      40.7408922323802], [-73.989849947639,  40.7408845905923],
      [-73.9898500511928, 40.7408845738501], [-73.9898487441441, 40.7408798965972],
      [-73.9898446124742, 40.7408750048212], [-73.9896178136094, 40.7407794398655],
      [-73.9896067770011, 40.7407767525407], [-73.9895991672847, 40.7407788124714],
      [-73.9895901209793, 40.7407836048703], [-73.9895887271039, 40.7407881332852],
      [-73.9895884512781, 40.7407927081052], [-73.9895233799189, 40.7412615614218],
      [-73.9895234999116, 40.7412666948974], [-73.9895239115663, 40.7412697307808],
      [-73.9895283424893, 40.7412787837426], [-73.9895336425684, 40.7412823023507]
    ]]
  }
}
{
  type: 'Feature',
  resourceType: 'Floor',
  id: '1ca271b9-7975-4a2c-8b62-ca118d374295',
  properties: {
    archived: false, // whether the floor is archived or not
    area: 500, // Area in square meters
    name: "5th floor", // name of the floor
    elevation: 2.1, // meters vertically measured from point 0
    northDirection: [1, 0], // 2D vector pointing north
    private: false, // whether the floor is private or not
    createdAt: "2021-07-09T12:32:23.533Z", // when the floor was created
    teamId: "f621036e-a32f-4c2c-ba6f-66ae164041d9", // id of the team that owns the floor, is optional.
    floorNumber: "5", // optional property, description of the floor level (string field, not neccessary parsable to number)
    labels: [ // user-defined labels attached to the floor
              {
                "color": "#ffab00",
                "title": "Corporate"
              }
            ]
  },
  resourceRelations: {
    // is empty for archived floors
    spaces: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f',
      '5ecee0b6-743f-4731-b294-d841a44814d1'
    ],
    // is empty for archived floors
    assets: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c',
      '24413ed3-de99-4402-a879-2d5e93bc53eb',
      '6ff729e9-9111-49ec-8330-b2341151a5af'
    ]
  },
  geometry: {
    // Describes the contour / outer shape of a Floor in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9895336425684, 40.7412823023507], [-73.98954794033,   40.7412868179835],
      [-73.9895528256612, 40.7412860863857], [-73.9895576054433, 40.7412848084612],
      [-73.9895680749846, 40.7412799280722], [-73.9895716707574, 40.7412768548214],
      [-73.9895745785771, 40.7412737107194], [-73.9895767813852, 40.7412708641736],
      [-73.9895765794105, 40.7412707741342], [-73.9898452450994, 40.7409021075081],
      [-73.98985039,      40.7408922323802], [-73.989849947639,  40.7408845905923],
      [-73.9898500511928, 40.7408845738501], [-73.9898487441441, 40.7408798965972],
      [-73.9898446124742, 40.7408750048212], [-73.9896178136094, 40.7407794398655],
      [-73.9896067770011, 40.7407767525407], [-73.9895991672847, 40.7407788124714],
      [-73.9895901209793, 40.7407836048703], [-73.9895887271039, 40.7407881332852],
      [-73.9895884512781, 40.7407927081052], [-73.9895233799189, 40.7412615614218],
      [-73.9895234999116, 40.7412666948974], [-73.9895239115663, 40.7412697307808],
      [-73.9895283424893, 40.7412787837426], [-73.9895336425684, 40.7412823023507]
    ]]
  }
}

Get a single Floor

GET

v2/floor/{floorId}

Archived floors won't list resourceRelations.

Optional params

paramtypedefaultdescription
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result

Response

js
{
  // Floor object without `geometry` property
}
{
  // Floor object without `geometry` property
}

Get a single Floor with GeoJSON

GET

v2/floor/{floorId}/geo-json

Optional params

paramtypedefaultdescription
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result
includeAllElementsbooleanfalseInstead of returning just the outline of the floor in a single GeoJSON Feature, the endpoint will respond with the detailed 2d geometries of all elements on the floor wrapped in a GeoJSON FeatureCollection. “simplestyle” is used to provide out of the box style information.

Response

js
{
  // Floor object with `geometry` property
}
{
  // Floor object with `geometry` property
}

Query Floors

GET

v2/floor

List Floor objects matching at least one of the optional query parameters.

To list both private and public resources, both of the floor:queryPublic and floor:queryPrivate scopes must be provided in the access token. If just one of the scopes is provided, then the query only returns resources that fall into that category. For example, a query with an access token that only has floor:queryPublic scope will only return public floors of the organization.

Optional params

paramtypedefaultdescription
namestringnullList all Floors with a specific name with wildcard support
spaceIduuidnullList Floors including a specific space
assetIduuidnullList Floors including a specific asset
teamIduuid/nullundefinedWhen the teams feature is enabled and turned on, it filters the floors. Pass a UUID to filter by a given team, or null to filter "Unassigned" floors.
geometrybooleanfalseWhether to include geometry property of the floors in the results
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result
includeArchivedbooleanfalseWhether to include archived floors in the result
labelstringnullFilter for Floors with the specified label
limitint200Pagination support for large results, max 200
offsetint0Pagination support for large results

Response

The response will include a maximum of 200 Floor items per page.

js
{
  type: 'FeatureCollection',
  features: [
    // Floor object(s)
  ]
}
{
  type: 'FeatureCollection',
  features: [
    // Floor object(s)
  ]
}

Floorplan as raster or vector image

POST

v2/floor/{floorId}/2d-image

It is possible to fetch the floorplan as png or svg image with a high level of customization.

With a JSON body using default formatting:

js
{
  format: 'svg' // svg | png | jpg
}
{
  format: 'svg' // svg | png | jpg
}

Or with customizations:

js
{
  format: 'svg', // svg | png | jpg
  fpeOptions: {
    hideElements: {},
    theme: {},
    planRotation: 90,
    units: {}
  }
}
{
  format: 'svg', // svg | png | jpg
  fpeOptions: {
    hideElements: {},
    theme: {},
    planRotation: 90,
    units: {}
  }
}

Where fpeOptions is of type StartupOptions as defined in the Floor Plan Engine API reference.

Response:

js
{
    "imageUrl": "https://testing-storage.3d.io/fpe/floor/0c27993f-4e3d-4eae-96fd-ef01bc1cc878-e507948193a7ea036ec0b313bee0b67a.svg",
    "latLngBounds": [
        [8.519898816608844, 47.37704318568811],
        [8.520652662643258, 47.37733122877267]
    ]
}
{
    "imageUrl": "https://testing-storage.3d.io/fpe/floor/0c27993f-4e3d-4eae-96fd-ef01bc1cc878-e507948193a7ea036ec0b313bee0b67a.svg",
    "latLngBounds": [
        [8.519898816608844, 47.37704318568811],
        [8.520652662643258, 47.37733122877267]
    ]
}

Where imageUrl is permanent link to the image, latLngBounds specify the top-left and bottom-right corners of the image.

floorplan

Scene Structure

GET

v2/floor/{floorId}/scene-structure

Read the Archilogic scene structure of the floor.

Optional params

paramtypedefaultdescription
includeMetadatabooleanfalseWhether to include scene structure metadata in the result

Response

js
{
  structure: // Archilogic scene structure
  metadata: // Scene structure metadata
}
{
  structure: // Archilogic scene structure
  metadata: // Scene structure metadata
}

Get DXF

GET

v2/floor/{floorId}/dxf

Returns a DXF file URL generated from the floor's scene structure, valid for 60 minutes.

Response

js
{
  downloadUrl: // URL to download DXF
}
{
  downloadUrl: // URL to download DXF
}

Archive Floors

POST

v2/floor/{floorId}/archive

Archive Floors by floor id. Spaces and assets can not be queried for archived floors.

Response

js
{
  message: 'Successfully archived scene <sceneId>.'
}
{
  message: 'Successfully archived scene <sceneId>.'
}

Unarchive Floors

POST

v2/floor/{floorId}/unarchive

Unarchive Floors by floor id

Response

js
{
  message: 'Successfully unarchived scene <sceneId>.'
}
{
  message: 'Successfully unarchived scene <sceneId>.'
}

Space resource

Space resource

The Space object

Take a look at the space taxonomy for reference

js
{
  type: 'Feature',
  resourceType: 'Space',
  id: '0804efc7-6dcd-416b-b439-a6d8191200ae',
  properties: {
    area: 57, // Area in square meters
    center: [],// center defined as most distant point from the contour
    usage: "meetingRoom", // Human readable description of space usage
    program: "meet", // space program that the usage belongs to
    height: 2.8, // height in meters
    northDirection: [1, 0], // 2D vector pointing north
    customId: '101A', // custom ID string
    name: 'Meeting Room Type A' // space name string
  },
  resourceRelations: {
    floors: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f'
    ],
    assets: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c',
      '24413ed3-de99-4402-a879-2d5e93bc53eb'
    ]
  },
  geometry: {
    // Describes the inner shape of a space in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9896565570417, 40.7411498833846], [-73.9896104593945, 40.7411304475015],
      [-73.9895926916832, 40.7411548285941], [-73.9895977867848, 40.7411680018768],
      [-73.989632638668,  40.7411827044963], [-73.9896565570417, 40.7411498833846]
    ]]
  },
  geometryOpenings: [
    // Openings along the boundary polygon
    {
      type: "door",
      edgeIdx: [0,2], // maps hierarchically to one item in geometry.coordinates
      pos: 0.2, // position along the polygon edge [meters]
      y: 0, l: 0.8, h: 2.1, // Y position, length, height [meters]
      id: '7a86dd86-f8ee-403a-aafa-fef3c2ed15e8' // enables matching of openings across spaces
    },
    { type: "window", edgeIdx: [0,4], pos: 1, y: 0.6, l: 1.6, h: 1.6, id: '...' }
    { type: "window", edgeIdx: [1,1], pos: 0.3, y: 0.6, l: 1.6, h: 1.6, id: '...' }
  ]
}
{
  type: 'Feature',
  resourceType: 'Space',
  id: '0804efc7-6dcd-416b-b439-a6d8191200ae',
  properties: {
    area: 57, // Area in square meters
    center: [],// center defined as most distant point from the contour
    usage: "meetingRoom", // Human readable description of space usage
    program: "meet", // space program that the usage belongs to
    height: 2.8, // height in meters
    northDirection: [1, 0], // 2D vector pointing north
    customId: '101A', // custom ID string
    name: 'Meeting Room Type A' // space name string
  },
  resourceRelations: {
    floors: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f'
    ],
    assets: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c',
      '24413ed3-de99-4402-a879-2d5e93bc53eb'
    ]
  },
  geometry: {
    // Describes the inner shape of a space in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9896565570417, 40.7411498833846], [-73.9896104593945, 40.7411304475015],
      [-73.9895926916832, 40.7411548285941], [-73.9895977867848, 40.7411680018768],
      [-73.989632638668,  40.7411827044963], [-73.9896565570417, 40.7411498833846]
    ]]
  },
  geometryOpenings: [
    // Openings along the boundary polygon
    {
      type: "door",
      edgeIdx: [0,2], // maps hierarchically to one item in geometry.coordinates
      pos: 0.2, // position along the polygon edge [meters]
      y: 0, l: 0.8, h: 2.1, // Y position, length, height [meters]
      id: '7a86dd86-f8ee-403a-aafa-fef3c2ed15e8' // enables matching of openings across spaces
    },
    { type: "window", edgeIdx: [0,4], pos: 1, y: 0.6, l: 1.6, h: 1.6, id: '...' }
    { type: "window", edgeIdx: [1,1], pos: 0.3, y: 0.6, l: 1.6, h: 1.6, id: '...' }
  ]
}

Get a single Space

GET

v2/space/{spaceId}

Spaces in archived floors can not be queried.

Optional params

paramtypedefaultdescription
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result

Response

js
{
  // Space object without `geometry` and `geometryOpenings` properties.
}
{
  // Space object without `geometry` and `geometryOpenings` properties.
}

Get a single Space with GeoJSON

GET

v2/space/{spaceId}/geo-json

Optional params

paramtypedefaultdescription
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result

Response

js
{
  // Space object with `geometry` and `geometryOpenings` properties.
}
{
  // Space object with `geometry` and `geometryOpenings` properties.
}

Query Spaces

GET

v2/space

List space objects matching at least one of the optional query parameters.

To list both private and public resources, both of the floor:queryPublic and floor:queryPrivate scopes must be provided in the access token. If just one of the scopes is provided, then the query only returns resources that fall into that category. For example, a query with an access token that only has floor:queryPublic scope will only return spaces from public floors of the organization.

Optional params

paramtypedefaultdescription
floorIduuidnullList all spaces within a Floor
assetIduuidnullList spaces including in a specific asset
geometrybooleanfalseWhether to include geometry and geometryOpenings properties of the spaces in the results
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result
limitint500Pagination support for large results, max 500
offsetint0Pagination support for large results

Response

The response will include a maximum of 500 space items per page.

js
{
  type: 'FeatureCollection',
  properties: {
    offset: 200,
    warnings: []
  },
  features: [
    // space object(s)
  ]
}
{
  type: 'FeatureCollection',
  properties: {
    offset: 200,
    warnings: []
  },
  features: [
    // space object(s)
  ]
}

Asset resource

Asset resource

The Asset object

Take a look at the product taxonomy for reference

js
{
  type: 'Feature',
  resourceType: 'Asset',
  id: '5c94ac2b-06eb-4aa7-b443-cf24b19c4a07', // unique identifier of the furniture element
  properties: {
    dimensions: {}, // 3D bounding box dimensions
    categories: ['seating'], // product category
    subCategories: ['taskChair'], // product subCategory
    manufacturer: '', // Manufacturer brand name or company name
    name: '', // string Name of the product
    productId: '35fa5b72-b2c2-47bc-ae65-5ea4abf6b17b', // string unique identifier of the product
    tags: [], //
    seatCapacity: 2, // number of people who can be seated on asset (only set for categories seating, softSeating, and booth)
    northDirection: [1, 0] // 2D vector pointing north
  },
  resourceRelations: {
    floors: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f'
    ],
    spaces: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c'
    ]
  },
  geometry: {
    // Describes the outer shape of an asset in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9896290125206, 40.7411811304675], [-73.9896313084026, 40.7411779800182],
      [-73.989614740846,  40.7411709947361], [-73.989612444964,  40.7411741451855],
      [-73.9896290125206, 40.7411811304675]
    ]]
  }
}
{
  type: 'Feature',
  resourceType: 'Asset',
  id: '5c94ac2b-06eb-4aa7-b443-cf24b19c4a07', // unique identifier of the furniture element
  properties: {
    dimensions: {}, // 3D bounding box dimensions
    categories: ['seating'], // product category
    subCategories: ['taskChair'], // product subCategory
    manufacturer: '', // Manufacturer brand name or company name
    name: '', // string Name of the product
    productId: '35fa5b72-b2c2-47bc-ae65-5ea4abf6b17b', // string unique identifier of the product
    tags: [], //
    seatCapacity: 2, // number of people who can be seated on asset (only set for categories seating, softSeating, and booth)
    northDirection: [1, 0] // 2D vector pointing north
  },
  resourceRelations: {
    floors: [
      'dea1e7e5-2b1a-4f92-a4d5-5a18e9e31d9f'
    ],
    spaces: [
      '3d245ec4-0e33-4310-8f3d-143b5d1ec23c'
    ]
  },
  geometry: {
    // Describes the outer shape of an asset in WGS 84 coordinates
    type: 'Polygon',
    coordinates: [[
      [-73.9896290125206, 40.7411811304675], [-73.9896313084026, 40.7411779800182],
      [-73.989614740846,  40.7411709947361], [-73.989612444964,  40.7411741451855],
      [-73.9896290125206, 40.7411811304675]
    ]]
  }
}

Get a single Asset

GET

v2/asset/{assetId}

Assets in archived floors can not be queried.

Response

js
{
  // Asset object without `geometry` property
}
{
  // Asset object without `geometry` property
}

Get a single Asset with GeoJSON

GET

v2/asset/{assetId}/geo-json

Optional params

paramtypedefaultdescription
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result

Response

js
{
  // Asset object with `geometry` property
}
{
  // Asset object with `geometry` property
}

Query Assets

GET

v2/asset

List assets objects matching at least one of the optional query parameters.

To list both private and public resources, both of the floor:queryPublic and floor:queryPrivate scopes must be provided in the access token. If just one of the scopes is provided, then the query only returns resources that fall into that category. For example, a query with an access token that only has floor:queryPublic scope will only return assets from public floors of the organization.

Optional params

paramtypedefaultdescription
floorIduuidnullList all assets within a Floor
spaceIduuidnullList all assets within a space
geometrybooleanfalseWhether to include geometry property of the assets in the results
includeCustomAttributesbooleanfalseWhether to include custom attributes on the resource in the result
limitint1000Pagination support for large results, max 1000
offsetint0Pagination support for large results

Response

The response will include a maximum of 1000 asset items per page.

js
{
  type: 'FeatureCollection',
  properties: {
    offset: 5000,
    warnings: []
  },
  features: [
    // asset object(s)
  ]
}
{
  type: 'FeatureCollection',
  properties: {
    offset: 5000,
    warnings: []
  },
  features: [
    // asset object(s)
  ]
}

Custom Attributes

You can attach custom attributes to Floor, Space, Asset and Product resources and add data specific to your needs. A custom attribute has a definition (e.g. “Department”) that is applied to all objects of this resource type. A value (e.g. “IT”) can be added to a specific resource. In other words, if you create a custom attribute “Department” for the resource type Asset, every asset can now have a value (“IT”, “Operations”, “Marketing” etc.) attached to it for the "Department" custom attribute.

Get a single Custom Attribute definition

GET

v2/{resourceType}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
apiFieldNameAPI name of the custom attribute created for given resource type

Example

GET v2/space/custom-attributes/style
GET v2/space/custom-attributes/style

Responds with HTTP status 200 and body:

  {
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Style",
    "description": "Style of the space",
    "valueType": "Text"
  }
  {
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Style",
    "description": "Style of the space",
    "valueType": "Text"
  }

Or with:

  • 403 for invalid access token
  • 404 for unknown API field name

Get all Custom Attribute definitions for a resource

GET

v2/{resourceType}/custom-attributes

Parameters

paramallowed values
resourceTypefloor/space/asset/product

Example

GET v2/asset/custom-attributes
GET v2/asset/custom-attributes

Responds with HTTP status 200 and body:

[
  {
    "apiFieldName": "isAddOn",
    "resourceType": "Asset",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean"
  }
]
[
  {
    "apiFieldName": "isAddOn",
    "resourceType": "Asset",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean"
  }
]

Or with:

  • 403 for invalid access token

Get all Custom Attribute definitions for all resources

GET

v2/custom-attributes

Example

GET v2/custom-attributes
GET v2/custom-attributes

Responds with HTTP status 200 and body:

[
  {
    "apiFieldName": "isAddOn",
    "resourceType": "Asset",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean"
  },
  {
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Style",
    "description": "Style of the space",
    "valueType": "Text"
  }
]
[
  {
    "apiFieldName": "isAddOn",
    "resourceType": "Asset",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean"
  },
  {
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Style",
    "description": "Style of the space",
    "valueType": "Text"
  }
]

Or with:

  • 403 for invalid access token

Create Custom Attribute definition

POST

v2/{resourceType}/custom-attributes

Parameters

paramallowed values
resourceTypefloor/space/asset/product

Body

paramrequiredallowed valuesdescription
apiFieldNameYesUnique per resource type, case-sensitive. Length: >= 3, <= 50 characters. Only numbers, letters, hyphens and underscores are allowedA user friendly API name for the custom attribute
valueTypeYes"Text"/"Number"/"Boolean"Value type of the custom attribute's value
titleYesUnique per resource type, can contain spaces. Length: >= 3, <= 30 charactersA name/title of the custom attribute
descriptionNoLength: >= 3, <= 200 charactersDescription of the custom attribute

Example

POST v2/asset/custom-attributes
POST v2/asset/custom-attributes

with a JSON body:

{
  "apiFieldName": "isAddOn",
  "valueType": "Boolean",
  "title": "Add-on",
  "description": "Is this an add-on"
}
{
  "apiFieldName": "isAddOn",
  "valueType": "Boolean",
  "title": "Add-on",
  "description": "Is this an add-on"
}

Responds with HTTP status 201 and:

headers: { Location: v2/asset/custom-attributes/isAddOn }
body:
{
  "apiFieldName": "isAddOn",
  "description": "Is this an add-on",
  "resourceType": "Asset",
  "title": "Add-on",
  "valueType": "Boolean"
}
headers: { Location: v2/asset/custom-attributes/isAddOn }
body:
{
  "apiFieldName": "isAddOn",
  "description": "Is this an add-on",
  "resourceType": "Asset",
  "title": "Add-on",
  "valueType": "Boolean"
}

Or with:

  • 400 for invalid request body (missing required properties, wrong value types for properties)
  • 403 for invalid access token or exceeded limit of custom attributes

Update Custom Attribute definition

PATCH

v2/{resourceType}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
apiFieldNameAPI name of the custom attribute created for given resource type

Body

paramrequiredallowed valuesdescription
titleNoUnique per resource type, can contain spaces. Length: >= 3, <= 30 charactersA name/title of the custom attribute
descriptionNoLength: >= 3, <= 200 charactersDescription of the custom attribute

Example

PATCH v2/space/custom-attributes/style
PATCH v2/space/custom-attributes/style

with a JSON body:

{
  "description": "This field describes Space's style."
}
{
  "description": "This field describes Space's style."
}

Responds with HTTP status 200 and body:

{
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Title for style",
    "description": "Style of the space",
    "valueType": "Text"
}
{
    "apiFieldName": "style",
    "resourceType": "Space",
    "title": "Title for style",
    "description": "Style of the space",
    "valueType": "Text"
}

Or with:

  • 400 for invalid request body (wrong value type for properties)
  • 403 for invalid access token
  • 404 for unknown API field name

Delete Custom Attribute definition

DELETE

v2/{resourceType}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
apiFieldNameAPI name of the custom attribute created for given resource type

Example

DELETE v2/space/custom-attributes/style
DELETE v2/space/custom-attributes/style

Responds with HTTP status 200

Or with:

  • 403 for invalid access token
  • 404 for unknown API field name

Get a single Custom Attribute value

GET

v2/{resourceType}/{resourceId}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
resourceIdID of the concrete resource which a custom attribute was attached to
apiFieldNameAPI name of the custom attribute created for given resource type

Example

GET v2/asset/1234-5678-9012/custom-attributes/isAddOn
GET v2/asset/1234-5678-9012/custom-attributes/isAddOn

Responds with HTTP status 200 and body:

  {
    "apiFieldName": "isAddOn",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean",
    "value": true
  }
  {
    "apiFieldName": "isAddOn",
    "title": "Add-on",
    "description": "Is this an add-on",
    "valueType": "Boolean",
    "value": true
  }

Or with:

  • 400 for malformed resource ID
  • 403 for invalid access token
  • 404 for unknown API field name

Get all Custom Attribute values assigned to a resource

GET

v2/{resourceType}/{resourceId}/custom-attributes **

Parameters

paramallowed values
resourceTypefloor/space/asset/product
resourceIdID of the concrete resource which a custom attribute was attached to

Example

GET v2/space/1234-5678-9012/custom-attributes
GET v2/space/1234-5678-9012/custom-attributes

Responds with HTTP status 200 and body:

[
  {
      "apiFieldName": "style",
      "title": "Style",
      "description": "Style of the space",
      "valueType": "Text",
      "value": "Nordic"
    }
]
[
  {
      "apiFieldName": "style",
      "title": "Style",
      "description": "Style of the space",
      "valueType": "Text",
      "value": "Nordic"
    }
]

Or with:

  • 400 for malformed resource ID
  • 403 for invalid access token

Create Custom Attribute value

POST

v2/{resourceType}/{resourceId}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
resourceIdID of the concrete resource which a custom attribute was attached to
apiFieldNameAPI name of the custom attribute created for given resource type

Body

paramrequiredallowed valuesdescription
valueYesIt must be aligned with valueType of custom attribute ("Text"/"Boolean"/"Number"). Text's length: >= 1, <= 200 charactersA value for the custom attribute assigned to a concrete resource

Example

POST v2/space/1234-5678-9012/custom-attributes/style
POST v2/space/1234-5678-9012/custom-attributes/style

with a JSON body:

{
  "value" : "Modern"
}
{
  "value" : "Modern"
}

Responds with HTTP status 201 and:

headers: { Location: v2/space/1234-5678-9012/custom-attributes/style }
body: {
  "apiFieldName": "style",
  "resourceType": "Space",
  "title": "Style",
  "description": "Style of the space",
  "valueType": "Text",
  "value": "Modern"
}
headers: { Location: v2/space/1234-5678-9012/custom-attributes/style }
body: {
  "apiFieldName": "style",
  "resourceType": "Space",
  "title": "Style",
  "description": "Style of the space",
  "valueType": "Text",
  "value": "Modern"
}

Or with:

  • 400 for invalid request body (invalid value type, not matching with API field's type) or for malformed resource ID
  • 403 for invalid access token
  • 404 for unknown API field name

Update Custom Attribute value

PATCH

v2/{resourceType}/{resourceId}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
resourceIdID of the concrete resource which a custom attribute was attached to
apiFieldNameAPI name of the custom attribute created for given resource type

Body

paramrequiredallowed valuesdescription
valueYesIt must be aligned with valueType of custom attribute ("Text"/"Boolean"/"Number"). Text's length: >= 1, <= 200 charactersA value for the custom attribute assigned to a concrete resource

Example

PATCH v2/space/1234-5678-9012/custom-attributes/style
PATCH v2/space/1234-5678-9012/custom-attributes/style

with a JSON body:

{
  "value" : "Classic"
}
{
  "value" : "Classic"
}

Responds with HTTP status 200 and body:

{
  "apiFieldName": "style",
  "resourceType": "Space",
  "title": "Style,
  "description": "Style of the space",
  "valueType": "Text",
  "value": "Classic"
}
{
  "apiFieldName": "style",
  "resourceType": "Space",
  "title": "Style,
  "description": "Style of the space",
  "valueType": "Text",
  "value": "Classic"
}

Or with:

  • 400 for invalid request body (invalid value type, not matching with API field's type) or for malformed resource ID
  • 403 for invalid access token
  • 404 for unknown API field name

Delete Custom Attribute value

DELETE

v2/{resourceType}/{resourceId}/custom-attributes/{apiFieldName}

Parameters

paramallowed values
resourceTypefloor/space/asset/product
resourceIdID of the concrete resource which a custom attribute was attached to
apiFieldNameAPI name of the custom attribute created for given resource type

Example

DELETE v2/space/1234-5678-9012/custom-attributes/style
DELETE v2/space/1234-5678-9012/custom-attributes/style

Responds with HTTP status 200

Or with:

  • 400 for malformed resource ID
  • 403 for invalid access token
  • 404 for unknown API field name