Web APIBuildings
Buildings
Buildings, their floors, and the floor plans positions are drawn on.
https://api.locantra.deGet one building
https://api.locantra.de/buildingReturns a single building of your organisation. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first.
Create a building
https://api.locantra.de/buildingCreates a building from its footprint. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. A ring must be closed, its last pair repeating its first. The footprint is required and must not overlap another building of your organisation, which is rejected with 409. Set IsSynthetic for an indoor venue that has no real footprint; two synthetic buildings cannot share a SlotIndex, which is rejected with 409 as well.
Update a building
https://api.locantra.de/buildingChanges the name or the footprint of one building. Those are the only fields this operation can change — IsSynthetic and SlotIndex are fixed at creation — and an omitted field is left unchanged. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. The footprint cannot be emptied, and a new one that overlaps another building of your organisation is rejected with 409.
Delete a building
https://api.locantra.de/buildingDeletes a building together with every floor it has and every floor plan on those floors, including the stored floor plan images. Anchors placed in the building are kept and lose their placement.
Get one building floor
https://api.locantra.de/building/floorReturns a single building floor of your organisation. FloorIndex is the storey number: 0 is ground level and a basement is negative.
Create a building floor
https://api.locantra.de/building/floorAdds a floor to a building of your organisation. FloorIndex is the storey number: 0 is ground level and a basement is negative. FloorIndex is fixed at creation and cannot be changed afterwards, and the floor cannot be moved to another building — delete it and create it where it belongs instead.
Rename a building floor
https://api.locantra.de/building/floorChanges a building floor's name. Name is the only field this operation can change: FloorIndex is immutable and a floor cannot be moved to another building.
Delete a building floor
https://api.locantra.de/building/floorDeletes a building floor together with its floor plan and the stored floor plan image. Anchors placed on the floor are kept and lose their placement.
Get one floor plan
https://api.locantra.de/building/floorplanReturns a single floor plan of your organisation: the image's dimensions and its placement, not the image itself. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels.
Upload a floor plan
https://api.locantra.de/building/floorplanCreates a floor plan for a building floor by uploading its image, as a multipart/form-data request. The image is PNG, JPEG or WebP, at most 10 MB and roughly 50 megapixels; an SVG is rejected to prevent stored XSS. A building floor has at most one floor plan, which is rejected with 409.
Update a floor plan
https://api.locantra.de/building/floorplanChanges a floor plan's name, its scale or its placement on the map. Those are the only fields this operation can change, and an omitted field is left unchanged; the image itself cannot be replaced — delete the floor plan and upload a new one. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels. A GeoReference with empty coordinates drops the placement.
Delete a floor plan
https://api.locantra.de/building/floorplanDeletes a floor plan and the stored image with it. Its building floor is kept and can take a new floor plan.
Get a floor plan's image
https://api.locantra.de/building/floorplan/imageStreams the stored image of a floor plan belonging to your organisation. The response Content-Type follows the stored image — image/png, image/jpeg or image/webp, see FloorPlan's ImageMimeType.
List floor plans
https://api.locantra.de/building/floorplansLists the floor plans of your organisation; a building floor has at most one. A floor plan carries the image's dimensions and its placement, not the image itself — read the bytes from GET /building/floorplan/image. GeoReference places the floor plan image on the map, as a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first; GeoReferenceOffsetX and GeoReferenceOffsetY shift the image against it in pixels. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.
List building floors
https://api.locantra.de/building/floorsLists the building floors of your organisation, across every building unless BuildingID narrows it. FloorIndex is the storey number: 0 is ground level and a basement is negative. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.
List buildings
https://api.locantra.de/buildingsLists the buildings of your organisation. GeoReference is the building's footprint, a GeoJSON Polygon — {"type":"Polygon","coordinates":[…]}, longitude first. Results are paged with Limit (default 100, maximum 1000) and Offset; the response envelope's Page carries the applied Limit and the Total match count.