Replace a floor
const url = 'https://example.com/v1/example/data/floors/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","name":"0","title":"Reception","y":1,"ordinal":0,"height":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/example/data/floors/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "name": "0", "title": "Reception", "y": 1, "ordinal": 0, "height": 1 }'If the body includes an id, it must match the one in the path.
With Content-Type: application/geo+json, takes IMDF features. A level’s name becomes the floor’s title, and its ordinal the floor’s ordinal. IMDF positions are worked out from the space’s georeference, so these need one.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The project ID of the space
The floor’s id
Request Bodyrequired
Section titled “Request Bodyrequired”A floor of the space. Floors are worked out from the scan each time the navigation mesh is generated. A floor found at about the same height as before keeps its id, title and ordinal; any others are removed or added.
object
Identifies the floor. Equal to its key in the space’s floors.
The floor’s number, counting up from 0 for the lowest. Visitors see “Floor title.
The floor’s name as visitors see it, e.g. “Ground floor”, in place of its number.
object
The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.
The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.
Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.
object
The height of the floor’s walkable surface, in metres. A point belongs to the highest floor whose y is no more than 0.5m above it.
The floor’s level relative to the floor with ground-level access, which is 0: 1 is the floor above it, -1 the one below. Defaults to the floor’s position counting up from the lowest, which is right unless the space has floors below ground level.
How far the floor extends above y, in metres - up to just below the next floor. Used to decide what’s shown when viewing one floor at a time.
An IMDF feature: a GeoJSON Feature with a feature_type. Coordinates are WGS 84 longitude and latitude.
object
The feature’s id, a version 4 UUID.
The IMDF feature type, e.g. amenity.
A GeoJSON geometry, or null for features with none.
The properties IMDF defines for the feature type.
object
A GeoJSON FeatureCollection of IMDF features.
object
An IMDF feature: a GeoJSON Feature with a feature_type. Coordinates are WGS 84 longitude and latitude.
object
The feature’s id, a version 4 UUID.
The IMDF feature type, e.g. amenity.
A GeoJSON geometry, or null for features with none.
The properties IMDF defines for the feature type.
object
Responses
Section titled “Responses”The updated floor
A floor of the space. Floors are worked out from the scan each time the navigation mesh is generated. A floor found at about the same height as before keeps its id, title and ordinal; any others are removed or added.
object
Identifies the floor. Equal to its key in the space’s floors.
The floor’s number, counting up from 0 for the lowest. Visitors see “Floor title.
The floor’s name as visitors see it, e.g. “Ground floor”, in place of its number.
object
The text in the language given by locale. Also shown when there’s no variant for the viewer’s language.
The language value is written in, as a BCP 47 tag - a base language such as en, or a regional one such as en-GB.
Translations of value, keyed by BCP 47 language tag. A viewer sees the variant for their exact language (e.g. en-GB), then the one for its base language (e.g. en), then value.
object
The height of the floor’s walkable surface, in metres. A point belongs to the highest floor whose y is no more than 0.5m above it.
The floor’s level relative to the floor with ground-level access, which is 0: 1 is the floor above it, -1 the one below. Defaults to the floor’s position counting up from the lowest, which is right unless the space has floors below ground level.
How far the floor extends above y, in metres - up to just below the next floor. Used to decide what’s shown when viewing one floor at a time.
Example
{ "name": "0", "title": "Reception", "ordinal": 0}A GeoJSON FeatureCollection of IMDF features.
object
An IMDF feature: a GeoJSON Feature with a feature_type. Coordinates are WGS 84 longitude and latitude.
object
The feature’s id, a version 4 UUID.
The IMDF feature type, e.g. amenity.
A GeoJSON geometry, or null for features with none.
The properties IMDF defines for the feature type.
object
Example
{ "type": "FeatureCollection", "features": [ { "type": "Feature" } ]}The body is invalid. issues describes what was wrong.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The token is missing or invalid.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The token has no access to this space.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}No item has this id.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The body isn’t in a format this operation accepts.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Too many requests. Retry after Retry-After seconds.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Headers
Section titled “Headers”Seconds to wait before retrying
Something upstream failed.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}The space is moving between servers. Retry after Retry-After seconds.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}Headers
Section titled “Headers”Seconds to wait before retrying
Something upstream timed out.
object
A description of the error
A stable identifier for the kind of error
For invalidBody: what failed validation, and where
object
Example generated
{ "error": "example", "code": "example", "issues": [ {} ]}