{
    "openapi": "3.1.0",
    "info": {
        "title": "Lomnio",
        "version": "1.0.0",
        "description": "## Authentication\n\nAll API requests require a **Bearer token** in the `Authorization` header:\n\n```\nAuthorization: Bearer YOUR_API_TOKEN\n```\n\nTokens are project-specific and have scoped permissions (e.g. `project:read`, `units:read`, `leads:create`). The one exception is a **reporting** key (`reporting:read`): it covers every project of the tenant and opens only the `\/api\/v1\/reporting\/*` endpoints.\n\n## Rate Limiting\n\n| Endpoint Group | Limit |\n|---------------|-------|\n| Read endpoints (projects, units, maps, reporting) | 100 requests\/minute |\n| Lead submission | 10 requests\/minute |\n| Tracking events | 120 requests\/minute |\n\nRate limit headers are included in every response: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`.\n\n## Base URL\n\nAll endpoints are prefixed with `\/api\/v1\/`.\n\n## Reporting API (Power BI, Excel)\n\n`GET \/api\/v1\/reporting\/units` and `GET \/api\/v1\/reporting\/deals` export every unit and deal of the tenant \u2014 all projects, published or not \u2014 as flat rows ready for a BI tool. They need a tenant-wide key with the `reporting:read` ability; a website key is refused with `403`. Responses are paginated (`per_page` up to 500) and never cached.\n\nRows come oldest change first, ordered by `last_changed_at` and then `id`. Walk them with a **cursor**: after each page, request the next one with `updated_since` = the `last_changed_at` of the last row you received and `after_id` = its `id`, until a page comes back empty. (`page` numbers work too, but a row edited while you walk them shifts the rest by one and a row is skipped.) For an incremental refresh, store the `last_changed_at` of the last row you loaded and start the next run with `updated_since` set to it and **no** `after_id` \u2014 timestamps have one-second resolution, so that second may have gained rows since. Upsert rows by `id`; the re-read ones simply overwrite themselves. `last_changed_at` also moves when a row's deals, contracts, leases, handover protocols or the buyer's record change, not only the row itself. Deleted rows are not reported, and renaming a salesperson, project or pipeline stage does not move the watermark, so reload the full dataset from time to time.\n\n**Power BI**\n\nPower BI Service can only refresh a web query whose base URL is a fixed string, so the path and query string must go into `RelativePath` and `Query` \u2014 a URL assembled by concatenation is a \"dynamic data source\" and the scheduled refresh refuses it. The token goes in the `Authorization` header, which is why the data source credential is set to **Anonymous** (in Power BI Service also tick *Skip test connection*: the bare base URL answers `401` without the header).\n\n```\nlet\n    BaseUrl = \"https:\/\/YOUR-LOMNIO-DOMAIN\",\n    Token = \"YOUR_API_TOKEN\",\n    GetRows = (cursor as record) =>\n        Json.Document(Web.Contents(BaseUrl, [\n            RelativePath = \"api\/v1\/reporting\/units\",\n            Query = [per_page = \"500\"] & cursor,\n            Headers = [Authorization = \"Bearer \" & Token, Accept = \"application\/json\"]\n        ]))[data],\n    After = (row as record) => [updated_since = row[last_changed_at], after_id = Text.From(row[id])],\n    Pages = List.Generate(\n        () => GetRows([]),\n        each List.Count(_) > 0,\n        each GetRows(After(List.Last(_)))\n    ),\n    Units = Table.FromRecords(List.Combine(Pages))\nin\n    Units\n```\n\nUse `api\/v1\/reporting\/deals` for the deals table and join the two on `deals.unit_ids` \/ `units.id`, or on `primary_unit_id`. Do not pass the token as `?token=` \u2014 it would be written to server logs.\n\n## Outbound Webhooks (Push Sync)\n\nIn addition to the pull endpoints above, Lomnio can **push** changes to your site in real time. When a website-facing unit is created, updated, deleted, or unpublished \u2014 or a floor, a floor plan, the project, a published project document or a project attribute changes \u2014 Lomnio sends a `POST` to a per-project webhook URL (configured in the Lomnio project settings). The body carries the same full snapshot as the matching pull endpoint: `GET \/api\/v1\/units\/{unit}`, one item of `GET \/api\/v1\/floors`, or `GET \/api\/v1\/project`.\n\n**Request**\n\n- `POST` with `Content-Type: application\/json`\n- Headers:\n  - `X-Lomnio-Event` \u2014 `unit.created`, `unit.updated`, `unit.deleted`, `units.bulk_updated`, `floor.created`, `floor.updated`, `floor.deleted`, `project.updated`, `lead.created`, `lead.stage_changed`, or `webhook.test`\n  - `X-Lomnio-Delivery` \u2014 unique delivery id (use for idempotency)\n  - `X-Lomnio-Signature` \u2014 `sha256=<hmac>` of the raw body, keyed by your project signing secret\n- Respond `2xx` within 15 seconds. Failed deliveries are retried 3\u00d7 (10s \/ 60s \/ 300s).\n\n**Payload**\n\n```json\n{\n  \"event\": \"unit.updated\",\n  \"occurred_at\": \"2026-07-14T09:30:00+00:00\",\n  \"project\": { \"id\": 12, \"slug\": \"brenner\" },\n  \"unit_id\": 3456,\n  \"external_id\": \"A.101\",\n  \"changed_fields\": [\"status\", \"price_without_vat\"],\n  \"deleted\": false,\n  \"visible\": true,\n  \"unit\": { \"\u2026\": \"same shape as GET \/api\/v1\/units\/{unit}\" }\n}\n```\n\n**Handling**\n\n| Condition | Action |\n|-----------|--------|\n| `deleted == true` | Remove the unit |\n| `visible == false` | Remove the unit (it was unpublished) |\n| otherwise | Upsert from `unit` |\n\n**Bulk event**: `units.bulk_updated` carries `{ event, occurred_at, project, reason, unit_ids, floor_ids }` \u2014 ids only, sent once per project after an import (`reason: import`) or when one change reaches many units (a renamed building, floor or phase, a unit attribute definition). Re-pull the listed units with `GET \/api\/v1\/units\/{id}` (404 \u2192 remove) and, when `floor_ids` is set, `GET \/api\/v1\/floors`.\n\n**Floor and project events**: `floor.*` carry `{ event, occurred_at, project, floor_id, changed_fields, deleted, floor }` with `floor` = one item of `GET \/api\/v1\/floors` (`changed_fields: [\"floor_plan\"]` when the plan image changed \u2014 the URL stays the same, so re-fetch it). `project.updated` carries `{ event, occurred_at, changed_fields, project }` with `project` = the full `GET \/api\/v1\/project` snapshot, including the complete list of published `files`. Acknowledge event types you do not handle with `2xx`.\n\n**Lead events** (opt-in per project, optionally to a separate lead URL): `lead.created` and `lead.stage_changed` carry `{ event, occurred_at, project, lead_id, previous_stage, lead }`, where `lead` is one item of `GET \/api\/v1\/leads` (contact data, UTM, ad click ids, stage with `is_won`\/`is_lost`). Built for offline-conversion syncs; a website unit receiver should ignore them.\n\n**Verifying the signature (required)**\n\nThe endpoint URL is not secret \u2014 authenticity comes from the signature. Recompute the HMAC over the **raw request body** with your project secret and compare in constant time:\n\n```php\n$expected = 'sha256=' . hash_hmac('sha256', $rawBody, $secret);\nif (! hash_equals($expected, $signatureHeader)) {\n    http_response_code(401);\n    exit; \/\/ forged or misconfigured \u2014 reject\n}\n```\n\nAlways verify the signature, use HTTPS, and deduplicate on `X-Lomnio-Delivery` (delivery is at-least-once)."
    },
    "servers": [
        {
            "url": "https:\/\/app.lomnio.com\/api"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/v1\/facade-maps": {
            "get": {
                "operationId": "v1.facade-maps.index",
                "description": "Returns all active facade maps for the project associated with the API token.",
                "summary": "List facade maps",
                "tags": [
                    "Facade Maps",
                    "FacadeMap"
                ],
                "parameters": [
                    {
                        "name": "locale",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/FacadeMapResource"
                                            }
                                        },
                                        "settings": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "settings"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/facade-maps\/{facadeMap}": {
            "get": {
                "operationId": "v1.facade-maps.show",
                "description": "Returns a specific facade map with its building, floor, image, and regions.",
                "summary": "Get facade map details",
                "tags": [
                    "Facade Maps",
                    "FacadeMap"
                ],
                "parameters": [
                    {
                        "name": "facadeMap",
                        "in": "path",
                        "required": true,
                        "description": "The facade map ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`FacadeMapResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/FacadeMapResource"
                                        },
                                        "settings": {
                                            "type": "object",
                                            "properties": {
                                                "currency": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "currency"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "settings"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/facade-maps\/{facadeMap}\/image": {
            "get": {
                "operationId": "v1.facade-maps.image",
                "description": "Streams the facade map image file. To show the map on a public page, use\nthe signed `image_public_url` from the facade map response rather than\nthis URL: the token this endpoint needs must not be placed in HTML.",
                "summary": "Get facade map image",
                "tags": [
                    "Facade Maps",
                    "FacadeMap"
                ],
                "parameters": [
                    {
                        "name": "facadeMap",
                        "in": "path",
                        "required": true,
                        "description": "The facade map ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "example": "Access denied."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/floors": {
            "get": {
                "operationId": "v1.floors.index",
                "description": "Returns every floor for the project associated with the API token, with its availability\ncomputed from the project's floor-availability statuses and a link to its floor plan when one\nexists. Lets you read floor-level availability directly instead of deriving it from the units\nor facade maps.",
                "summary": "List floors",
                "tags": [
                    "Floors",
                    "Floor"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/FloorResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/floors\/{floor}\/floor-plan": {
            "get": {
                "operationId": "v1.floors.floor-plan",
                "description": "Streams the floor plan (the active floor-level facade map image). The floor\nmust belong to the token's project. To embed the plan on a public page, use\nthe signed `floor_plan_url` from the floors response rather than this URL:\nthe token this endpoint needs must not be placed in HTML.",
                "summary": "Get floor plan",
                "tags": [
                    "Floors",
                    "Floor"
                ],
                "parameters": [
                    {
                        "name": "floor",
                        "in": "path",
                        "required": true,
                        "description": "The floor ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/leads": {
            "post": {
                "operationId": "v1.leads.store",
                "description": "Creates a new lead\/inquiry from a website contact form. Automatically deduplicates customers by email or phone.\nRequires GDPR consent. Returns an acknowledgement with an opaque `request_id` to quote to support.",
                "summary": "Submit a lead",
                "tags": [
                    "Leads",
                    "Lead"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreLeadRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "request_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "request_id"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "get": {
                "operationId": "v1.leads.index",
                "description": "Returns the project's leads with contact data, attribution (UTM, ad click ids)\nand pipeline stage, oldest change first. Built for offline-conversion syncs:\npoll with `updated_since` to pick up new leads and stage changes (won\/lost),\nwalk the pages, then advance your watermark to the last `updated_at` you saw.\nAscending order keeps that safe: a lead changed while you page moves to the\nend, never behind you. `stage=won` gives a periodic won-leads export.\nRequires the `leads:read` ability, which is never issued to a browser-side key.\n\nQuery: `updated_since` \/ `created_since` (ISO 8601), `stage` (`open`, `won`,\n`lost`), `per_page` (max 200), `page`.",
                "summary": "List leads",
                "tags": [
                    "Leads",
                    "Lead"
                ],
                "parameters": [
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "created_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "stage",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "open",
                                "won",
                                "lost"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 200
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `LeadResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/LeadResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/location-map": {
            "get": {
                "operationId": "v1.location-map.show",
                "description": "Returns the active location map for the project associated with the API token.",
                "summary": "Get location map",
                "tags": [
                    "Location Maps",
                    "LocationMap"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#\/components\/schemas\/LocationMapResource"
                                                },
                                                "config": {
                                                    "type": "object",
                                                    "properties": {
                                                        "mapbox_token": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "brand_colors": {
                                                            "type": "object",
                                                            "properties": {
                                                                "primary": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "#3B82F6"
                                                                            ]
                                                                        }
                                                                    ]
                                                                },
                                                                "accent": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "string",
                                                                            "enum": [
                                                                                "#10B981"
                                                                            ]
                                                                        }
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "primary",
                                                                "accent"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "mapbox_token",
                                                        "brand_colors"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "config"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/project": {
            "get": {
                "operationId": "v1.project.show",
                "description": "Returns detailed information about the project associated with the API token.",
                "summary": "Get project details",
                "tags": [
                    "Projects",
                    "Project"
                ],
                "responses": {
                    "200": {
                        "description": "`ProjectResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ProjectResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/project\/files\/{file}": {
            "get": {
                "operationId": "v1.project.files.show",
                "description": "Streams a project document \u2014 brochure, price list, technical specification.\nThe file must belong to the token's project and be flagged as visible on\nthe website. To embed the document on a public page, use the signed\n`url` from the project response rather than this one: the token\nthis endpoint needs must not be placed in HTML.",
                "summary": "Download a project file",
                "tags": [
                    "Projects",
                    "Project"
                ],
                "parameters": [
                    {
                        "name": "file",
                        "in": "path",
                        "required": true,
                        "description": "The file ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/sales-reps": {
            "get": {
                "operationId": "v1.sales-reps",
                "description": "Returns the assigned sales representatives for the project using round-robin rotation.\nPass a `session_id` to maintain consistent rep assignment across page views.",
                "summary": "Get sales representatives",
                "tags": [
                    "Projects",
                    "Project"
                ],
                "parameters": [
                    {
                        "name": "session_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "session_id": {
                                                    "type": "string"
                                                },
                                                "sales_reps": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/SalesRepResource"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "session_id",
                                                "sales_reps"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/reporting\/units": {
            "get": {
                "operationId": "v1.reporting.units",
                "description": "Every unit of the tenant \u2014 all projects, published or not \u2014 with prices,\nareas, outdoor space totals per type, and who holds it: seller, buyer\n(id and name only), deal stage, reservation, the signing date of each\ncontract type and the handover date.\n\nA signing date is that of the latest **signed, non-cancelled** contract of\nthe type held by the unit's current buyer; cancelled contracts (a\nwithdrawn letter of intent) and deleted contracts are ignored.\n\n**Incremental sync:** rows are ordered by `last_changed_at`, oldest first.\n`last_changed_at` moves when the unit changes and also when its deals,\ncontracts, leases, handover protocols or the buyer's record change. Page\nwith a cursor rather than `page` numbers: request with `updated_since`\nset to the `last_changed_at` of the last row you received and `after_id`\nto its `id`, until a page comes back empty. Store the last row's\n`last_changed_at` as the watermark and start the next sync with\n`updated_since` = watermark and **no** `after_id`: that re-reads the\nwatermark's whole second, which can have gained rows since, so upsert\nrows by `id`. (`page` still works, but a row edited while you walk the\npages shifts the rest and one gets skipped.) Deleted units drop out of the list\nrather than being reported, and renaming a salesperson, project or\npipeline stage does not move the watermark, so refresh the full dataset\nperiodically.\n\nRequires a tenant-wide key with the `reporting:read` ability.",
                "summary": "List units for reporting",
                "tags": [
                    "Reporting"
                ],
                "parameters": [
                    {
                        "name": "project_id",
                        "in": "query",
                        "description": "Only a project of the credential's own tenant: an id from another\ntenant is rejected the same way as one that does not exist.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "after_id",
                        "in": "query",
                        "description": "Keyset cursor: resume after this row of the `updated_since` second.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 500
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ReportingUnitResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ReportingUnitResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/reporting\/deals": {
            "get": {
                "operationId": "v1.reporting.deals",
                "description": "Every deal of the tenant \u2014 all projects, published or not, lost ones\nincluded \u2014 with its units, customer (id and name only), seller, pipeline\nstage, status, value, source, the key dates of its lifecycle (created,\nreserved, won, lost), the signing date of each contract type and the\nhandover date of a completed sale.\n\nA signing date is that of the latest **signed, non-cancelled** contract of\nthe type on the deal; cancelled and deleted contracts are ignored.\n\n**Incremental sync:** as for units \u2014 cursor over (`last_changed_at`, `id`), where `last_changed_at`\nalso moves when a contract, a handover protocol of the deal's units or\nthe customer's record changes.\n\nThe handover date is that of a completed handover protocol drawn up on\none of the deal's contracts, or without a contract for the deal's\ncustomer \u2014 a resold unit's later handover is not the earlier deal's.\n\nRequires a tenant-wide key with the `reporting:read` ability.",
                "summary": "List deals for reporting",
                "tags": [
                    "Reporting"
                ],
                "parameters": [
                    {
                        "name": "project_id",
                        "in": "query",
                        "description": "Only a project of the credential's own tenant: an id from another\ntenant is rejected the same way as one that does not exist.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    },
                    {
                        "name": "after_id",
                        "in": "query",
                        "description": "Keyset cursor: resume after this row of the `updated_since` second.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 500
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ReportingDealResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ReportingDealResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/tracking\/events": {
            "post": {
                "operationId": "v1.tracking.store",
                "description": "Records a single visitor tracking event from the website. The response `status` is\n`ok` when the event was stored, `duplicate` when it repeats a recent one, `ignored`\nwhen the request came from a crawler or script, and `rejected` (422) when the page\nURL does not belong to the website configured on the project.",
                "summary": "Store a tracking event",
                "tags": [
                    "Tracking"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreTrackingEventRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/tracking\/events\/batch": {
            "post": {
                "operationId": "v1.tracking.store-batch",
                "description": "Records multiple tracking events in a single request. Returns how many events were\ncreated, skipped as duplicates, rejected because their page URL does not belong to\nthe website configured on the project, or ignored as crawler traffic.",
                "summary": "Batch store tracking events",
                "tags": [
                    "Tracking"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/StoreBatchTrackingEventRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "const": "ok"
                                        },
                                        "": {
                                            "type": "object",
                                            "properties": {
                                                "created": {
                                                    "type": "integer"
                                                },
                                                "duplicates": {
                                                    "type": "integer"
                                                },
                                                "rejected": {
                                                    "type": "integer"
                                                },
                                                "ignored": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "created",
                                                "duplicates",
                                                "rejected",
                                                "ignored"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "status",
                                        null
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/tracking\/stats": {
            "get": {
                "operationId": "v1.tracking.stats",
                "description": "Returns aggregated visitor statistics for the project. Use the `days` parameter to set the reporting period (1-365 days, default 30).",
                "summary": "Get tracking statistics",
                "tags": [
                    "Tracking"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "period_days": {
                                            "type": [
                                                "object",
                                                "null"
                                            ]
                                        },
                                        "total_events": {
                                            "type": "string"
                                        },
                                        "unique_visitors": {
                                            "type": "string"
                                        },
                                        "total_sessions": {
                                            "type": "string"
                                        },
                                        "unit_views": {
                                            "type": "string"
                                        },
                                        "unique_units_viewed": {
                                            "type": "string"
                                        },
                                        "converted_visitors": {
                                            "type": "string"
                                        },
                                        "conversion_rate": {
                                            "anyOf": [
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "integer",
                                                    "enum": [
                                                        0
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "period_days",
                                        "total_events",
                                        "unique_visitors",
                                        "total_sessions",
                                        "unit_views",
                                        "unique_units_viewed",
                                        "converted_visitors",
                                        "conversion_rate"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/v1\/units": {
            "get": {
                "operationId": "v1.units.index",
                "description": "Returns a paginated list of units for the project associated with the API token.\nOnly units published to the website (`displayed_on_website = true`) and not in draft are returned.",
                "summary": "List units",
                "tags": [
                    "Units",
                    "Unit"
                ],
                "parameters": [
                    {
                        "name": "min_price",
                        "in": "query",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "max_price",
                        "in": "query",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "min_area",
                        "in": "query",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "max_area",
                        "in": "query",
                        "schema": {
                            "type": [
                                "number",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "room_count",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "building_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "floor_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "phase_id",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page. Max 500; values below 1 are treated as the maximum.",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    },
                    {
                        "name": "detailed",
                        "in": "query",
                        "description": "Return the full per-unit payload (rooms, outdoor spaces, files, similar unit IDs) for every unit, matching the unit detail endpoint. Lets you sync everything in one paginated call instead of one request per unit.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `UnitDetailResource`\n\nPaginated set of `UnitResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/UnitDetailResource"
                                                    }
                                                },
                                                "links": {
                                                    "type": "object",
                                                    "properties": {
                                                        "first": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "last": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "prev": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "next": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "first",
                                                        "last",
                                                        "prev",
                                                        "next"
                                                    ]
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer",
                                                            "minimum": 1
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "minimum": 1
                                                        },
                                                        "last_page": {
                                                            "type": "integer",
                                                            "minimum": 1
                                                        },
                                                        "links": {
                                                            "type": "array",
                                                            "description": "Generated paginator links.",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "url": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "active": {
                                                                        "type": "boolean"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "url",
                                                                    "label",
                                                                    "active"
                                                                ]
                                                            }
                                                        },
                                                        "path": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "description": "Base path for paginator generated URLs."
                                                        },
                                                        "per_page": {
                                                            "type": "integer",
                                                            "description": "Number of items shown per page.",
                                                            "minimum": 0
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "description": "Number of the last item in the slice.",
                                                            "minimum": 1
                                                        },
                                                        "total": {
                                                            "type": "integer",
                                                            "description": "Total number of items being paginated.",
                                                            "minimum": 0
                                                        }
                                                    },
                                                    "required": [
                                                        "current_page",
                                                        "from",
                                                        "last_page",
                                                        "links",
                                                        "path",
                                                        "per_page",
                                                        "to",
                                                        "total"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "links",
                                                "meta"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#\/components\/schemas\/UnitCollection"
                                                },
                                                "links": {
                                                    "type": "object",
                                                    "properties": {
                                                        "first": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "last": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "prev": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "next": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "first",
                                                        "last",
                                                        "prev",
                                                        "next"
                                                    ]
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_page": {
                                                            "type": "integer",
                                                            "minimum": 1
                                                        },
                                                        "from": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "minimum": 1
                                                        },
                                                        "last_page": {
                                                            "type": "integer",
                                                            "minimum": 1
                                                        },
                                                        "links": {
                                                            "type": "array",
                                                            "description": "Generated paginator links.",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "url": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "active": {
                                                                        "type": "boolean"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "url",
                                                                    "label",
                                                                    "active"
                                                                ]
                                                            }
                                                        },
                                                        "path": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "description": "Base path for paginator generated URLs."
                                                        },
                                                        "per_page": {
                                                            "type": "integer",
                                                            "description": "Number of items shown per page.",
                                                            "minimum": 0
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "description": "Number of the last item in the slice.",
                                                            "minimum": 1
                                                        },
                                                        "total": {
                                                            "type": "integer",
                                                            "description": "Total number of items being paginated.",
                                                            "minimum": 0
                                                        }
                                                    },
                                                    "required": [
                                                        "current_page",
                                                        "from",
                                                        "last_page",
                                                        "links",
                                                        "path",
                                                        "per_page",
                                                        "to",
                                                        "total"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "links",
                                                "meta"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/v1\/units\/{unit}": {
            "get": {
                "operationId": "v1.units.show",
                "description": "Returns detailed information about a specific unit including rooms, outdoor spaces, files, bundles, and a list of similar units.",
                "summary": "Get unit details",
                "tags": [
                    "Units",
                    "Unit"
                ],
                "parameters": [
                    {
                        "name": "unit",
                        "in": "path",
                        "required": true,
                        "description": "The unit ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`UnitDetailResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/UnitDetailResource"
                                        },
                                        "similar_units": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/UnitResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "similar_units"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/units\/{unit}\/floor-plan": {
            "get": {
                "operationId": "v1.units.floor-plan",
                "description": "Streams the floor plan file for a unit. The unit must belong to the token's\nproject and be published to the website. To embed the plan on a public page,\nuse the signed `floor_plan_url` from the unit response rather than this URL:\nthe token this endpoint needs must not be placed in HTML.",
                "summary": "Get unit floor plan",
                "tags": [
                    "Units",
                    "Unit"
                ],
                "parameters": [
                    {
                        "name": "unit",
                        "in": "path",
                        "required": true,
                        "description": "The unit ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        },
        "\/v1\/units\/{unit}\/files\/{file}": {
            "get": {
                "operationId": "v1.units.files.show",
                "description": "Streams a document attached to a unit \u2014 apartment card, technical sheet,\nbrochure. The unit must belong to the token's project and be published to\nthe website, and the file must be flagged as visible on it. To embed the\ndocument on a public page, use the signed `url` from the unit\nresponse rather than this URL.",
                "summary": "Download a unit file",
                "tags": [
                    "Units",
                    "Unit"
                ],
                "parameters": [
                    {
                        "name": "unit",
                        "in": "path",
                        "required": true,
                        "description": "The unit ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "file",
                        "in": "path",
                        "required": true,
                        "description": "The file ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "FacadeMapResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "building_id": {
                        "type": "integer"
                    },
                    "floor_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "sort_order": {
                        "type": "integer"
                    },
                    "building": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "floor": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "number": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "number"
                        ]
                    },
                    "image_url": {
                        "type": "string",
                        "description": "`image_url` needs the same token as this response. `image_public_url`\nis signed and token-free, and is the one that belongs in an\n<img src> on a public page."
                    },
                    "image_public_url": {
                        "type": "string"
                    },
                    "regions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "floor_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "unit_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "points": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "x": {
                                                "type": "number"
                                            },
                                            "y": {
                                                "type": "number"
                                            },
                                            "s": {
                                                "type": "boolean"
                                            }
                                        },
                                        "required": [
                                            "x",
                                            "y"
                                        ]
                                    }
                                },
                                "label": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "sort_order": {
                                    "type": "integer"
                                },
                                "settings": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "tooltip_fields": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "detail_fields": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "show_info": {
                                            "type": "boolean"
                                        },
                                        "hide_detail": {
                                            "type": "boolean"
                                        }
                                    }
                                },
                                "unit": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "code": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "status_label": {
                                            "type": "string"
                                        },
                                        "": {
                                            "anyOf": [
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "price": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "price_before_discount": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "monthly_rent": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "monthly_rent_with_vat": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "price",
                                                        "price_before_discount",
                                                        "monthly_rent",
                                                        "monthly_rent_with_vat"
                                                    ]
                                                },
                                                {
                                                    "type": "object",
                                                    "properties": {
                                                        "price": {
                                                            "type": "null"
                                                        },
                                                        "price_before_discount": {
                                                            "type": "null"
                                                        },
                                                        "monthly_rent": {
                                                            "type": "null"
                                                        },
                                                        "monthly_rent_with_vat": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "price",
                                                        "price_before_discount",
                                                        "monthly_rent",
                                                        "monthly_rent_with_vat"
                                                    ]
                                                }
                                            ]
                                        },
                                        "price_display_text": {
                                            "type": "string",
                                            "description": "Set exactly when the price is withheld: the text the website\nshows in its place, as on the units endpoint."
                                        },
                                        "area": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "room_count": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "floor_number": {
                                            "type": "string"
                                        },
                                        "orientation": {
                                            "type": [
                                                "array",
                                                "null"
                                            ],
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "orientation_labels": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "layout_type": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "area_interior": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "area_exterior": {
                                            "type": [
                                                "number",
                                                "null"
                                            ]
                                        },
                                        "custom_attributes": {
                                            "type": "object",
                                            "additionalProperties": {
                                                "anyOf": [
                                                    {
                                                        "type": "string"
                                                    },
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "number"
                                                    },
                                                    {
                                                        "type": "boolean"
                                                    },
                                                    {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    {
                                                        "type": "null"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "code",
                                        "status",
                                        "status_label",
                                        null,
                                        "price_display_text",
                                        "area",
                                        "room_count",
                                        "floor_number",
                                        "orientation",
                                        "orientation_labels",
                                        "layout_type",
                                        "description",
                                        "area_interior",
                                        "area_exterior",
                                        "custom_attributes"
                                    ]
                                },
                                "floor": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "name": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "number": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "number"
                                    ]
                                },
                                "floor_availability": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "enum": [
                                        "available",
                                        "unavailable",
                                        null
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "floor_id",
                                "unit_id",
                                "points",
                                "label",
                                "sort_order",
                                "settings",
                                "unit",
                                "floor",
                                "floor_availability"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "name",
                    "building_id",
                    "floor_id",
                    "is_active",
                    "sort_order"
                ],
                "title": "FacadeMapResource"
            },
            "FloorResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "number": {
                        "type": "integer"
                    },
                    "sort_order": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "building": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "availability": {
                        "type": "string",
                        "enum": [
                            "available",
                            "unavailable"
                        ]
                    },
                    "units_count": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "available_units_count": {
                        "type": "integer"
                    },
                    "facade_map_id": {
                        "type": "string"
                    },
                    "floor_plan_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Signed, not a plain `\/api\/` URL: this lands in an <img src> on a\npublic page, where a token cannot go."
                    }
                },
                "required": [
                    "id",
                    "name",
                    "number",
                    "sort_order",
                    "availability",
                    "facade_map_id",
                    "floor_plan_url"
                ],
                "title": "FloorResource"
            },
            "LeadResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "source": {
                        "type": "string"
                    },
                    "source_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "utm": {
                        "type": "object",
                        "properties": {
                            "source": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "medium": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "campaign": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "content": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "term": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "source",
                            "medium",
                            "campaign",
                            "content",
                            "term"
                        ]
                    },
                    "click_ids": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "stage": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "code": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "is_won": {
                                "type": "boolean"
                            },
                            "is_lost": {
                                "type": "boolean"
                            },
                            "entered_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "code",
                            "name",
                            "is_won",
                            "is_lost",
                            "entered_at"
                        ]
                    },
                    "is_won": {
                        "type": "boolean"
                    },
                    "is_lost": {
                        "type": "boolean"
                    },
                    "customer": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone_e164": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "gdpr_consent": {
                                "type": "boolean"
                            },
                            "marketing_consent": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "email",
                            "phone",
                            "phone_e164",
                            "gdpr_consent",
                            "marketing_consent"
                        ]
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "code",
                    "external_id",
                    "source",
                    "source_url",
                    "utm",
                    "click_ids",
                    "stage",
                    "is_won",
                    "is_lost",
                    "customer",
                    "created_at",
                    "updated_at"
                ],
                "title": "LeadResource"
            },
            "LocationMapResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "is_active": {
                        "type": "boolean"
                    },
                    "center_lat": {
                        "type": "number"
                    },
                    "center_lng": {
                        "type": "number"
                    },
                    "zoom": {
                        "type": "integer"
                    },
                    "radius_meters": {
                        "type": "integer"
                    },
                    "center_logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "style": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "map_style": {
                                "type": "string"
                            },
                            "primary_color": {
                                "type": "string"
                            },
                            "accent_color": {
                                "type": "string"
                            }
                        }
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "slug": {
                                    "type": "string"
                                },
                                "icon": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "color": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "is_preset": {
                                    "type": "boolean"
                                },
                                "pois": {
                                    "anyOf": [
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "icon": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "latitude": {
                                                        "type": "number"
                                                    },
                                                    "longitude": {
                                                        "type": "number"
                                                    },
                                                    "description": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "icon",
                                                    "latitude",
                                                    "longitude",
                                                    "description"
                                                ]
                                            }
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "minItems": 0,
                                            "maxItems": 0,
                                            "additionalItems": false
                                        }
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "name",
                                "slug",
                                "icon",
                                "color",
                                "is_preset",
                                "pois"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "is_active",
                    "center_lat",
                    "center_lng",
                    "zoom",
                    "radius_meters",
                    "center_logo_url",
                    "style"
                ],
                "title": "LocationMapResource"
            },
            "ProjectResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "location": {
                        "type": "object",
                        "properties": {
                            "street": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "zip": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "country": {
                                "type": "string"
                            },
                            "latitude": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "longitude": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "street",
                            "city",
                            "zip",
                            "country",
                            "latitude",
                            "longitude"
                        ]
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_published": {
                        "type": "boolean"
                    },
                    "website_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "currency": {
                        "type": "string",
                        "description": "The tenant's currency, which every amount of the project is in and\nthe app shows. The project's own column is pre-filled at creation\nand not trusted for display, so it is not published either."
                    },
                    "custom_attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "value": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "number"
                                        },
                                        {
                                            "type": "boolean"
                                        },
                                        {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "type": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value",
                                "type"
                            ]
                        }
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "language": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": "string"
                                },
                                "api_url": {
                                    "type": "string"
                                },
                                "mime_type": {
                                    "type": "string"
                                },
                                "size": {
                                    "type": "integer"
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "language",
                                "url",
                                "api_url",
                                "mime_type",
                                "size"
                            ]
                        }
                    },
                    "floor_availability": {
                        "type": "object",
                        "properties": {
                            "show_floor_detail_statuses": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "show_floor_detail_statuses"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "slug",
                    "status",
                    "location",
                    "description",
                    "is_published",
                    "website_url",
                    "currency",
                    "custom_attributes",
                    "files",
                    "floor_availability"
                ],
                "title": "ProjectResource"
            },
            "ReportingDealResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "project_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "project_name": {
                        "type": "string"
                    },
                    "primary_unit_id": {
                        "type": "string"
                    },
                    "primary_unit_code": {
                        "type": "string"
                    },
                    "unit_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "unit_codes": {
                        "type": "string"
                    },
                    "customer_id": {
                        "type": "integer"
                    },
                    "customer_name": {
                        "type": "string"
                    },
                    "seller_id": {
                        "type": "string"
                    },
                    "seller_name": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "pipeline_stage_id": {
                        "type": "string"
                    },
                    "pipeline_stage_code": {
                        "type": "string"
                    },
                    "pipeline_stage_name": {
                        "type": "string"
                    },
                    "is_won": {
                        "type": "string"
                    },
                    "is_lost": {
                        "type": "string"
                    },
                    "price_without_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "discount_without_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "vat_rate": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "price_with_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "source": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reserved_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reserved_until": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "won_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "lost_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "letter_of_intent_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reservation_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "future_purchase_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "purchase_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handover_completed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Only a completed sale was handed over to this customer; a lost\ndeal's unit may since have been handed to the next buyer."
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_changed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "code",
                    "external_id",
                    "project_id",
                    "project_name",
                    "primary_unit_id",
                    "primary_unit_code",
                    "unit_ids",
                    "unit_codes",
                    "customer_id",
                    "customer_name",
                    "seller_id",
                    "seller_name",
                    "status",
                    "pipeline_stage_id",
                    "pipeline_stage_code",
                    "pipeline_stage_name",
                    "is_won",
                    "is_lost",
                    "price_without_vat",
                    "discount_without_vat",
                    "vat_rate",
                    "price_with_vat",
                    "source",
                    "created_at",
                    "reserved_at",
                    "reserved_until",
                    "won_at",
                    "lost_at",
                    "closed_at",
                    "letter_of_intent_signed_at",
                    "reservation_signed_at",
                    "future_purchase_signed_at",
                    "purchase_signed_at",
                    "handover_completed_at",
                    "updated_at",
                    "last_changed_at"
                ],
                "title": "ReportingDealResource"
            },
            "ReportingUnitResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "external_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "project_id": {
                        "type": "integer"
                    },
                    "project_name": {
                        "type": "string"
                    },
                    "building_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "building_name": {
                        "type": "string"
                    },
                    "floor_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "floor_name": {
                        "type": "string"
                    },
                    "floor_number": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "offering": {
                        "type": "string"
                    },
                    "room_count": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "area": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "area_gross": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "equivalent_area": {
                        "type": "string"
                    },
                    "price_without_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "price_with_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "vat_rate": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "price_per_sqm": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "price_per_equivalent_sqm": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "discount_without_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "discount_with_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "discounted_price_without_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "discounted_price_with_vat": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "balcony_area": {
                        "type": "number"
                    },
                    "loggia_area": {
                        "type": "number"
                    },
                    "terrace_area": {
                        "type": "number"
                    },
                    "garden_area": {
                        "type": "number"
                    },
                    "other_outdoor_area": {
                        "type": "number"
                    },
                    "seller_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "seller_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "buyer_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "buyer_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "deal_stage": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reserved_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reserved_until": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "letter_of_intent_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reservation_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "future_purchase_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "purchase_signed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "handover_completed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_changed_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "code",
                    "external_id",
                    "project_id",
                    "project_name",
                    "building_id",
                    "building_name",
                    "floor_id",
                    "floor_name",
                    "floor_number",
                    "type",
                    "status",
                    "offering",
                    "room_count",
                    "area",
                    "area_gross",
                    "equivalent_area",
                    "price_without_vat",
                    "price_with_vat",
                    "vat_rate",
                    "price_per_sqm",
                    "price_per_equivalent_sqm",
                    "discount_without_vat",
                    "discount_with_vat",
                    "discounted_price_without_vat",
                    "discounted_price_with_vat",
                    "balcony_area",
                    "loggia_area",
                    "terrace_area",
                    "garden_area",
                    "other_outdoor_area",
                    "seller_id",
                    "seller_name",
                    "buyer_id",
                    "buyer_name",
                    "deal_stage",
                    "reserved_at",
                    "reserved_until",
                    "letter_of_intent_signed_at",
                    "reservation_signed_at",
                    "future_purchase_signed_at",
                    "purchase_signed_at",
                    "handover_completed_at",
                    "updated_at",
                    "last_changed_at"
                ],
                "title": "ReportingUnitResource"
            },
            "SalesRepResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "photo_url": {
                        "type": "string"
                    },
                    "booking_url": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "name",
                    "email",
                    "phone",
                    "photo_url",
                    "booking_url"
                ],
                "title": "SalesRepResource"
            },
            "StoreBatchTrackingEventRequest": {
                "type": "object",
                "properties": {
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "visitor_token": {
                                    "type": "string",
                                    "maxLength": 64
                                },
                                "session_id": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 64
                                },
                                "event_type": {
                                    "$ref": "#\/components\/schemas\/VisitorEventType"
                                },
                                "unit_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "uri",
                                    "maxLength": 500
                                },
                                "title": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 255
                                },
                                "referrer": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "maxLength": 500
                                },
                                "utm": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "properties": {
                                        "source": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 100
                                        },
                                        "medium": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 100
                                        },
                                        "campaign": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 100
                                        },
                                        "term": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 100
                                        },
                                        "content": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "maxLength": 100
                                        }
                                    }
                                },
                                "duration": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ],
                                    "minimum": 0,
                                    "maximum": 3600
                                },
                                "metadata": {
                                    "type": [
                                        "array",
                                        "null"
                                    ],
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "ts": {
                                    "type": "integer",
                                    "description": "Deliberately not TrackingTimestamp: a stale beacon must cost its\nown event, not the nineteen good ones queued beside it. The\nservice checks the window per event and counts the misses."
                                }
                            },
                            "required": [
                                "visitor_token",
                                "event_type",
                                "ts"
                            ]
                        },
                        "minItems": 1,
                        "maxItems": 50
                    }
                },
                "required": [
                    "events"
                ],
                "title": "StoreBatchTrackingEventRequest"
            },
            "StoreLeadRequest": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "phone": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 10000
                    },
                    "room_count_preference": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "unit_id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Lomnio's id of the unit the lead asks about. It must be a unit of\nthis project shown on the website, otherwise the lead fails with 422."
                    },
                    "unit_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The unit's code as the website shows it, for a website that does not\nknow Lomnio ids. Matched ignoring case and surrounding spaces against\nthe project's units shown on the website. Ignored when unit_id is sent.\nA code that matches no single published unit never fails the lead:\nit is stored without a unit, with a note for the salesperson.",
                        "maxLength": 100
                    },
                    "source_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "utm_source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "utm_medium": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "utm_campaign": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "utm_content": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "utm_term": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "gclid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 512
                    },
                    "fbclid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 512
                    },
                    "msclkid": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 512
                    },
                    "gdpr_consent": {
                        "type": "boolean"
                    },
                    "marketing_consent": {
                        "type": [
                            "boolean",
                            "null"
                        ]
                    },
                    "consent_text": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2000
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 10
                    },
                    "visitor_token": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64
                    }
                },
                "required": [
                    "name",
                    "gdpr_consent"
                ],
                "title": "StoreLeadRequest"
            },
            "StoreTrackingEventRequest": {
                "type": "object",
                "properties": {
                    "visitor_token": {
                        "type": "string",
                        "maxLength": 64
                    },
                    "session_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 64
                    },
                    "event_type": {
                        "$ref": "#\/components\/schemas\/VisitorEventType"
                    },
                    "unit_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 500
                    },
                    "title": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "referrer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 500
                    },
                    "duration": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "minimum": 0,
                        "maximum": 3600
                    },
                    "metadata": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "ts": {
                        "type": "integer"
                    },
                    "utm": {
                        "type": "object",
                        "properties": {
                            "source": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            },
                            "medium": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            },
                            "campaign": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            },
                            "term": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            },
                            "content": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "maxLength": 100
                            }
                        }
                    }
                },
                "required": [
                    "visitor_token",
                    "event_type",
                    "ts"
                ],
                "title": "StoreTrackingEventRequest"
            },
            "UnitCollection": {
                "type": "array",
                "items": {
                    "$ref": "#\/components\/schemas\/UnitResource"
                },
                "title": "UnitCollection"
            },
            "UnitDetailResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "status": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "color": {
                                "type": "string"
                            },
                            "is_system": {
                                "type": "boolean"
                            },
                            "labels": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "code",
                            "label",
                            "color",
                            "is_system",
                            "labels"
                        ]
                    },
                    "type": {
                        "type": "string"
                    },
                    "type_labels": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "layout_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "room_count": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "orientation": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "orientation_labels": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "pricing": {
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "price_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "price_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discount_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discount_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discounted_price_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discounted_price_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "vat_rate": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "price_per_sqm": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "rent": {
                                        "type": "object",
                                        "properties": {
                                            "monthly_rent": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "monthly_rent_with_vat": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_vat_rate": {
                                                "type": "number"
                                            },
                                            "rent_vat_mode": {
                                                "type": "string",
                                                "description": "The mode the rate above was computed with: the segment default\nwhen none is chosen, as the app shows it."
                                            },
                                            "rent_per_sqm": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "service_charges": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_includes_energy": {
                                                "type": "boolean"
                                            },
                                            "deposit_amount": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "monthly_rent",
                                            "monthly_rent_with_vat",
                                            "rent_vat_rate",
                                            "rent_vat_mode",
                                            "rent_per_sqm",
                                            "service_charges",
                                            "rent_includes_energy",
                                            "deposit_amount"
                                        ]
                                    }
                                },
                                "required": [
                                    "price_without_vat",
                                    "price_with_vat",
                                    "discount_without_vat",
                                    "discount_with_vat",
                                    "discounted_price_without_vat",
                                    "discounted_price_with_vat",
                                    "vat_rate",
                                    "price_per_sqm",
                                    "rent"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "price_without_vat": {
                                        "type": "null"
                                    },
                                    "price_with_vat": {
                                        "type": "null"
                                    },
                                    "discount_without_vat": {
                                        "type": "null"
                                    },
                                    "discount_with_vat": {
                                        "type": "null"
                                    },
                                    "discounted_price_without_vat": {
                                        "type": "null"
                                    },
                                    "discounted_price_with_vat": {
                                        "type": "null"
                                    },
                                    "vat_rate": {
                                        "type": "null"
                                    },
                                    "price_per_sqm": {
                                        "type": "null"
                                    },
                                    "rent": {
                                        "type": "object",
                                        "properties": {
                                            "monthly_rent": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "monthly_rent_with_vat": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_vat_rate": {
                                                "type": "number"
                                            },
                                            "rent_vat_mode": {
                                                "type": "string",
                                                "description": "The mode the rate above was computed with: the segment default\nwhen none is chosen, as the app shows it."
                                            },
                                            "rent_per_sqm": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "service_charges": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_includes_energy": {
                                                "type": "boolean"
                                            },
                                            "deposit_amount": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "monthly_rent",
                                            "monthly_rent_with_vat",
                                            "rent_vat_rate",
                                            "rent_vat_mode",
                                            "rent_per_sqm",
                                            "service_charges",
                                            "rent_includes_energy",
                                            "deposit_amount"
                                        ]
                                    }
                                },
                                "required": [
                                    "price_without_vat",
                                    "price_with_vat",
                                    "discount_without_vat",
                                    "discount_with_vat",
                                    "discounted_price_without_vat",
                                    "discounted_price_with_vat",
                                    "vat_rate",
                                    "price_per_sqm",
                                    "rent"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "hidden": {
                                        "type": "boolean"
                                    },
                                    "display_text": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "hidden",
                                    "display_text"
                                ]
                            }
                        ]
                    },
                    "available_from": {
                        "type": "string"
                    },
                    "areas": {
                        "type": "object",
                        "properties": {
                            "area": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_floor": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_gross": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_building": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_land": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "area",
                            "area_floor",
                            "area_gross",
                            "area_building",
                            "area_land"
                        ]
                    },
                    "rooms": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "area": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "area"
                            ]
                        }
                    },
                    "outdoor_spaces": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "area": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "area"
                            ]
                        }
                    },
                    "building": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "floor": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "number": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "number"
                        ]
                    },
                    "phase": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "floor_plan_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "documents": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "object",
                                "null"
                            ],
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": "string"
                                },
                                "api_url": {
                                    "type": "string"
                                },
                                "mime_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "url",
                                "api_url",
                                "mime_type",
                                "size"
                            ]
                        }
                    },
                    "files": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": "string"
                                },
                                "api_url": {
                                    "type": "string"
                                },
                                "mime_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "url",
                                "api_url",
                                "mime_type",
                                "size"
                            ]
                        }
                    },
                    "bundle": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "bundle_id": {
                                "type": "string"
                            },
                            "bundle_name": {
                                "type": "string"
                            },
                            "requirements": {
                                "type": "string"
                            },
                            "selected_units": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "bundle_id",
                            "bundle_name",
                            "requirements",
                            "selected_units"
                        ]
                    },
                    "custom_attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value",
                                "type"
                            ]
                        }
                    },
                    "similar_units": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                },
                "required": [
                    "id",
                    "code",
                    "status",
                    "type",
                    "type_labels",
                    "layout_type",
                    "room_count",
                    "orientation",
                    "orientation_labels",
                    "pricing",
                    "available_from",
                    "areas",
                    "rooms",
                    "outdoor_spaces",
                    "floor_plan_url",
                    "documents",
                    "files",
                    "bundle",
                    "custom_attributes"
                ],
                "title": "UnitDetailResource"
            },
            "UnitResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "code": {
                        "type": "string"
                    },
                    "status": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "label": {
                                "type": "string"
                            },
                            "color": {
                                "type": "string"
                            },
                            "is_system": {
                                "type": "boolean"
                            },
                            "labels": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "code",
                            "label",
                            "color",
                            "is_system",
                            "labels"
                        ]
                    },
                    "type": {
                        "type": "string"
                    },
                    "type_labels": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "layout_type": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "room_count": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "orientation": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "orientation_labels": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    },
                    "pricing": {
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "price_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "price_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discount_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discount_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discounted_price_without_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "discounted_price_with_vat": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "vat_rate": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "price_per_sqm": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "rent": {
                                        "type": "object",
                                        "properties": {
                                            "monthly_rent": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "monthly_rent_with_vat": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_vat_rate": {
                                                "type": "number"
                                            },
                                            "rent_vat_mode": {
                                                "type": "string",
                                                "description": "The mode the rate above was computed with: the segment default\nwhen none is chosen, as the app shows it."
                                            },
                                            "rent_per_sqm": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "service_charges": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_includes_energy": {
                                                "type": "boolean"
                                            },
                                            "deposit_amount": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "monthly_rent",
                                            "monthly_rent_with_vat",
                                            "rent_vat_rate",
                                            "rent_vat_mode",
                                            "rent_per_sqm",
                                            "service_charges",
                                            "rent_includes_energy",
                                            "deposit_amount"
                                        ]
                                    }
                                },
                                "required": [
                                    "price_without_vat",
                                    "price_with_vat",
                                    "discount_without_vat",
                                    "discount_with_vat",
                                    "discounted_price_without_vat",
                                    "discounted_price_with_vat",
                                    "vat_rate",
                                    "price_per_sqm",
                                    "rent"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "price_without_vat": {
                                        "type": "null"
                                    },
                                    "price_with_vat": {
                                        "type": "null"
                                    },
                                    "discount_without_vat": {
                                        "type": "null"
                                    },
                                    "discount_with_vat": {
                                        "type": "null"
                                    },
                                    "discounted_price_without_vat": {
                                        "type": "null"
                                    },
                                    "discounted_price_with_vat": {
                                        "type": "null"
                                    },
                                    "vat_rate": {
                                        "type": "null"
                                    },
                                    "price_per_sqm": {
                                        "type": "null"
                                    },
                                    "rent": {
                                        "type": "object",
                                        "properties": {
                                            "monthly_rent": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "monthly_rent_with_vat": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_vat_rate": {
                                                "type": "number"
                                            },
                                            "rent_vat_mode": {
                                                "type": "string",
                                                "description": "The mode the rate above was computed with: the segment default\nwhen none is chosen, as the app shows it."
                                            },
                                            "rent_per_sqm": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "service_charges": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            },
                                            "rent_includes_energy": {
                                                "type": "boolean"
                                            },
                                            "deposit_amount": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "monthly_rent",
                                            "monthly_rent_with_vat",
                                            "rent_vat_rate",
                                            "rent_vat_mode",
                                            "rent_per_sqm",
                                            "service_charges",
                                            "rent_includes_energy",
                                            "deposit_amount"
                                        ]
                                    }
                                },
                                "required": [
                                    "price_without_vat",
                                    "price_with_vat",
                                    "discount_without_vat",
                                    "discount_with_vat",
                                    "discounted_price_without_vat",
                                    "discounted_price_with_vat",
                                    "vat_rate",
                                    "price_per_sqm",
                                    "rent"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "hidden": {
                                        "type": "boolean"
                                    },
                                    "display_text": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "hidden",
                                    "display_text"
                                ]
                            }
                        ]
                    },
                    "available_from": {
                        "type": "string"
                    },
                    "areas": {
                        "type": "object",
                        "properties": {
                            "area": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_floor": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_gross": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_building": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            },
                            "area_land": {
                                "type": [
                                    "number",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "area",
                            "area_floor",
                            "area_gross",
                            "area_building",
                            "area_land"
                        ]
                    },
                    "rooms_summary": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer"
                        }
                    },
                    "outdoor_spaces_summary": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "object",
                            "properties": {
                                "count": {
                                    "type": "integer"
                                },
                                "total_area": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "count",
                                "total_area"
                            ]
                        }
                    },
                    "building": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "floor": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "number": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "number"
                        ]
                    },
                    "phase": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name"
                        ]
                    },
                    "floor_plan_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "documents": {
                        "type": "object",
                        "additionalProperties": {
                            "type": [
                                "object",
                                "null"
                            ],
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "type": {
                                    "type": "string"
                                },
                                "type_labels": {
                                    "type": [
                                        "object",
                                        "null"
                                    ],
                                    "additionalProperties": {
                                        "type": "string"
                                    }
                                },
                                "name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "url": {
                                    "type": "string"
                                },
                                "api_url": {
                                    "type": "string"
                                },
                                "mime_type": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "size": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "id",
                                "type",
                                "type_labels",
                                "name",
                                "url",
                                "api_url",
                                "mime_type",
                                "size"
                            ]
                        }
                    },
                    "bundle": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "bundle_id": {
                                "type": "string"
                            },
                            "bundle_name": {
                                "type": "string"
                            },
                            "requirements": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "bundle_id",
                            "bundle_name",
                            "requirements"
                        ]
                    },
                    "custom_attributes": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "value": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "name",
                                "value",
                                "type"
                            ]
                        }
                    }
                },
                "required": [
                    "id",
                    "code",
                    "status",
                    "type",
                    "type_labels",
                    "layout_type",
                    "room_count",
                    "orientation",
                    "orientation_labels",
                    "pricing",
                    "available_from",
                    "areas",
                    "rooms_summary",
                    "outdoor_spaces_summary",
                    "floor_plan_url",
                    "documents",
                    "bundle",
                    "custom_attributes"
                ],
                "title": "UnitResource"
            },
            "VisitorEventType": {
                "type": "string",
                "enum": [
                    "page_view",
                    "unit_view",
                    "floor_plan_view",
                    "price_list_view",
                    "gallery_browse",
                    "contact_form_open",
                    "calculator_use",
                    "comparison_add",
                    "search_filter",
                    "time_on_page",
                    "download",
                    "video_view"
                ],
                "title": "VisitorEventType"
            }
        },
        "responses": {
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}