> ## Documentation Index
> Fetch the complete documentation index at: https://api.housera.ro/llms.txt
> Use this file to discover all available pages before exploring further.

# Set the floor plans

> The listing's full list of floor plans, one per level, in display order. Each plan has an image (a URL or an upload key), its level and the points that show where each photo was taken. A plan missing from the list is deleted. The response comes right away (202), the plans are processed in the background, and `media.processing` tells you when they are done.



## OpenAPI

````yaml en/openapi.json PUT /listings/{code}/floor-plans
openapi: 3.1.2
info:
  title: Housera API
  version: 1.0.0
  description: >-
    Publish and manage real estate listings on Housera from your CRM or your own
    application, under the same rules as the form on the Housera portal.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: the real listings on housera.ro.'
security:
  - bearer: []
tags:
  - name: Your listings
  - name: Photos
  - name: Events
  - name: Vocabulary
  - name: Connect with Housera
  - name: Client requests
  - name: The company and its team
  - name: Marketing mandates
  - name: Viewings
  - name: Projects
  - name: Partnerships
  - name: API key
  - name: Statistics
paths:
  /listings/{code}/floor-plans:
    put:
      tags:
        - Photos
      summary: Set the floor plans
      description: >-
        The listing's full list of floor plans, one per level, in display order.
        Each plan has an image (a URL or an upload key), its level and the
        points that show where each photo was taken. A plan missing from the
        list is deleted. The response comes right away (202), the plans are
        processed in the background, and `media.processing` tells you when they
        are done.
      operationId: v1.listings.floor_plans
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
          description: The listing's public code (8 characters, as in its URL on Housera).
        - name: locale
          in: query
          required: false
          schema:
            type: string
            enum:
              - ro
              - en
            default: en
          example: en
          description: >-
            The response language, `ro` or `en`. It changes error messages
            (`title`, `detail`), labels and, when the listing has an approved
            translation in that language, its title and description. Codes are
            the same in every language. It takes precedence over
            `Accept-Language` and over the account's language.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                floor_plans:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type:
                          - string
                          - 'null'
                        maxLength: 2048
                        description: >-
                          The plan image's address. When writing, an https URL
                          Housera downloads the plan from, or the address of a
                          plan already on the listing, which stays.
                      key:
                        type:
                          - string
                          - 'null'
                        maxLength: 255
                        description: >-
                          The image's upload key, from `POST /uploads`, instead
                          of `url`.
                      level:
                        type:
                          - string
                          - 'null'
                        description: >-
                          The plan's level, as a code from `levels` in `/schema`
                          (for example `ground`).
                      hotspots:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            x:
                              type: number
                              minimum: 0
                              maximum: 1
                              description: >-
                                The point's horizontal position on the image,
                                between 0 (left edge) and 1 (right edge).
                            'y':
                              type: number
                              minimum: 0
                              maximum: 1
                              description: >-
                                The point's vertical position on the image,
                                between 0 (top) and 1 (bottom).
                            angle:
                              type:
                                - number
                                - 'null'
                              minimum: 0
                              maximum: 360
                              description: >-
                                The direction the photo faces, in degrees,
                                between 0 and 360.
                            photo_url:
                              type:
                                - string
                                - 'null'
                              maxLength: 2048
                              description: >-
                                The point's photo: the URL you sent it with in
                                `PUT /listings/{code}/photos`, or its address
                                from `photos[].url`.
                            photo_key:
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              description: >-
                                The point's photo, by the upload key you sent it
                                with in `PUT /listings/{code}/photos`.
                          required:
                            - x
                            - 'y'
                        maxItems: 40
                        description: >-
                          The points on the plan: where a photo was taken and
                          which way it faces. A photo has at most one point
                          across all the plans.
                  maxItems: 12
                  description: >-
                    The listing's floor plans, one per level, in display order,
                    with the points that tie the photos to the plan.
              required:
                - floor_plans
      responses:
        '202':
          content:
            application/json:
              schema:
                type: object
                properties:
                  queued:
                    type: integer
                    description: >-
                      How many photos went into processing. The outcome arrives
                      in the `media.*` events.
                  warnings:
                    type: array
                    items:
                      type: object
                      properties:
                        pointer:
                          type: string
                          description: >-
                            The field it refers to, as a JSON Pointer
                            (`/features/2`).
                        code:
                          type: string
                          const: plan_level_gone
                          description: >-
                            The reason, as a stable code: `not_for_type`,
                            `not_for_transaction`, `unknown_feature`,
                            `unknown_field`, `agent_not_member`,
                            `agent_not_allowed` or `area_from_pin`. The Editing
                            page explains each one.
                      required:
                        - pointer
                        - code
                    description: >-
                      What Housera ignored in the request without rejecting it,
                      for example a field that does not exist for the listing's
                      type and transaction, or an unknown amenity. The request
                      succeeded, but it is worth checking your mapping.
                required:
                  - queued
                  - warnings
          description: The request was accepted and is being processed in the background.
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is not valid JSON (`malformed_json`).
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The key is missing, revoked or expired (`unauthenticated`).
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The key lacks the required permission (`missing_ability`) or access
            is denied (`forbidden`).
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The listing does not exist or the key has no access to it
            (`not_found`).
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request body is larger than 1 MB (`payload_too_large`).
        '415':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The request body isn't declared as JSON (`unsupported_media_type`).
            Send it with `Content-Type: application/json`.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ValidationProblem'
          description: >-
            The data fails the rules: one entry per field in `errors[]`, each
            with a stable `code`.
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Too many requests. Try again after the number of seconds in
            `Retry-After`.
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Housera has temporarily paused writes through the API
            (`api_writes_paused`). Try again after the number of seconds in
            `Retry-After`.
components:
  schemas:
    Problem:
      type: object
      title: Problem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: The HTTP status code.
        code:
          type: string
          description: >-
            The stable code of the refusal, the one to handle the error by (the
            list is on the Errors page).
        detail:
          type: string
          description: The explanation, in the request's language.
        existing:
          type: object
          properties:
            code:
              type: string
              description: The existing listing's public code.
            external_ref:
              type:
                - string
                - 'null'
              description: >-
                Your ID for the existing listing, if you set it with `PUT
                /listings/ref/{ref}`. Otherwise `null`.
          required:
            - code
            - external_ref
          description: >-
            Only on `409 duplicate_listing`: the listing you already have for
            the same property.
      required:
        - type
        - title
        - status
        - code
        - detail
    ValidationProblem:
      type: object
      title: ValidationProblem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: 'The HTTP status code: `422`.'
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
                description: The field it refers to, as a JSON Pointer (`/features/2`).
              code:
                type: string
                description: >-
                  The rule that failed, as a stable code (the list is on the
                  Errors page).
              detail:
                type: string
                description: >-
                  The explanation, in the request's language. The wording can
                  change, so handle the error by `code`.
            required:
              - pointer
              - code
              - detail
          description: One entry for each field that fails the rules.
      required:
        - type
        - title
        - status
        - errors
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.