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

# Get one plan



## OpenAPI

````yaml /api/rs/openapi.json get /rs/plans/v1/{id}
openapi: 3.0.3
info:
  title: KARE API
  description: Backend API for the KARE platform
  version: dev
servers:
  - url: http://localhost:3000
    description: Local dev
security: []
tags:
  - name: better-auth
    description: >-
      Better Auth's own endpoints (sign-in, session, MFA, password) - generated
      from the audience's live config via `generateOpenAPISchema()`, not
      hand-written.
paths:
  /rs/plans/v1/{id}:
    get:
      tags:
        - plans
      summary: Get one plan
      operationId: getPlanRSV1
      parameters:
        - schema:
            type: array
            items:
              type: string
              enum:
                - building
                - unit
                - document
                - actions-info
                - updatable-fields
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "building": Include the anchoring building (id, ref, name).

                - "unit": Include the linked unit (id, ref, name, type) when
                present - reconciles the compliance tree with this patrimonial
                plan, independent from the building.

                - "document": Include the background document (id, ref, name,
                mimeType, size, downloadUrl) when present.

                - "actions-info": Adds `actions` { canBeUpdated, canBeDeleted }.

                - "updatable-fields": Adds `updatableFields` (per-field
                editability).
          in: query
          name: extend
          required: false
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  ref:
                    type: string
                    maxLength: 40
                    pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                  name:
                    type: string
                    minLength: 1
                    maxLength: 150
                  buildingId:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  unitId:
                    nullable: true
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  documentId:
                    nullable: true
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  building:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      ref:
                        type: string
                        maxLength: 40
                        pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                      name:
                        type: string
                        minLength: 1
                        maxLength: 150
                    required:
                      - id
                      - ref
                      - name
                    additionalProperties: false
                  unit:
                    nullable: true
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      ref:
                        type: string
                        maxLength: 40
                        pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                      name:
                        type: string
                        minLength: 1
                        maxLength: 150
                      type:
                        type: string
                        enum:
                          - parent
                          - child
                    required:
                      - id
                      - ref
                      - name
                      - type
                    additionalProperties: false
                  document:
                    nullable: true
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                        maxLength: 255
                      mimeType:
                        type: string
                        minLength: 1
                        maxLength: 100
                      size:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 1073741824
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      ref:
                        type: string
                        maxLength: 40
                        pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                      downloadUrl:
                        type: string
                        format: uri
                    required:
                      - name
                      - mimeType
                      - size
                      - id
                      - ref
                      - downloadUrl
                    additionalProperties: false
                  actions:
                    type: object
                    properties:
                      canBeUpdated:
                        type: boolean
                      canBeDeleted:
                        type: boolean
                    required:
                      - canBeUpdated
                      - canBeDeleted
                    additionalProperties: false
                  updatableFields:
                    type: object
                    properties:
                      name:
                        type: boolean
                      unitId:
                        type: boolean
                      document:
                        type: boolean
                    required:
                      - name
                      - unitId
                      - document
                    additionalProperties: false
                required:
                  - id
                  - ref
                  - name
                  - buildingId
                  - unitId
                  - documentId
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false

````