Level 1 · Connected
Floor plan and photos
Each floor's SVG, with every unit's id, and the centre's photos.
The floor plan
PUT /facilities/{facilityId}/floor-plan, with version and its floors: each floor's id, name (“Ground floor”) and svg.
- It's your software's SVG, the same its websites use: the portal cleans it and only colours it by status. It never redraws it.
- Only shapes and text: no scripts, images, links or external fonts. Up to 2 MB per floor and 10 floors.
- Each unit's shape carries
data-unit-idwith itsid. A shape with adata-unit-idthat isn't any unit blocks the floor plan (unknown_unit_in_plan); a unit without a shape doesn't, with theunit_not_in_planwarning.
SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 320">
<g data-unit-id="T-021">
<rect x="20" y="20" width="120" height="120" fill="#fff" stroke="#1F1B18"/>
<text x="80" y="88" text-anchor="middle">21</text>
</g>
</svg>Photos
PUT /facilities/{facilityId}/photos/{photoId}, with the image as the body (Content-Type: image/jpeg,image/pngorimage/webp), up to 15 MB and at least 800 px on the long side. The portal reworks it: straightened, resized and without metadata.PUT /facilities/{facilityId}/photos, withversionandphotos: each one'sidand, if you like, itscaption, in display order. Those not included are removed. Up to 20.- We don't download them from a URL: that way nobody hotlinks them and we don't have to trust an outside server.
curl
curl -X PUT https://api.findqbox.com/connect/v1/facilities/madrid-01/photos/photo-1 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: image/jpeg" \
--data-binary @corridor.jpgIf your software sends no photos or description, the operator can add them in Qbox. What your software sends takes precedence.