FairePlace Estate Diagnostics API

Estate diagnostic documents management (lead, asbestos, electrical, gas, risk assessment, co-ownership rules). Diagnostics are attached to a property (estate) and can be automatically linked to lease annexes via the `POST /leases/{lease_id}/annexes/attach-mandatory` endpoint. Only one active diagnostic per type per estate is allowed. Creating a new diagnostic of the same type automatically deactivates the previous one.

GitHub OpenAPI

Operations 5

GET /places/{place_id}/estates/{estate_id}/diagnostics List diagnostics for an estate #
POST /places/{place_id}/estates/{estate_id}/diagnostics Create an estate diagnostic #
GET /places/{place_id}/estates/{estate_id}/diagnostics/{diagnostic_id} Get estate diagnostic by ID #
PUT /places/{place_id}/estates/{estate_id}/diagnostics/{diagnostic_id} Update estate diagnostic #
DELETE /places/{place_id}/estates/{estate_id}/diagnostics/{diagnostic_id} Delete estate diagnostic #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/faireplace-com:faireplace-com-estate-diagnostics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

faireplace-com-estate-diagnostics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FairePlace Property Management Estate Diagnostics API
  description: 'Comprehensive API for managing properties, leases, tenants, and all aspects of real estate management.

    Built with Rust and Actix-web following hexagonal architecture principles.


    ## Authentication

    This API uses API keys for authentication with tenant-based isolation.


    ## Base URL

    - Production: `https://api.faireplace.com/api`'
  version: 1.0.0
  contact:
    name: FairePlace API Support
    email: api-support@faireplace.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.faireplace.com/api
  description: Production server
security:
- BearerAuth: []
tags:
- name: Estate Diagnostics
  description: 'Estate diagnostic documents management (lead, asbestos, electrical, gas, risk assessment, co-ownership rules).


    Diagnostics are attached to a property (estate) and can be automatically linked to lease annexes

    via the `POST /leases/{lease_id}/annexes/attach-mandatory` endpoint.


    Only one active diagnostic per type per estate is allowed. Creating a new diagnostic of the same type

    automatically deactivates the previous one.'
