> ## 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.

# List plan items



## OpenAPI

````yaml /api/ad/openapi.json get /ad/plan-items/v1/
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:
  /ad/plan-items/v1/:
    get:
      tags:
        - plan-items
      summary: List plan items
      operationId: listPlanItemsADV1
      parameters:
        - schema:
            default: 1
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
          in: query
          name: page
          required: false
        - schema:
            default: 50
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 1000
          in: query
          name: pageSize
          required: false
        - schema:
            example: true
            anyOf:
              - type: boolean
          in: query
          name: countOnly
          required: false
          description: >-
            When true, answers `totalCount` with an empty `data`: the rows are
            never read, so no extend is selected and no transform runs. For a
            badge or a counter.
        - schema:
            type: array
            items:
              type: string
              enum:
                - actions-info
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "actions-info": Adds `actions` { canBeUpdated, canBeDeleted }
                per row.
          in: query
          name: extend
          required: false
        - schema:
            type: array
            items:
              type: object
              properties:
                field:
                  type: string
                  enum:
                    - name
                    - type
                    - createdAt
                  description: >-
                    OrderBy options (JSON-encoded array, e.g.
                    `?orderBy=[{"field":"name","direction":"asc"}]`):

                    - "name": Order by name.

                    - "type": Order by shape.

                    - "createdAt": Order by creation date.
                direction:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: Sort direction
                  example: asc
              required:
                - field
                - direction
          in: query
          name: orderBy
          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: query
          name: wherePlanId
          required: false
          description: Filter by the plan the items belong to (render one plan).
        - schema:
            type: array
            items:
              type: string
            example:
              - point
              - zone
          in: query
          name: whereType
          required: false
          description: Filter by one or more shapes (zone/drawing).
        - schema:
            type: array
            items:
              type: string
            example:
              - custom
              - anomaly
          in: query
          name: whereEntityType
          required: false
          description: Filter by one or more entity types (custom/drawing).
        - schema:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereName
          required: false
          description: Filter by name (contains, case-insensitive).
        - schema:
            anyOf:
              - type: object
                properties:
                  start:
                    type: string
                  end:
                    type: string
              - type: object
                properties:
                  gte:
                    type: string
                  lte:
                    type: string
            example:
              start: '2026-01-01'
              end: '2026-01-31'
          in: query
          name: whereCreatedAt
          required: false
          description: Filter by the creation-date range.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      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:
                          nullable: true
                          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:
                            - point
                            - zone
                            - drawing
                        entityType:
                          type: string
                          enum:
                            - custom
                            - anomaly
                            - equipment
                            - room
                            - drawing
                        xPercent:
                          nullable: true
                          type: number
                          minimum: 0
                          maximum: 100
                        yPercent:
                          nullable: true
                          type: number
                          minimum: 0
                          maximum: 100
                        rectPoint:
                          nullable: true
                          minItems: 3
                          type: array
                          items:
                            type: array
                            items:
                              anyOf:
                                - type: number
                                  minimum: 0
                                  maximum: 100
                                - type: number
                                  minimum: 0
                                  maximum: 100
                            minItems: 2
                            maxItems: 2
                        path:
                          nullable: true
                          type: string
                          minLength: 1
                          maxLength: 65536
                        color:
                          nullable: true
                          type: string
                          pattern: ^#[0-9a-fA-F]{6}$
                        width:
                          nullable: true
                          type: number
                          minimum: 0
                          exclusiveMinimum: true
                        opacity:
                          nullable: true
                          type: number
                          minimum: 0
                          maximum: 1
                        planId:
                          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)$
                        anomalyId:
                          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)$
                        organizationId:
                          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
                        actions:
                          type: object
                          properties:
                            canBeUpdated:
                              type: boolean
                            canBeDeleted:
                              type: boolean
                          required:
                            - canBeUpdated
                            - canBeDeleted
                          additionalProperties: false
                      required:
                        - id
                        - ref
                        - name
                        - type
                        - entityType
                        - xPercent
                        - yPercent
                        - rectPoint
                        - path
                        - color
                        - width
                        - opacity
                        - planId
                        - anomalyId
                        - organizationId
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                  totalCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      pageSize:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      totalPages:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - page
                      - pageSize
                      - totalPages
                    additionalProperties: false
                required:
                  - data
                  - totalCount
                  - pagination
                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

````