paths:
  /places/{place_id}/estates/{estate_id}/diagnostics:
    get:
      operationId: listDiagnosticsEstate
      summary: List diagnostics for an estate
      description: Retrieves all active diagnostics for a specific property (estate)
      tags:
      - Estate Diagnostics
      security:
      - BearerAuth: []
      parameters:
      - name: place_id
        in: path
        required: true
        description: Place ID
        schema:
          type: string
          format: uuid
      - name: estate_id
        in: path
        required: true
        description: Estate (property) ID
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Active diagnostics for the estate retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EstateDiagnostic'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      operationId: createEstateDiagnostic
      summary: Create an estate diagnostic
      description: 'Creates a new diagnostic for a property.


        If an active diagnostic of the same type already exists for this estate,

        the previous one is automatically deactivated.'
      tags:
      - Estate Diagnostics
      security:
      - BearerAuth: []
      parameters:
      - name: place_id
        in: path
        required: true
        description: Place ID
        schema:
          type: string
          format: uuid
      - name: estate_id
        in: path
        required: true
        description: Estate (property) ID
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEstateDiagnostic'
      responses:
        '201':
          description: Estate diagnostic created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstateDiagnostic'
        '400':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /places/{place_id}/estates/{estate_id}/diagnostics/{diagnostic_id}:
    get:
      operationId: getEstateDiagnosticID
      summary: Get estate diagnostic by ID
      description: Retrieves a specific estate diagnostic by its unique identifier
      tags:
      - Estate Diagnostics
      security:
      - BearerAuth: []
      parameters:
      - name: place_id
        in: path
        required: true
        description: Place ID
        schema:
          type: string
          format: uuid
      - name: estate_id
        in: path
        required: true
        description: Estate (property) ID
        schema:
          type: string
          format: uuid
      - name: diagnostic_id
        in: path
        required: true
        description: Diagnostic ID
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Estate diagnostic retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstateDiagnostic'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      operationId: updateEstateDiagnostic
      summary: Update estate diagnostic
      description: Updates an existing estate diagnostic
      tags:
      - Estate Diagnostics
      security:
      - BearerAuth: []
      parameters:
      - name: place_id
        in: path
        required: true
        description: Place ID
        schema:
          type: string
          format: uuid
      - name: estate_id
        in: path
        required: true
        description: Estate (property) ID
        schema:
          type: string
          format: uuid
      - name: diagnostic_id
        in: path
        required: true
        description: Diagnostic ID
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEstateDiagnostic'
      responses:
        '200':
          description: Estate diagnostic updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstateDiagnostic'
        '400':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      operationId: deleteEstateDiagnostic
      summary: Delete estate diagnostic
      description: Soft-deletes an estate diagnostic by deactivating it (sets is_active to false)
      tags:
      - Estate Diagnostics
      security:
      - BearerAuth: []
      parameters:
      - name: place_id
        in: path
        required: true
        description: Place ID
        schema:
          type: string
          format: uuid
      - name: estate_id
        in: path
        required: true
        description: Estate (property) ID
        schema:
          type: string
          format: uuid
      - name: diagnostic_id
        in: path
        required: true
        description: Diagnostic ID
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Estate diagnostic deleted (deactivated) successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    UpdateEstateDiagnostic:
      type: object
      description: 'Data for updating an existing estate diagnostic.


        All fields are optional. Only provided fields will be updated.

        '
      properties:
        media_id:
          type:
          - string
          - 'null'
          format: uuid
          description: Media ID of the uploaded diagnostic PDF document
          example: 550e8400-e29b-41d4-a716-446655440010
        name:
          type:
          - string
          - 'null'
          description: Name/title of the diagnostic
          example: CREP - Lead Diagnosis (updated)
          maxLength: 255
          minLength: 1
        description:
          type:
          - string
          - 'null'
          description: Optional description or notes
          example: Updated lead diagnosis
          maxLength: 1000
        performed_at:
          type:
          - string
          - 'null'
          format: date
          description: Date when the diagnostic was performed
          example: '2024-06-15'
        expires_at:
          type:
          - string
          - 'null'
          format: date
          description: Expiry date of the diagnostic
          example: '2030-06-15'
        is_active:
          type:
          - boolean
          - 'null'
          description: Whether this diagnostic is currently active
          example: true
    EstateDiagnostic:
      type: object
      description: Estate diagnostic document (lead, asbestos, electrical, gas, risk assessment, co-ownership rules)
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the diagnostic
          example: 550e8400-e29b-41d4-a716-446655440000
        estate_id:
          type: string
          format: uuid
          description: Property (estate) ID this diagnostic belongs to
          example: 550e8400-e29b-41d4-a716-446655440001
        diagnostic_type:
          $ref: '#/components/schemas/DiagnosticType'
        media_id:
          type: string
          format: uuid
          description: Media ID of the uploaded diagnostic PDF document
          example: 550e8400-e29b-41d4-a716-446655440010
        name:
          type: string
          description: Name/title of the diagnostic
          example: CREP - Lead Diagnosis
          maxLength: 255
        description:
          type:
          - string
          - 'null'
          description: Optional description or notes
          example: Lead diagnosis for apartment 3B
          maxLength: 1000
        performed_at:
          type:
          - string
          - 'null'
          format: date
          description: Date when the diagnostic was performed
          example: '2024-06-15'
        expires_at:
          type:
          - string
          - 'null'
          format: date
          description: Expiry date of the diagnostic
          example: '2030-06-15'
        is_active:
          type: boolean
          description: Whether this diagnostic is currently active
          example: true
        created_at:
          type: string
          format: date-time
          description: Creation date
          example: '2024-01-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          description: Last modification date
          example: '2024-01-15T10:30:00Z'
      required:
      - id
      - estate_id
      - diagnostic_type
      - media_id
      - name
      - is_active
      - created_at
      - updated_at
    Error:
      type: object
      description: "The error envelope returned by every authenticated endpoint.\n\nTwo things are worth knowing before you write your error handling:\n\n- **`code` is a symbolic string, not a number.** The numeric HTTP status is\n  in `status`. Branch on `code`: it is stable, and show `message`, which\n  is written for humans and may be reworded without notice.\n- The public guest-signature endpoints use a **different, flatter shape**\n  (`{ \"error_code\": …, \"message\": … }`, no `error` wrapper), because they\n  are consumed by a page that has no session. Their responses document it\n  inline.\n\nThe `X-Request-Id` response header carries the request identifier: quote it\nwhen reporting a problem. It is a header, not a body field.\n"
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - status
          properties:
            code:
              type: string
              description: Stable symbolic code. Branch on this.
              enum:
              - NOT_FOUND
              - UNAUTHORIZED
              - VALIDATION_ERROR
              - DATABASE_ERROR
              - BUSINESS_ERROR
              - STORAGE_ERROR
              - CONFIG_ERROR
              - FORBIDDEN
              - CONFLICT
              - PARSE_ERROR
              - SERIALIZATION_ERROR
              - AUTHENTICATION_ERROR
              - AUTHORIZATION_ERROR
              - EXTERNAL_SERVICE_ERROR
              - RATE_LIMIT_EXCEEDED
              - PAYMENT_REQUIRED
              - PLAN_LIMIT_REACHED
              - GONE
              - BAD_REQUEST
              - INTERNAL_ERROR
              - INTERNAL_SERVER_ERROR
              example: NOT_FOUND
            message:
              type: string
              description: 'Human-readable explanation, most often in French. Safe to display,

                not safe to parse.

                '
              example: Lease not found
            status:
              type: integer
              description: The HTTP status code, repeated in the body.
              example: 404
            details:
              type: object
              additionalProperties: true
              description: 'Extra machine-readable context. Only present on some errors: on

                `RATE_LIMIT_EXCEEDED` it carries `retry_after_seconds`.

                '
              example:
                retry_after_seconds: 12
    CreateEstateDiagnostic:
      type: object
      description: Data for creating a new estate diagnostic
      required:
      - estate_id
      - diagnostic_type
      - media_id
      - name
      properties:
        estate_id:
          type: string
          format: uuid
          description: Property (estate) ID this diagnostic belongs to
          example: 550e8400-e29b-41d4-a716-446655440001
        diagnostic_type:
          $ref: '#/components/schemas/DiagnosticType'
        media_id:
          type: string
          format: uuid
          description: Media ID of the uploaded diagnostic PDF document
          example: 550e8400-e29b-41d4-a716-446655440010
        name:
          type: string
          description: Name/title of the diagnostic
          example: CREP - Lead Diagnosis
          maxLength: 255
          minLength: 1
        description:
          type:
          - string
          - 'null'
          description: Optional description or notes
          example: Lead diagnosis for apartment 3B
          maxLength: 1000
        performed_at:
          type:
          - string
          - 'null'
          format: date
          description: Date when the diagnostic was performed
          example: '2024-06-15'
        expires_at:
          type:
          - string
          - 'null'
          format: date
          description: Expiry date of the diagnostic
          example: '2030-06-15'
    DiagnosticType:
      type: string
      description: Type of estate diagnostic
      enum:
      - DIAGNOSTIC_PLOMB
      - DIAGNOSTIC_AMIANTE
      - DIAGNOSTIC_ELECTRICITE
      - DIAGNOSTIC_GAZ
      - ETAT_RISQUES
      - REGLEMENT_COPROPRIETE
      - PERMIS_LOUER
      - CUSTOM
      example: DIAGNOSTIC_PLOMB
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key with fp_* prefix, passed as Bearer token
    WorkerApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    WorkerBearer:
      type: http
      scheme: bearer
      bearerFormat: Worker